1. 11 5月, 2011 1 次提交
  2. 10 5月, 2011 1 次提交
  3. 07 5月, 2011 1 次提交
  4. 06 5月, 2011 1 次提交
  5. 29 4月, 2011 3 次提交
    • T
      Fixed bug in typeck that wasn't filling in anns for stmts · 707cd028
      Tim Chevalier 提交于
      (needed for typestate_check).
      
      Also changed a (log; fail) to (log_err; fail) in typestate_check,
      and added some more logging funs in util.common.
      707cd028
    • T
      Support all expression forms in typestate · 0190ebfe
      Tim Chevalier 提交于
      Added support for self_method, cont, chan, port, recv, send, be,
      do_while, spawn, and ext; handled break and cont correctly.
      (However, there are no non-xfailed test cases for ext or spawn in
      stage0 currently.)
      
      Although the standard library compiles and all test cases pass with
      typestate enabled, I left typestate checking disabled as rustc
      terminates abnormally when building the standard library if so,
      even though it does generate code correctly.
      0190ebfe
    • T
      Further work on typestate_check · 7c4f8cb4
      Tim Chevalier 提交于
      Lots of work on typestate_check, seems to get a lot of the way
      through checking the standard library.
      
      * Added for, for_each, assign_op, bind, cast, put, check, break,
      and cont. (I'm not sure break and cont are actually handled correctly.)
      
      * Fixed side-effect bug in seq_preconds so that unioning the
      preconditions of a sequence of statements or expressions
      is handled correctly.
      
      * Pass poststate correctly through a stmt_decl.
      
      * Handle expr_ret and expr_fail properly (after execution of a ret
      or fail, everything is true -- this is needed to handle ifs and alts
      where one branch is a ret or fail)
      
      * Fixed bug in set_prestate_ann where a thing that needed to be
      mutated wasn't getting passed as an alias
      
      * Fixed bug in how expr_alt was treated (zero is not the identity
      for intersect, who knew, right?)
      
      * Update logging to reflect log_err vs. log
      
      * Fixed find_locals so as to return all local decls and exclude
      function arguments.
      
      * Make union_postconds work on an empty vector (needed to handle
      empty blocks correctly)
      
      * Added _vec.cat_options, which takes a list of option[T] to a list
      of T, ignoring any Nones
      
      * Added two test cases.
      7c4f8cb4
  6. 26 4月, 2011 1 次提交
  7. 23 4月, 2011 1 次提交
  8. 22 4月, 2011 1 次提交
  9. 21 4月, 2011 1 次提交
  10. 20 4月, 2011 1 次提交
    • T
      Handle nested items correctly in typestate_check · b7dd75c9
      Tim Chevalier 提交于
      Summary says it all. Actually, only nested objects and functions
      are handled, but that's better than before. The fold that I was using
      before to traverse a crate wasn't working correctly, because annotations
      have to reflect the number of local variables of the nearest enclosing
      function (in turn, because annotations are represented as bit vectors).
      The fold was traversing the AST in the wrong order, first filling in
      the annotations correctly, but then re-traversing them with the bit
      vector length for any outer nested functions, and so on.
      
      Remedying this required writing a lot of tedious boilerplate code
      because I scrapped the idea of using a fold altogether.
      
      I also made typestate_check handle unary, field, alt, and fail.
      
      Also, some miscellaneous changes:
      * added annotations to blocks in typeck
      * fix pprust so it can handle spawn
      * added more logging functions in util.common
      * fixed _vec.or
      * added maybe and from_maybe in option
      * removed fold_block field from ast_fold, since it was never used
      b7dd75c9
  11. 14 4月, 2011 1 次提交
    • T
      Make expr_while work in typestate_check · 7c6e6fc5
      Tim Chevalier 提交于
      Also did some refactoring in typestate_check. All test cases in
      compile-fail that involve uninitialized vars now fail correctly!
      (All eight of them, that is.)
      7c6e6fc5
  12. 13 4月, 2011 1 次提交
    • T
      Further work on typestate. Handles expr_rec and expr_assign now. · d7e88184
      Tim Chevalier 提交于
      Also changed the ts_ann field on statements to be an ann instead,
      which explains most of the changes.
      
      As well, got rid of the "warning: no type for expression" error
      by filling in annotations for local decls in typeck (not sure whether
      this was my fault or not).
      
      Finally, in bitv, added a clone() function to copy a bit vector,
      and fixed is_true, is_false, and to_str to not be nonsense.
      d7e88184
  13. 12 4月, 2011 1 次提交
  14. 09 4月, 2011 2 次提交
  15. 01 4月, 2011 1 次提交
  16. 26 3月, 2011 4 次提交
  17. 17 3月, 2011 1 次提交
  18. 09 3月, 2011 1 次提交
  19. 24 2月, 2011 1 次提交
  20. 23 10月, 2010 1 次提交
  21. 20 10月, 2010 1 次提交
  22. 19 10月, 2010 1 次提交
  23. 16 10月, 2010 1 次提交
  24. 06 10月, 2010 1 次提交
  25. 05 10月, 2010 1 次提交
  26. 24 9月, 2010 1 次提交
  27. 22 9月, 2010 1 次提交
  28. 21 9月, 2010 1 次提交
  29. 10 9月, 2010 1 次提交
  30. 02 9月, 2010 1 次提交
  31. 01 9月, 2010 1 次提交
  32. 28 8月, 2010 2 次提交
  33. 21 8月, 2010 1 次提交