Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the macro system more modular. #451

Closed
wants to merge 64 commits into from

Commits on Jun 3, 2011

  1. Configuration menu
    Copy the full SHA
    2e4f7a2 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2011

  1. Configuration menu
    Copy the full SHA
    72e11fd View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2011

  1. Configuration menu
    Copy the full SHA
    9a65c16 View commit details
    Browse the repository at this point in the history
  2. Removing redundant "fail"s.

    lkuper authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    c974cc3 View commit details
    Browse the repository at this point in the history
  3. Temporarily xfail compile-fail/pattern-tyvar

    So that the tinderboxes can go green again. Patrick, please look into
    this at some point.
    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    c94c9e8 View commit details
    Browse the repository at this point in the history
  4. Accept *foo as a pointer to foo.

    This is accepted everywhere, since just passing a pointer is safe.
    cixtor authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    b3d6ead View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d258852 View commit details
    Browse the repository at this point in the history
  6. Parse pointers in metadata.

    cixtor authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    92e246a View commit details
    Browse the repository at this point in the history
  7. Tidy up printing of ty_fn.

    graydon authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    99ccd02 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    60d730f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    884acab View commit details
    Browse the repository at this point in the history
  10. Comments and cleanup.

    lkuper authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    86c3e16 View commit details
    Browse the repository at this point in the history
  11. More comments.

    lkuper authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    c66ffa0 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7d02fb4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c41eada View commit details
    Browse the repository at this point in the history
  14. Register new snapshots.

    graydon authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    1c5f6c9 View commit details
    Browse the repository at this point in the history
  15. rustc: Introduce ext module. Move some things from parser to ext.

    Introduce an ext_ctxt record to provide a span_err method for use while
    expanding syntax extensions. Hopefully it will be useful for other things.
    brson authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    b55a99c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    462e47e View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    cd88b51 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3e72b23 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    fe51cee View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    457b6ba View commit details
    Browse the repository at this point in the history
  21. rustc: Use spans for #env errors

    brson authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    dac75ff View commit details
    Browse the repository at this point in the history
  22. rustc: Add a next_ann method to ext_ctxt

    After this we can remove the parser from the syntax extensions, at least for
    now.
    brson authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    a77cc7f View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    81899ce View commit details
    Browse the repository at this point in the history
  24. rustc: Hide the parser from syntax extensions

    Eventually extensions will probably need access to the parser again, but it'll
    be in a different form.
    brson authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    6b2a8cd View commit details
    Browse the repository at this point in the history
  25. rustc: Reenable debug logging in extfmt

    This is not obnoxious now that logging is off by default
    brson authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    6689e57 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    5a9aa5f View commit details
    Browse the repository at this point in the history
  27. Remove redundant 'fail' exprs and dead code; use sess.bug or

    sess.span_err instead of 'fail'.  (issue rust-lang#444)
    lkuper authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    ba0044a View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    103317d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    bcfa0d1 View commit details
    Browse the repository at this point in the history
  30. Change unsafe aliases

    This litters aberrations like 'alt({foo.bar}) { ... }' and f({*baz})
    though the code (mostly in trans.rs). These are a way to explicitly
    copy the given value so that it can be safely aliased. At some point
    we'll probably want a more explicit copy operator.
    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    3d165ba View commit details
    Browse the repository at this point in the history
  31. First take on an alias-safety checker

    The alias checker works by ensuring that any value to which an alias
    is created is rooted in some way that ensures it outlives the alias.
    
    It is now disallowed to create an alias to the content of a mutable
    box, or to a box hanging off a mutable field. There is also machinery
    in place to prevent assignment to local variables whenever they are
    the root of a live alias.
    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    bc8fcf1 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    543717e View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    70b1d6e View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    7458a07 View commit details
    Browse the repository at this point in the history
  35. Don't put a copy of main (the C one) in each binary we produce. This …

    …is a step
    
    in getting a driver that works on all linux systems.
    
    Sorry for the linker hacks, I will remove them after snapshotting a new compiler.
    cixtor authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    5251ea5 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    1d2f0e5 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    9a2546f View commit details
    Browse the repository at this point in the history
  38. Update the snapshot.

    cixtor authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    bc0ea91 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    7d47d93 View commit details
    Browse the repository at this point in the history
  40. rustc: Use a set-based approach to unification; remove ty_bound_param…

    … and ty_local.
    
    Sorry, big perf regression; will fix soon.
    pcwalton authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    4b3755b View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    2200d6e View commit details
    Browse the repository at this point in the history
  42. Add optional message to fail.

    jdm authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    fa306d7 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    64c0631 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    04ffefb View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    9bedc39 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    dc39dd4 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    b33bf32 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    ba6f670 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    0dafbf6 View commit details
    Browse the repository at this point in the history
  50. Register new snapshots.

    graydon authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    1a880df View commit details
    Browse the repository at this point in the history
  51. rustc: Add some miscellaneous demands that pushdown had previously ca…

    …ught; put out burning tinderbox
    pcwalton authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    bc59dfa View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    1689650 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    53248ce View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    1a72745 View commit details
    Browse the repository at this point in the history
  55. rustc: Make resolve_all_vars() check to see whether the type actually…

    … has vars before folding over it; also remove some debug code. 2x typechecking speedup.
    pcwalton authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    9eb4081 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    dbb3471 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    7b09e2d View commit details
    Browse the repository at this point in the history
  58. Add new visitor framework

    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    da4e3b9 View commit details
    Browse the repository at this point in the history
  59. Some more workarounds to please the alias checker

    Some of the vec utilities now only work on immutable vecs, since they
    would have to be rewritten to do a lot more copying to be alias-safe.
    
    Some forced copying was added to map.rs, showing a weakness in the
    alias checker (or maybe the alias system): when fn args are passed
    into a function, calling them must assume all aliases that are not
    immutably rooted (directly connected to a local or temporary without
    any mutable edges) become invalid. This will be a drag on functional
    programming in Rust.
    
    Work around alias issues in the stdlib
    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    5335ffd View commit details
    Browse the repository at this point in the history
  60. Add vec::member

    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    25b0338 View commit details
    Browse the repository at this point in the history
  61. A revised, improved alias-checker

    The old system tried to ensure that the location an alias pointed at
    would retain its type. That turned out to not be strong enough in the
    face of aliases to the inside of tags.
    
    The new system instead proves that values pointed to by aliases are
    not replaced (or invalidated in some other way) at all. It knows of
    two sufficient conditions for this, and tries to prove at least of
    them:
    
    A) The alias is 'immutably rooted' in a local, and this local is not
       reassigned for the lifetime of the alias. Immutably rooted means
       the alias refers to the local itself, or to something reachable
       from the local through immutable dereferencing.
    
    B) No value whose type might include the type of the 'inner mutable
       element' of the thing the alias refers to (for example, the box in
       rec(mutable x = @mutable int)) is from the outer scope is accessed
       for the lifetime of the alias. This means for functions, no other
       argument types may include the alias's inner mutable type. For alt,
       for each, and for, it means the body does not refer to any locals
       originating from outside their scope that include this type.
    
    The lifetime of an alias in an alt, for each, or for body is defined
    as the range from its definition to its last use, not to the point
    where it goes out of scope. This makes working around these
    restrictions somewhat less annoying. For example, you can assign to
    your alt-ed value you don't refer to any bindings afterwards.
    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    c70792d View commit details
    Browse the repository at this point in the history
  62. Properly handle lifetime of aliases in nested blocks

    There was a bug that would cause the alias analyser to allow you to
    invalidate an alias that was no longer directly referred to, even if
    another alias was rooted in it. It now properly tracks dependencies
    between live aliases.
    
    Required another case of copying values in map.rs.
    marijnh authored and paulstansifer committed Jun 9, 2011
    Configuration menu
    Copy the full SHA
    b33fb68 View commit details
    Browse the repository at this point in the history