rust/src/libsyntax/ext
Huon Wilson 8407ec9fed syntax: make #[deriving(TotalOrd)] lazy.
Previously it would call:

  f(sf1.cmp(&of1), f(sf2.cmp(&of2), ...))

(where s/of1 = 'self/other field 1', and f was
std::cmp::lexical_ordering)

This meant that every .cmp subcall got evaluated when calling a derived
TotalOrd.cmp.

This corrects this to use

   let test = sf1.cmp(&of1);
   if test == Equal {
      let test = sf2.cmp(&of2);
      if test == Equal {
        // ...
      } else {
        test
      }
   } else {
     test
   }

This gives a lexical ordering by short-circuiting on the first comparison
that is not Equal.
2013-08-04 19:46:52 +10:00
..
deriving syntax: make #[deriving(TotalOrd)] lazy. 2013-08-04 19:46:52 +10:00
tt remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
asm.rs make in and foreach get treated as keywords 2013-08-01 00:21:13 -04:00
auto_encode.rs syntax: modernise attribute handling in syntax::attr. 2013-07-20 01:06:16 +10:00
base.rs auto merge of #8188 : huonw/rust/cfg-macro, r=pcwalton 2013-08-02 03:52:51 -07:00
build.rs Replace 'blk' -> 'block' in AstBuilder. 2013-08-02 09:12:05 +09:00
bytes.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
cfg.rs syntax: implement cfg!() which evaluates to true/false where #[cfg] would keep/remove. 2013-08-01 23:03:03 +10:00
concat_idents.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
env.rs great renaming propagation: syntax 2013-06-25 16:15:07 -04:00
expand.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
fmt.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
log_syntax.rs libsyntax: Remove some multi-gigabyte clones that were preventing bootstrapping on Windows. 2013-07-17 14:57:56 -07:00
quote.rs remove obsolete foreach keyword 2013-08-03 22:48:02 -04:00
source_util.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
trace_macros.rs librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00