Skip to content

Commit 1263a79

Browse files
nikomatsakisbrson
authored andcommitted
---
yaml --- r: 5795 b: refs/heads/master c: f2cd33d h: refs/heads/master i: 5793: 132b766 5791: 21d98f3 v: v3
1 parent 26af743 commit 1263a79

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 2094668949200aa692caa1df261cf7b1e9686b64
2+
refs/heads/master: f2cd33df72cfe9648b668d8822a785dc81bee908

trunk/src/comp/middle/gc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ type ctxt = @{mutable next_tydesc_num: uint};
1616

1717
fn mk_ctxt() -> ctxt { ret @{mutable next_tydesc_num: 0u}; }
1818

19-
fn add_global(ccx: @crate_ctxt, llval: ValueRef, name: str) -> ValueRef {
19+
fn add_global(ccx: @crate_ctxt, llval: ValueRef, name: str)
20+
-> ValueRef unsafe {
2021
let llglobal =
2122
str::as_buf(name,
2223
{|buf|
@@ -27,7 +28,8 @@ fn add_global(ccx: @crate_ctxt, llval: ValueRef, name: str) -> ValueRef {
2728
ret llglobal;
2829
}
2930

30-
fn add_gc_root(cx: @block_ctxt, llval: ValueRef, ty: ty::t) -> @block_ctxt {
31+
fn add_gc_root(cx: @block_ctxt, llval: ValueRef, ty: ty::t) ->
32+
@block_ctxt unsafe {
3133
let bcx = cx;
3234
if !type_is_gc_relevant(bcx_tcx(cx), ty) ||
3335
ty::type_has_dynamic_size(bcx_tcx(cx), ty) {

trunk/src/comp/middle/shape.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn eq_res_info(a: res_info, b: res_info) -> bool {
7272
}
7373

7474
fn mk_global(ccx: @crate_ctxt, name: str, llval: ValueRef, internal: bool) ->
75-
ValueRef {
75+
ValueRef unsafe {
7676
let llglobal =
7777
str::as_buf(name,
7878
{|buf|
@@ -245,7 +245,7 @@ fn s_float(_tcx: ty_ctxt) -> u8 {
245245
ret shape_f64; // TODO: x86-64
246246
}
247247

248-
fn mk_ctxt(llmod: ModuleRef) -> ctxt {
248+
fn mk_ctxt(llmod: ModuleRef) -> ctxt unsafe {
249249
let llshapetablesty = trans_common::T_named_struct("shapes");
250250
let llshapetables =
251251
str::as_buf("shapes",
@@ -580,7 +580,7 @@ fn gen_resource_shapes(ccx: @crate_ctxt) -> ValueRef {
580580
ret mk_global(ccx, "resource_shapes", C_struct(dtors), true);
581581
}
582582

583-
fn gen_shape_tables(ccx: @crate_ctxt) {
583+
fn gen_shape_tables(ccx: @crate_ctxt) unsafe {
584584
let lltagstable = gen_tag_shapes(ccx);
585585
let llresourcestable = gen_resource_shapes(ccx);
586586
trans_common::set_struct_body(ccx.shape_cx.llshapetablesty,

0 commit comments

Comments
 (0)