Skip to content

Commit 4db6ca3

Browse files
committed
---
yaml --- r: 60534 b: refs/heads/auto c: 17dfebf h: refs/heads/master v: v3
1 parent 09aaa33 commit 4db6ca3

File tree

5 files changed

+23
-32
lines changed

5 files changed

+23
-32
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: f323b0c8bac704366eb307437faea231fb73b8d1
17+
refs/heads/auto: 17dfebf883053ea84ef3fcf6b928d4a210c1012e
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/hash.rs

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,16 @@ pub trait Streaming {
7676
fn reset(&mut self);
7777
}
7878

79+
fn transmute_for_stage0<'a>(bytes: &'a [u8]) -> &'a [u8] {
80+
bytes
81+
}
82+
7983
impl<A:IterBytes> Hash for A {
8084
#[inline(always)]
8185
fn hash_keyed(&self, k0: u64, k1: u64) -> u64 {
8286
let mut s = State::new(k0, k1);
8387
for self.iter_bytes(true) |bytes| {
84-
s.input(bytes);
88+
s.input(transmute_for_stage0(bytes));
8589
}
8690
s.result_u64()
8791
}
@@ -91,10 +95,10 @@ fn hash_keyed_2<A: IterBytes,
9195
B: IterBytes>(a: &A, b: &B, k0: u64, k1: u64) -> u64 {
9296
let mut s = State::new(k0, k1);
9397
for a.iter_bytes(true) |bytes| {
94-
s.input(bytes);
98+
s.input(transmute_for_stage0(bytes));
9599
}
96100
for b.iter_bytes(true) |bytes| {
97-
s.input(bytes);
101+
s.input(transmute_for_stage0(bytes));
98102
}
99103
s.result_u64()
100104
}
@@ -104,13 +108,13 @@ fn hash_keyed_3<A: IterBytes,
104108
C: IterBytes>(a: &A, b: &B, c: &C, k0: u64, k1: u64) -> u64 {
105109
let mut s = State::new(k0, k1);
106110
for a.iter_bytes(true) |bytes| {
107-
s.input(bytes);
111+
s.input(transmute_for_stage0(bytes));
108112
}
109113
for b.iter_bytes(true) |bytes| {
110-
s.input(bytes);
114+
s.input(transmute_for_stage0(bytes));
111115
}
112116
for c.iter_bytes(true) |bytes| {
113-
s.input(bytes);
117+
s.input(transmute_for_stage0(bytes));
114118
}
115119
s.result_u64()
116120
}
@@ -128,16 +132,16 @@ fn hash_keyed_4<A: IterBytes,
128132
-> u64 {
129133
let mut s = State::new(k0, k1);
130134
for a.iter_bytes(true) |bytes| {
131-
s.input(bytes);
135+
s.input(transmute_for_stage0(bytes));
132136
}
133137
for b.iter_bytes(true) |bytes| {
134-
s.input(bytes);
138+
s.input(transmute_for_stage0(bytes));
135139
}
136140
for c.iter_bytes(true) |bytes| {
137-
s.input(bytes);
141+
s.input(transmute_for_stage0(bytes));
138142
}
139143
for d.iter_bytes(true) |bytes| {
140-
s.input(bytes);
144+
s.input(transmute_for_stage0(bytes));
141145
}
142146
s.result_u64()
143147
}
@@ -157,19 +161,19 @@ fn hash_keyed_5<A: IterBytes,
157161
-> u64 {
158162
let mut s = State::new(k0, k1);
159163
for a.iter_bytes(true) |bytes| {
160-
s.input(bytes);
164+
s.input(transmute_for_stage0(bytes));
161165
}
162166
for b.iter_bytes(true) |bytes| {
163-
s.input(bytes);
167+
s.input(transmute_for_stage0(bytes));
164168
}
165169
for c.iter_bytes(true) |bytes| {
166-
s.input(bytes);
170+
s.input(transmute_for_stage0(bytes));
167171
}
168172
for d.iter_bytes(true) |bytes| {
169-
s.input(bytes);
173+
s.input(transmute_for_stage0(bytes));
170174
}
171175
for e.iter_bytes(true) |bytes| {
172-
s.input(bytes);
176+
s.input(transmute_for_stage0(bytes));
173177
}
174178
s.result_u64()
175179
}

branches/auto/src/librustc/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ pub fn compile_rest(sess: Session,
239239
let (llmod, link_meta) = {
240240

241241
let ty_cx = ty::mk_ctxt(sess, def_map, ast_map, freevars,
242-
region_map, rp_set, lang_items, crate);
242+
region_map, rp_set, lang_items);
243243

244244
// passes are timed inside typeck
245245
let (method_map, vtable_map) = typeck::check_crate(

branches/auto/src/librustc/middle/ty.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ struct ctxt_ {
232232
diag: @syntax::diagnostic::span_handler,
233233
interner: @mut HashMap<intern_key, ~t_box_>,
234234
next_id: @mut uint,
235-
legacy_modes: bool,
236235
cstore: @mut metadata::cstore::CStore,
237236
sess: session::Session,
238237
def_map: resolve::DefMap,
@@ -906,24 +905,12 @@ pub fn mk_ctxt(s: session::Session,
906905
freevars: freevars::freevar_map,
907906
region_maps: @mut middle::region::RegionMaps,
908907
region_paramd_items: middle::region::region_paramd_items,
909-
lang_items: middle::lang_items::LanguageItems,
910-
crate: @ast::crate)
908+
lang_items: middle::lang_items::LanguageItems)
911909
-> ctxt {
912-
let mut legacy_modes = false;
913-
for crate.node.attrs.each |attribute| {
914-
match attribute.node.value.node {
915-
ast::meta_word(w) if *w == ~"legacy_modes" => {
916-
legacy_modes = true;
917-
}
918-
_ => {}
919-
}
920-
}
921-
922910
@ctxt_ {
923911
diag: s.diagnostic(),
924912
interner: @mut HashMap::new(),
925913
next_id: @mut primitives::LAST_PRIMITIVE_ID,
926-
legacy_modes: legacy_modes,
927914
cstore: s.cstore,
928915
sess: s,
929916
def_map: dm,

branches/auto/src/librustc/middle/typeck/infer/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn setup_env(test_name: &str, source_string: &str) -> Env {
6767
cfg, parse_sess);
6868

6969
let tcx = ty::mk_ctxt(sess, dm, amap, freevars, region_map,
70-
region_paramd_items, lang_items, crate);
70+
region_paramd_items, lang_items);
7171

7272
let infcx = infer::new_infer_ctxt(tcx);
7373

0 commit comments

Comments
 (0)