Skip to content

Commit 8cc0ee4

Browse files
committed
---
yaml --- r: 79785 b: refs/heads/try c: 594531a h: refs/heads/master i: 79783: ac35704 v: v3
1 parent caf866f commit 8cc0ee4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+651
-1701
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: ba9fa89bfb4aae53db93e9ecac31807af96356fc
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 54ae2800ffb30513f89ce13d27ac3c8d095d98ac
5-
refs/heads/try: 75afcffc2ffdbac1d0a837d8407ae5720dce9631
5+
refs/heads/try: 594531a1c8d6cf850481848790fc25314ad367ec
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ do
823823
index2="${CFG_SRC_DIR}src/llvm/.git/index"
824824
for index in ${index1} ${index2}
825825
do
826-
config_status="${LLVM_BUILD_DIR}/config.status"
826+
config_status="${CFG_BUILD_DIR}llvm/$t/config.status"
827827
if test -e ${index} -a \
828828
-e ${config_status} -a \
829829
${config_status} -nt ${index}

branches/try/mk/rt.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
176176

177177
export PYTHONPATH := $(PYTHONPATH):$$(S)src/gyp/pylib
178178

179-
$$(LIBUV_MAKEFILE_$(1)_$(2)):
179+
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_DEPS)
180180
(cd $(S)src/libuv/ && \
181-
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
181+
./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
182182
-Goutput_dir=$$(@D) --generator-output $$(@D))
183183

184184
# XXX: Shouldn't need platform-specific conditions here

branches/try/src/libextra/crypto/sha2.rs

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,28 @@ use cryptoutil::{write_u64_be, write_u32_be, read_u64v_be, read_u32v_be, add_byt
1414
add_bytes_to_bits_tuple, FixedBuffer, FixedBuffer128, FixedBuffer64, StandardPadding};
1515
use digest::Digest;
1616

17-
// A structure that represents that state of a digest computation for the SHA-2 512 family
18-
// of digest functions
17+
18+
// Sha-512 and Sha-256 use basically the same calculations which are implemented by these macros.
19+
// Inlining the calculations seems to result in better generated code.
20+
macro_rules! schedule_round( ($t:expr) => (
21+
W[$t] = sigma1(W[$t - 2]) + W[$t - 7] + sigma0(W[$t - 15]) + W[$t - 16];
22+
)
23+
)
24+
25+
macro_rules! sha2_round(
26+
($A:ident, $B:ident, $C:ident, $D:ident,
27+
$E:ident, $F:ident, $G:ident, $H:ident, $K:ident, $t:expr) => (
28+
{
29+
$H += sum1($E) + ch($E, $F, $G) + $K[$t] + W[$t];
30+
$D += $H;
31+
$H += sum0($A) + maj($A, $B, $C);
32+
}
33+
)
34+
)
35+
36+
37+
// A structure that represents that state of a digest computation for the SHA-2 512 family of digest
38+
// functions
1939
struct Engine512State {
2040
H0: u64,
2141
H1: u64,
@@ -88,25 +108,6 @@ impl Engine512State {
88108

89109
let mut W = [0u64, ..80];
90110

91-
// Sha-512 and Sha-256 use basically the same calculations which are implemented by
92-
// these macros. Inlining the calculations seems to result in better generated code.
93-
macro_rules! schedule_round( ($t:expr) => (
94-
W[$t] = sigma1(W[$t - 2]) + W[$t - 7] + sigma0(W[$t - 15]) + W[$t - 16];
95-
)
96-
)
97-
98-
macro_rules! sha2_round(
99-
($A:ident, $B:ident, $C:ident, $D:ident,
100-
$E:ident, $F:ident, $G:ident, $H:ident, $K:ident, $t:expr) => (
101-
{
102-
$H += sum1($E) + ch($E, $F, $G) + $K[$t] + W[$t];
103-
$D += $H;
104-
$H += sum0($A) + maj($A, $B, $C);
105-
}
106-
)
107-
)
108-
109-
110111
read_u64v_be(W.mut_slice(0, 16), data);
111112

112113
// Putting the message schedule inside the same loop as the round calculations allows for
@@ -504,25 +505,6 @@ impl Engine256State {
504505

505506
let mut W = [0u32, ..64];
506507

507-
// Sha-512 and Sha-256 use basically the same calculations which are implemented
508-
// by these macros. Inlining the calculations seems to result in better generated code.
509-
macro_rules! schedule_round( ($t:expr) => (
510-
W[$t] = sigma1(W[$t - 2]) + W[$t - 7] + sigma0(W[$t - 15]) + W[$t - 16];
511-
)
512-
)
513-
514-
macro_rules! sha2_round(
515-
($A:ident, $B:ident, $C:ident, $D:ident,
516-
$E:ident, $F:ident, $G:ident, $H:ident, $K:ident, $t:expr) => (
517-
{
518-
$H += sum1($E) + ch($E, $F, $G) + $K[$t] + W[$t];
519-
$D += $H;
520-
$H += sum0($A) + maj($A, $B, $C);
521-
}
522-
)
523-
)
524-
525-
526508
read_u32v_be(W.mut_slice(0, 16), data);
527509

528510
// Putting the message schedule inside the same loop as the round calculations allows for

branches/try/src/libextra/glob.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ impl Pattern {
304304
&& is_sep(prev_char.unwrap_or_default('/')))
305305
};
306306
307-
for (ti, token) in self.tokens.slice_from(i).iter().enumerate() {
308-
match *token {
307+
for ti in range(i, self.tokens.len()) {
308+
match self.tokens[ti] {
309309
AnySequence => {
310310
loop {
311-
match self.matches_from(prev_char, file, i + ti + 1, options) {
311+
match self.matches_from(prev_char, file, ti + 1, options) {
312312
SubPatternDoesntMatch => (), // keep trying
313313
m => return m,
314314
}
@@ -331,7 +331,7 @@ impl Pattern {
331331
}
332332
333333
let (c, next) = file.slice_shift_char();
334-
let matches = match *token {
334+
let matches = match self.tokens[ti] {
335335
AnyChar => {
336336
!require_literal(c)
337337
}

branches/try/src/libextra/time.rs

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -321,33 +321,6 @@ fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
321321
Some((value, pos))
322322
}
323323

324-
fn match_fractional_seconds(ss: &str, pos: uint) -> (i32, uint) {
325-
let len = ss.len();
326-
let mut value = 0_i32;
327-
let mut multiplier = NSEC_PER_SEC / 10;
328-
let mut pos = pos;
329-
330-
loop {
331-
if pos >= len {
332-
break;
333-
}
334-
let range = ss.char_range_at(pos);
335-
336-
match range.ch {
337-
'0' .. '9' => {
338-
pos = range.next;
339-
// This will drop digits after the nanoseconds place
340-
let digit = range.ch as i32 - '0' as i32;
341-
value += digit * multiplier;
342-
multiplier /= 10;
343-
}
344-
_ => break
345-
}
346-
}
347-
348-
(value, pos)
349-
}
350-
351324
fn match_digits_in_range(ss: &str, pos: uint, digits: uint, ws: bool,
352325
min: i32, max: i32) -> Option<(i32, uint)> {
353326
match match_digits(ss, pos, digits, ws) {
@@ -468,11 +441,6 @@ fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
468441
Some(item) => { let (v, pos) = item; tm.tm_mday = v; Ok(pos) }
469442
None => Err(~"Invalid day of the month")
470443
},
471-
'f' => {
472-
let (val, pos) = match_fractional_seconds(s, pos);
473-
tm.tm_nsec = val;
474-
Ok(pos)
475-
}
476444
'F' => {
477445
parse_type(s, pos, 'Y', &mut *tm)
478446
.chain(|pos| parse_char(s, pos, '-'))
@@ -805,7 +773,6 @@ fn do_strftime(format: &str, tm: &Tm) -> ~str {
805773
}
806774
'd' => fmt!("%02d", tm.tm_mday as int),
807775
'e' => fmt!("%2d", tm.tm_mday as int),
808-
'f' => fmt!("%09d", tm.tm_nsec as int),
809776
'F' => {
810777
fmt!("%s-%s-%s",
811778
parse_type('Y', tm),
@@ -1044,12 +1011,12 @@ mod tests {
10441011
Err(_) => ()
10451012
}
10461013
1047-
let format = "%a %b %e %T.%f %Y";
1014+
let format = "%a %b %e %T %Y";
10481015
assert_eq!(strptime("", format), Err(~"Invalid time"));
10491016
assert!(strptime("Fri Feb 13 15:31:30", format)
10501017
== Err(~"Invalid time"));
10511018
1052-
match strptime("Fri Feb 13 15:31:30.01234 2009", format) {
1019+
match strptime("Fri Feb 13 15:31:30 2009", format) {
10531020
Err(e) => fail!(e),
10541021
Ok(ref tm) => {
10551022
assert!(tm.tm_sec == 30_i32);
@@ -1063,7 +1030,7 @@ mod tests {
10631030
assert!(tm.tm_isdst == 0_i32);
10641031
assert!(tm.tm_gmtoff == 0_i32);
10651032
assert!(tm.tm_zone == ~"");
1066-
assert!(tm.tm_nsec == 12340000_i32);
1033+
assert!(tm.tm_nsec == 0_i32);
10671034
}
10681035
}
10691036
@@ -1220,7 +1187,6 @@ mod tests {
12201187
assert_eq!(local.strftime("%D"), ~"02/13/09");
12211188
assert_eq!(local.strftime("%d"), ~"13");
12221189
assert_eq!(local.strftime("%e"), ~"13");
1223-
assert_eq!(local.strftime("%f"), ~"000054321");
12241190
assert_eq!(local.strftime("%F"), ~"2009-02-13");
12251191
// assert!(local.strftime("%G") == "2009");
12261192
// assert!(local.strftime("%g") == "09");

branches/try/src/librustc/middle/borrowck/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ impl BorrowckCtxt {
788788
match fname {
789789
mc::NamedField(ref fname) => {
790790
out.push_char('.');
791-
out.push_str(token::interner_get(*fname));
791+
out.push_str(token::ident_to_str(fname));
792792
}
793793
mc::PositionalField(idx) => {
794794
out.push_char('#'); // invent a notation here

branches/try/src/librustc/middle/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn find_entry_point(session: Session, crate: &Crate, ast_map: ast_map::map)
8181
fn find_item(item: @item, ctxt: @mut EntryContext, visitor: &mut EntryVisitor) {
8282
match item.node {
8383
item_fn(*) => {
84-
if item.ident.name == special_idents::main.name {
84+
if item.ident == special_idents::main {
8585
match ctxt.ast_map.find(&item.id) {
8686
Some(&ast_map::node_item(_, path)) => {
8787
if path.len() == 0 {

branches/try/src/librustc/middle/mem_categorization.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ use syntax::ast::{MutImmutable, MutMutable};
5656
use syntax::ast;
5757
use syntax::codemap::Span;
5858
use syntax::print::pprust;
59-
use syntax::parse::token;
6059

6160
#[deriving(Eq)]
6261
pub enum categorization {
@@ -100,7 +99,7 @@ pub enum InteriorKind {
10099

101100
#[deriving(Eq, IterBytes)]
102101
pub enum FieldName {
103-
NamedField(ast::Name),
102+
NamedField(ast::Ident),
104103
PositionalField(uint)
105104
}
106105

@@ -620,7 +619,7 @@ impl mem_categorization_ctxt {
620619
@cmt_ {
621620
id: node.id(),
622621
span: node.span(),
623-
cat: cat_interior(base_cmt, InteriorField(NamedField(f_name.name))),
622+
cat: cat_interior(base_cmt, InteriorField(NamedField(f_name))),
624623
mutbl: base_cmt.mutbl.inherit(),
625624
ty: f_ty
626625
}
@@ -1225,9 +1224,9 @@ pub fn ptr_sigil(ptr: PointerKind) -> ~str {
12251224
}
12261225
12271226
impl Repr for InteriorKind {
1228-
fn repr(&self, _tcx: ty::ctxt) -> ~str {
1227+
fn repr(&self, tcx: ty::ctxt) -> ~str {
12291228
match *self {
1230-
InteriorField(NamedField(fld)) => token::interner_get(fld).to_owned(),
1229+
InteriorField(NamedField(fld)) => tcx.sess.str_of(fld).to_owned(),
12311230
InteriorField(PositionalField(i)) => fmt!("#%?", i),
12321231
InteriorElement(_) => ~"[]",
12331232
}

branches/try/src/librustc/middle/moves.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl VisitContext {
429429
// specified and (2) have a type that
430430
// moves-by-default:
431431
let consume_with = with_fields.iter().any(|tf| {
432-
!fields.iter().any(|f| f.ident.name == tf.ident.name) &&
432+
!fields.iter().any(|f| f.ident == tf.ident) &&
433433
ty::type_moves_by_default(self.tcx, tf.mt.ty)
434434
});
435435

branches/try/src/librustc/middle/privacy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl PrivacyVisitor {
206206
fn check_field(&mut self, span: Span, id: ast::DefId, ident: ast::Ident) {
207207
let fields = ty::lookup_struct_fields(self.tcx, id);
208208
for field in fields.iter() {
209-
if field.ident.name != ident.name { loop; }
209+
if field.ident != ident { loop; }
210210
if field.vis == private {
211211
self.tcx.sess.span_err(span, fmt!("field `%s` is private",
212212
token::ident_to_str(&ident)));

0 commit comments

Comments
 (0)