Skip to content

Commit 78ce1c8

Browse files
committed
---
yaml --- r: 13498 b: refs/heads/master c: d953462 h: refs/heads/master v: v3
1 parent 938eb0f commit 78ce1c8

File tree

10 files changed

+608
-222
lines changed

10 files changed

+608
-222
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d4b6898958c2a0a93268bbabce293f1b4353c1a0
2+
refs/heads/master: d953462d031db6c6fd632456a5533be818a0db1c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/front/intrinsic.rs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,38 @@ mod intrinsic {
5252
fn visit_leave_evec_uniq(mtbl: uint) -> bool;
5353
fn visit_enter_evec_slice(mtbl: uint) -> bool;
5454
fn visit_leave_evec_slice(mtbl: uint) -> bool;
55-
fn visit_enter_evec_fixed(mtbl: uint, sz: uint) -> bool;
56-
fn visit_leave_evec_fixed(mtbl: uint, sz: uint) -> bool;
55+
fn visit_enter_evec_fixed(mtbl: uint, n: uint,
56+
sz: uint, align: uint) -> bool;
57+
fn visit_leave_evec_fixed(mtbl: uint, n: uint,
58+
sz: uint, align: uint) -> bool;
5759

58-
fn visit_enter_rec(n_fields: uint) -> bool;
60+
fn visit_enter_rec(n_fields: uint,
61+
sz: uint, align: uint) -> bool;
5962
fn visit_enter_rec_field(mtbl: uint, i: uint,
6063
name: str/&) -> bool;
6164
fn visit_leave_rec_field(mtbl: uint, i: uint,
6265
name: str/&) -> bool;
63-
fn visit_leave_rec(n_fields: uint) -> bool;
66+
fn visit_leave_rec(n_fields: uint,
67+
sz: uint, align: uint) -> bool;
6468

65-
fn visit_enter_class(n_fields: uint) -> bool;
69+
fn visit_enter_class(n_fields: uint,
70+
sz: uint, align: uint) -> bool;
6671
fn visit_enter_class_field(mtbl: uint, i: uint,
6772
name: str/&) -> bool;
6873
fn visit_leave_class_field(mtbl: uint, i: uint,
6974
name: str/&) -> bool;
70-
fn visit_leave_class(n_fields: uint) -> bool;
75+
fn visit_leave_class(n_fields: uint,
76+
sz: uint, align: uint) -> bool;
7177

72-
fn visit_enter_tup(n_fields: uint) -> bool;
78+
fn visit_enter_tup(n_fields: uint,
79+
sz: uint, align: uint) -> bool;
7380
fn visit_enter_tup_field(i: uint) -> bool;
7481
fn visit_leave_tup_field(i: uint) -> bool;
75-
fn visit_leave_tup(n_fields: uint) -> bool;
82+
fn visit_leave_tup(n_fields: uint,
83+
sz: uint, align: uint) -> bool;
7684

77-
fn visit_enter_enum(n_variants: uint) -> bool;
85+
fn visit_enter_enum(n_variants: uint,
86+
sz: uint, align: uint) -> bool;
7887
fn visit_enter_enum_variant(variant: uint,
7988
disr_val: int,
8089
n_fields: uint,
@@ -85,7 +94,8 @@ mod intrinsic {
8594
disr_val: int,
8695
n_fields: uint,
8796
name: str/&) -> bool;
88-
fn visit_leave_enum(n_variants: uint) -> bool;
97+
fn visit_leave_enum(n_variants: uint,
98+
sz: uint, align: uint) -> bool;
8999

90100
fn visit_enter_fn(purity: uint, proto: uint,
91101
n_inputs: uint, retstyle: uint) -> bool;

trunk/src/rustc/middle/trans/native.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -812,26 +812,6 @@ fn trans_intrinsic(ccx: @crate_ctxt, decl: ValueRef, item: @ast::native_item,
812812
Store(bcx, C_uint(ccx, shape::llsize_of_real(ccx, lltp_ty)),
813813
fcx.llretptr);
814814
}
815-
"move_val" {
816-
let tp_ty = substs.tys[0];
817-
let src = {bcx: bcx,
818-
val: get_param(decl, first_real_arg + 1u),
819-
kind: owned };
820-
bcx = move_val(bcx, DROP_EXISTING,
821-
get_param(decl, first_real_arg),
822-
src,
823-
tp_ty);
824-
}
825-
"move_val_init" {
826-
let tp_ty = substs.tys[0];
827-
let src = {bcx: bcx,
828-
val: get_param(decl, first_real_arg + 1u),
829-
kind: owned };
830-
bcx = move_val(bcx, INIT,
831-
get_param(decl, first_real_arg),
832-
src,
833-
tp_ty);
834-
}
835815
"min_align_of" {
836816
let tp_ty = substs.tys[0];
837817
let lltp_ty = type_of::type_of(ccx, tp_ty);

trunk/src/rustc/middle/trans/reflect.rs

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,14 @@ impl methods for reflector {
8080
[self.c_uint(mt.mutbl as uint)] + extra);
8181
}
8282

83-
fn vstore_name_and_extra(vstore: ty::vstore,
83+
fn vstore_name_and_extra(t: ty::t,
84+
vstore: ty::vstore,
8485
f: fn(str,[ValueRef])) {
8586
alt vstore {
86-
ty::vstore_fixed(n) { f("fixed", [self.c_uint(n)]) }
87+
ty::vstore_fixed(n) {
88+
let extra = [self.c_uint(n)] + self.c_size_and_align(t);
89+
f("fixed", extra)
90+
}
8791
ty::vstore_slice(_) { f("slice", []) }
8892
ty::vstore_uniq { f("uniq", []);}
8993
ty::vstore_box { f("box", []); }
@@ -123,12 +127,12 @@ impl methods for reflector {
123127

124128
ty::ty_vec(mt) { self.bracketed_mt("vec", mt, []) }
125129
ty::ty_estr(vst) {
126-
self.vstore_name_and_extra(vst) {|name, extra|
130+
self.vstore_name_and_extra(t, vst) {|name, extra|
127131
self.visit("estr_" + name, extra)
128132
}
129133
}
130134
ty::ty_evec(mt, vst) {
131-
self.vstore_name_and_extra(vst) {|name, extra|
135+
self.vstore_name_and_extra(t, vst) {|name, extra|
132136
self.bracketed_mt("evec_" + name, mt, extra)
133137
}
134138
}
@@ -138,21 +142,25 @@ impl methods for reflector {
138142
ty::ty_rptr(_, mt) { self.bracketed_mt("rptr", mt, []) }
139143

140144
ty::ty_rec(fields) {
141-
self.visit("enter_rec", [self.c_uint(vec::len(fields))]);
145+
let extra = ([self.c_uint(vec::len(fields))]
146+
+ self.c_size_and_align(t));
147+
self.visit("enter_rec", extra);
142148
for fields.eachi {|i, field|
143149
self.bracketed_mt("rec_field", field.mt,
144150
[self.c_uint(i),
145151
self.c_slice(*field.ident)]);
146152
}
147-
self.visit("leave_rec", [self.c_uint(vec::len(fields))]);
153+
self.visit("leave_rec", extra);
148154
}
149155

150156
ty::ty_tup(tys) {
151-
self.visit("enter_tup", [self.c_uint(vec::len(tys))]);
157+
let extra = ([self.c_uint(vec::len(tys))]
158+
+ self.c_size_and_align(t));
159+
self.visit("enter_tup", extra);
152160
for tys.eachi {|i, t|
153161
self.bracketed_t("tup_field", t, [self.c_uint(i)]);
154162
}
155-
self.visit("leave_tup", [self.c_uint(vec::len(tys))]);
163+
self.visit("leave_tup", extra);
156164
}
157165

158166
// FIXME: fetch constants out of intrinsic:: for the numbers.
@@ -206,13 +214,16 @@ impl methods for reflector {
206214
let bcx = self.bcx;
207215
let tcx = bcx.ccx().tcx;
208216
let fields = ty::class_items_as_fields(tcx, did, substs);
209-
self.visit("enter_class", [self.c_uint(vec::len(fields))]);
217+
let extra = ([self.c_uint(vec::len(fields))]
218+
+ self.c_size_and_align(t));
219+
220+
self.visit("enter_class", extra);
210221
for fields.eachi {|i, field|
211222
self.bracketed_mt("class_field", field.mt,
212223
[self.c_uint(i),
213224
self.c_slice(*field.ident)]);
214225
}
215-
self.visit("leave_class", [self.c_uint(vec::len(fields))]);
226+
self.visit("leave_class", extra);
216227
}
217228

218229
// FIXME: visiting all the variants in turn is probably
@@ -223,8 +234,10 @@ impl methods for reflector {
223234
let bcx = self.bcx;
224235
let tcx = bcx.ccx().tcx;
225236
let variants = ty::substd_enum_variants(tcx, did, substs);
237+
let extra = ([self.c_uint(vec::len(variants))]
238+
+ self.c_size_and_align(t));
226239

227-
self.visit("enter_enum", [self.c_uint(vec::len(variants))]);
240+
self.visit("enter_enum", extra);
228241
for variants.eachi {|i, v|
229242
let extra = [self.c_uint(i),
230243
self.c_int(v.disr_val),
@@ -237,7 +250,7 @@ impl methods for reflector {
237250
}
238251
self.visit("leave_enum_variant", extra);
239252
}
240-
self.visit("leave_enum", [self.c_uint(vec::len(variants))]);
253+
self.visit("leave_enum", extra);
241254
}
242255

243256
// Miscallaneous extra types

trunk/src/rustc/middle/trans/type_use.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ fn type_uses_for(ccx: @crate_ctxt, fn_id: def_id, n_tps: uint)
7979
let flags = alt check *i.ident {
8080
"visit_ty" { 3u }
8181
"size_of" | "pref_align_of" | "min_align_of" |
82-
"init" | "reinterpret_cast" | "move_val" | "move_val_init" {
83-
use_repr
84-
}
82+
"init" | "reinterpret_cast" { use_repr }
8583
"get_tydesc" | "needs_drop" { use_tydesc }
8684
"forget" | "addr_of" { 0u }
8785
};

trunk/src/rustc/middle/typeck/check.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ impl methods for @fn_ctxt {
456456
none { result::err("no block is in scope here") }
457457
}
458458
}
459-
#[inline(always)]
460459
fn write_ty(node_id: ast::node_id, ty: ty::t) {
461460
#debug["write_ty(%d, %s) in fcx %s",
462461
node_id, ty_to_str(self.tcx(), ty), self.tag()];
@@ -2322,11 +2321,6 @@ fn check_intrinsic_type(ccx: @crate_ctxt, it: @ast::native_item) {
23222321
param(ccx, 1u)) }
23232322
"addr_of" { (1u, [arg(ast::by_ref, param(ccx, 0u))],
23242323
ty::mk_imm_ptr(tcx, param(ccx, 0u))) }
2325-
"move_val" | "move_val_init" {
2326-
(1u, [arg(ast::by_mutbl_ref, param(ccx, 0u)),
2327-
arg(ast::by_move, param(ccx, 0u))],
2328-
ty::mk_nil(tcx))
2329-
}
23302324
"needs_drop" { (1u, [], ty::mk_bool(tcx)) }
23312325

23322326
"visit_ty" {

trunk/src/snapshots.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
S 2012-06-14 623d825
2-
macos-x86_64 ab8d81cf3f538cd259cbec2be9615688482f9bc1
3-
macos-i386 1ec2b3425fab510684858bb7b28f2c2ad474d5af
4-
freebsd-x86_64 f5d4c97cc8900c3eb24584ec3234abd7884b9598
5-
linux-x86_64 dc6a402bc4b25510af6166c62cdb9f77a62b3e28
6-
linux-i386 c70b86e8065b9a41d71876a05940f1a07da26d46
7-
winnt-i386 b576dd7db9c1b4fcc7c2363c5f6856d021945402
8-
91
S 2012-06-12 11e30b2
102
macos-x86_64 b6e031112f4619dcd5aa708cf9ea9871a7b11595
113
macos-i386 497875c1fb6289c704485b8bf2e3c40c7918bf4e

trunk/src/test/run-pass/intrinsic-move-val.rs

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)