continue to annotate trans functions as unsafe where neccessary
This commit is contained in:
parent
2094668949
commit
f2cd33df72
@ -16,7 +16,8 @@
|
||||
|
||||
fn mk_ctxt() -> ctxt { ret @{mutable next_tydesc_num: 0u}; }
|
||||
|
||||
fn add_global(ccx: @crate_ctxt, llval: ValueRef, name: str) -> ValueRef {
|
||||
fn add_global(ccx: @crate_ctxt, llval: ValueRef, name: str)
|
||||
-> ValueRef unsafe {
|
||||
let llglobal =
|
||||
str::as_buf(name,
|
||||
{|buf|
|
||||
@ -27,7 +28,8 @@ fn add_global(ccx: @crate_ctxt, llval: ValueRef, name: str) -> ValueRef {
|
||||
ret llglobal;
|
||||
}
|
||||
|
||||
fn add_gc_root(cx: @block_ctxt, llval: ValueRef, ty: ty::t) -> @block_ctxt {
|
||||
fn add_gc_root(cx: @block_ctxt, llval: ValueRef, ty: ty::t) ->
|
||||
@block_ctxt unsafe {
|
||||
let bcx = cx;
|
||||
if !type_is_gc_relevant(bcx_tcx(cx), ty) ||
|
||||
ty::type_has_dynamic_size(bcx_tcx(cx), ty) {
|
||||
|
@ -72,7 +72,7 @@ fn eq_res_info(a: res_info, b: res_info) -> bool {
|
||||
}
|
||||
|
||||
fn mk_global(ccx: @crate_ctxt, name: str, llval: ValueRef, internal: bool) ->
|
||||
ValueRef {
|
||||
ValueRef unsafe {
|
||||
let llglobal =
|
||||
str::as_buf(name,
|
||||
{|buf|
|
||||
@ -245,7 +245,7 @@ fn s_float(_tcx: ty_ctxt) -> u8 {
|
||||
ret shape_f64; // TODO: x86-64
|
||||
}
|
||||
|
||||
fn mk_ctxt(llmod: ModuleRef) -> ctxt {
|
||||
fn mk_ctxt(llmod: ModuleRef) -> ctxt unsafe {
|
||||
let llshapetablesty = trans_common::T_named_struct("shapes");
|
||||
let llshapetables =
|
||||
str::as_buf("shapes",
|
||||
@ -580,7 +580,7 @@ fn gen_resource_shapes(ccx: @crate_ctxt) -> ValueRef {
|
||||
ret mk_global(ccx, "resource_shapes", C_struct(dtors), true);
|
||||
}
|
||||
|
||||
fn gen_shape_tables(ccx: @crate_ctxt) {
|
||||
fn gen_shape_tables(ccx: @crate_ctxt) unsafe {
|
||||
let lltagstable = gen_tag_shapes(ccx);
|
||||
let llresourcestable = gen_resource_shapes(ccx);
|
||||
trans_common::set_struct_body(ccx.shape_cx.llshapetablesty,
|
||||
|
Loading…
Reference in New Issue
Block a user