Skip to content

Commit f3bf66c

Browse files
committed
---
yaml --- r: 3010 b: refs/heads/master c: 60706f1 h: refs/heads/master v: v3
1 parent 4923492 commit f3bf66c

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
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: ab3635eebef2b8cf0e19cdbc5b4e8dd7a49a4658
2+
refs/heads/master: 60706f1e3559a1164c96378172bc8839c9870f51

trunk/src/comp/front/creader.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ fn parse_ty(@pstate st, str_def sd) -> ty::t {
159159
}
160160
case ('c') { ret ty::mk_char(st.tcx); }
161161
case ('s') { ret ty::mk_str(st.tcx); }
162+
case ('S') { ret ty::mk_istr(st.tcx); }
162163
case ('t') {
163164
assert (next(st) as char == '[');
164165
auto def = parse_def(st, sd);
@@ -173,6 +174,7 @@ fn parse_ty(@pstate st, str_def sd) -> ty::t {
173174
case ('@') { ret ty::mk_box(st.tcx, parse_mt(st, sd)); }
174175
case ('*') { ret ty::mk_ptr(st.tcx, parse_mt(st, sd)); }
175176
case ('V') { ret ty::mk_vec(st.tcx, parse_mt(st, sd)); }
177+
case ('I') { ret ty::mk_ivec(st.tcx, parse_mt(st, sd)); }
176178
case ('a') { ret ty::mk_task(st.tcx); }
177179
case ('P') { ret ty::mk_port(st.tcx, parse_ty(st, sd)); }
178180
case ('C') { ret ty::mk_chan(st.tcx, parse_ty(st, sd)); }

trunk/src/comp/middle/metadata.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ mod Encode {
174174
}
175175
case (ty::ty_char) {w.write_char('c');}
176176
case (ty::ty_str) {w.write_char('s');}
177+
case (ty::ty_istr) {w.write_char('S');}
177178
case (ty::ty_tag(?def,?tys)) {
178179
w.write_str("t[");
179180
w.write_str(cx.ds(def));
@@ -186,6 +187,7 @@ mod Encode {
186187
case (ty::ty_box(?mt)) {w.write_char('@'); enc_mt(w, cx, mt); }
187188
case (ty::ty_ptr(?mt)) {w.write_char('*'); enc_mt(w, cx, mt); }
188189
case (ty::ty_vec(?mt)) {w.write_char('V'); enc_mt(w, cx, mt); }
190+
case (ty::ty_ivec(?mt)) {w.write_char('I'); enc_mt(w, cx, mt); }
189191
case (ty::ty_port(?t)) {w.write_char('P'); enc_ty(w, cx, t); }
190192
case (ty::ty_chan(?t)) {w.write_char('C'); enc_ty(w, cx, t); }
191193
case (ty::ty_tup(?mts)) {

trunk/src/comp/pretty/ppaux.rs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,24 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
9696
auto s = "";
9797

9898
alt (struct(cx, typ)) {
99-
case (ty_native) { s += "native"; }
100-
case (ty_nil) { s += "()"; }
101-
case (ty_bot) { s += "_|_"; }
102-
case (ty_bool) { s += "bool"; }
103-
case (ty_int) { s += "int"; }
104-
case (ty_float) { s += "float"; }
105-
case (ty_uint) { s += "uint"; }
99+
case (ty_native) { s += "native"; }
100+
case (ty_nil) { s += "()"; }
101+
case (ty_bot) { s += "_|_"; }
102+
case (ty_bool) { s += "bool"; }
103+
case (ty_int) { s += "int"; }
104+
case (ty_float) { s += "float"; }
105+
case (ty_uint) { s += "uint"; }
106106
case (ty_machine(?tm)) { s += common::ty_mach_to_str(tm); }
107-
case (ty_char) { s += "char"; }
108-
case (ty_str) { s += "str"; }
109-
case (ty_box(?tm)) { s += "@" + mt_to_str(cx, tm); }
110-
case (ty_vec(?tm)) { s += "vec[" + mt_to_str(cx, tm) + "]"; }
111-
case (ty_port(?t)) { s += "port[" + ty_to_str(cx, t) + "]"; }
112-
case (ty_chan(?t)) { s += "chan[" + ty_to_str(cx, t) + "]"; }
113-
case (ty_type) { s += "type"; }
114-
case (ty_task) { s += "task"; }
107+
case (ty_char) { s += "char"; }
108+
case (ty_str) { s += "str"; }
109+
case (ty_istr) { s += "istr"; }
110+
case (ty_box(?tm)) { s += "@" + mt_to_str(cx, tm); }
111+
case (ty_vec(?tm)) { s += "vec[" + mt_to_str(cx, tm) + "]"; }
112+
case (ty_ivec(?tm)) { s += "ivec[" + mt_to_str(cx, tm) + "]"; }
113+
case (ty_port(?t)) { s += "port[" + ty_to_str(cx, t) + "]"; }
114+
case (ty_chan(?t)) { s += "chan[" + ty_to_str(cx, t) + "]"; }
115+
case (ty_type) { s += "type"; }
116+
case (ty_task) { s += "task"; }
115117

116118
case (ty_tup(?elems)) {
117119
auto f = bind mt_to_str(cx, _);

0 commit comments

Comments
 (0)