1. 07 7月, 2011 11 次提交
  2. 06 7月, 2011 1 次提交
  3. 05 7月, 2011 1 次提交
    • M
      Move everything syntax-related to syntax/, break deps on rest of compiler · 6fd6fdea
      Marijn Haverbeke 提交于
      src/comp/syntax is currently just a sub-module of rustc, but it will,
      in the near future, be its own crate. This includes:
      
       - The AST data structure
       - The parser
       - The pretty-printer
       - Visit, walk, and fold
       - The syntax extension system
       - Some utility stuff that should be in the stdlib*
      
      *) Stdlib extensions currently require a snapshot before they can be
         used, and the win build is very broken right now. This is temporary
         and will be cleaned up when one of those problems goes away.
      
      A lot of code was moved by this patch, mostly towards a more organized
      layout. Some package paths did get longer, and I guess the new layout
      will take some getting used to. Sorry about that!
      
      Please try not to re-introduce any dependencies in syntax/ on any of
      the other src/comp/ subdirs.
      6fd6fdea
  4. 01 7月, 2011 2 次提交
    • T
      Kill unused variables · d8db9a0f
      Tim Chevalier 提交于
      d8db9a0f
    • T
      Warn for unused variables · 4519f548
      Tim Chevalier 提交于
      Modify typestate to check for unused variables and emit warnings
      where relevant. This exposed a (previously harmless) bug in
      collect_locals where outer functions had bit-vector entries
      for init constraints for variables declared in their inner
      nested functions. Fixing that required changing collect_locals to
      use visit instead of walk -- probably a good thing anyway.
      4519f548
  5. 30 6月, 2011 1 次提交
  6. 28 6月, 2011 1 次提交
  7. 26 6月, 2011 1 次提交
  8. 25 6月, 2011 2 次提交
  9. 23 6月, 2011 2 次提交
    • T
      Compute typestate properly for move · 9a48bd2f
      Tim Chevalier 提交于
      typestate now drops constraints correctly in the post-state of
      a move expression or a declaration whose op is a move. It doesn't
      yet drop constraints mentioning variables that get updated.
      
      To do this, I had to change typestate to use trit-vectors instead
      of bit-vectors, because for every constraint, there are three
      possible values: known-to-be-false (e.g. after x <- y, init(y) is
      known-to-be-false), known-to-be-true, and unknown. Before, we
      conflated known-to-be-false with unknown. But move requires them
      to be treated differently. Consider:
      
      (program a)
      (a1) x = 1;
      (a2) y <- x;
      (a3) log x;
      
      (program b)
      (b1) x = 1;
      (b2) y <- z;
      (b3) log x;
      
      With only two values, the postcondition of statement a2 for
      constraint init(x) is the same as that of b2: 0. But in (a2)'s
      postcondition, init(x) *must* be false, but in (b2)'s condition,
      it's just whatever it was in the postcondition of the preceding statement.
      9a48bd2f
    • P
      Fix bug: globbed imports were importing everything visible from the other · b4c3b83f
      Paul Stansifer 提交于
      module, not just everything exported.
      b4c3b83f
  10. 22 6月, 2011 2 次提交
    • T
      Serialize constraints in types (literal arguments still not supported) · 7fb35ecf
      Tim Chevalier 提交于
      This involved, in part, changing the ast::def type so that a def_fn
      has a "purity" field. This lets the typechecker determine whether
      functions defined in other crates are pure.
      
      It also required updating some error messages in tests. As a test
      for cross-crate constrained functions, I added a safe_slice function
      to std::str (slice(), with one of the asserts replaced with a
      function precondition) and some test cases (various versions of
      fn-constraint.rs) that call it. Also, I changed "fn" to "pred" for
      some of the boolean functions in std::uint.
      7fb35ecf
    • M
      Move expr ids into the expr record type · c34e9b33
      Marijn Haverbeke 提交于
      This simplifies the tag variants a bit and makes expr_node_id
      obsolete.
      c34e9b33
  11. 21 6月, 2011 1 次提交
    • M
      Get rid of def_ids and anns in AST nodes, use single node_id · 75681f9a
      Marijn Haverbeke 提交于
      This reduces some redundancy in the AST data structures and cruft in
      the code that works with them. To get a def_id from a node_id, apply
      ast::local_def, which adds the local crate_num to the given node_id.
      Most code only deals with crate-local node_ids, and won't have to
      create def_ids at all.
      75681f9a
  12. 20 6月, 2011 1 次提交
  13. 19 6月, 2011 2 次提交
  14. 18 6月, 2011 1 次提交
    • T
      Restructure the "checking" pass in typestate · 7fc89f57
      Tim Chevalier 提交于
      I noticed that typestate was being lazier than it should be,
      because it was only checking typestate for statements and
      top-level expression (that is, the expression in a stmt_expr, but
      not any subexpressions). So I rewrote the checks in tstate/ck.rs
      to use walk, which exposed a few bugs in typestate that I fixed.
      
      Also added some more test cases for if-check.
      7fc89f57
  15. 17 6月, 2011 1 次提交
  16. 16 6月, 2011 2 次提交
  17. 15 6月, 2011 1 次提交
  18. 14 6月, 2011 1 次提交
  19. 11 6月, 2011 1 次提交
  20. 10 6月, 2011 2 次提交
  21. 08 6月, 2011 1 次提交
  22. 02 6月, 2011 1 次提交
  23. 31 5月, 2011 1 次提交