Skip to content

Commit 54945d6

Browse files
committed
---
yaml --- r: 937 b: refs/heads/master c: c262543 h: refs/heads/master i: 935: c416339 v: v3
1 parent 689497b commit 54945d6

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
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: 1090c5e69cc10f8d7e57c4790461046de068f7aa
2+
refs/heads/master: c262543d3b353c46611059b70ee7ee3771b5df14

trunk/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ TEST_XFAILS_SELF := $(filter-out \
522522
arith-2.rs \
523523
bool-not.rs \
524524
char.rs \
525+
complex.rs \
525526
dead-code-one-arm-if.rs \
526527
deep.rs \
527528
div-mod.rs \

trunk/src/comp/middle/trans.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,16 @@ fn T_array(TypeRef t, uint n) -> TypeRef {
196196
ret llvm.LLVMArrayType(t, n);
197197
}
198198

199-
fn T_vec(TypeRef t, uint n) -> TypeRef {
200-
ret T_struct(vec(T_int(), // Refcount
201-
T_int(), // Alloc
202-
T_int(), // Fill
203-
T_array(t, n) // Body elements
199+
fn T_vec(TypeRef t) -> TypeRef {
200+
ret T_struct(vec(T_int(), // Refcount
201+
T_int(), // Alloc
202+
T_int(), // Fill
203+
T_array(t, 0u) // Body elements
204204
));
205205
}
206206

207-
fn T_str(uint n) -> TypeRef {
208-
ret T_vec(T_i8(), n);
207+
fn T_str() -> TypeRef {
208+
ret T_vec(T_i8());
209209
}
210210

211211
fn T_box(TypeRef t) -> TypeRef {
@@ -265,12 +265,12 @@ fn type_of_inner(@crate_ctxt cx, @typeck.ty t) -> TypeRef {
265265
}
266266
}
267267
case (typeck.ty_char) { ret T_char(); }
268-
case (typeck.ty_str) { ret T_str(0u); }
268+
case (typeck.ty_str) { ret T_ptr(T_str()); }
269269
case (typeck.ty_box(?t)) {
270270
ret T_ptr(T_box(type_of(cx, t)));
271271
}
272272
case (typeck.ty_vec(?t)) {
273-
ret T_ptr(T_vec(type_of(cx, t), 0u));
273+
ret T_ptr(T_vec(type_of(cx, t)));
274274
}
275275
case (typeck.ty_tup(?elts)) {
276276
let vec[TypeRef] tys = vec();
@@ -544,7 +544,7 @@ impure fn trans_lit(@block_ctxt cx, &ast.lit lit) -> result {
544544
vec(p2i(C_str(cx.fcx.ccx, s)),
545545
C_int(len)));
546546
sub.val = sub.bcx.build.IntToPtr(sub.val,
547-
T_ptr(T_str(len as uint)));
547+
T_ptr(T_str()));
548548
cx.cleanups += vec(clean(bind trans_drop_str(_, sub.val)));
549549
ret sub;
550550
}

0 commit comments

Comments
 (0)