]> git.lizzy.rs Git - rust.git/log
rust.git
13 years agoAdd Paul to AUTHORS.
Graydon Hoare [Tue, 17 May 2011 06:04:30 +0000 (06:04 +0000)]
Add Paul to AUTHORS.

13 years agoParser fix: 'fail' was eating the next token that came after it.
Paul Stansifer [Tue, 17 May 2011 01:05:21 +0000 (18:05 -0700)]
Parser fix: 'fail' was eating the next token that came after it.

13 years agoSwitch pretty printer to new vec syntax
Marijn Haverbeke [Tue, 17 May 2011 05:19:34 +0000 (07:19 +0200)]
Switch pretty printer to new vec syntax

13 years agostdlib: Remove transitional extfmt.RT module
Brian Anderson [Tue, 17 May 2011 04:58:52 +0000 (00:58 -0400)]
stdlib: Remove transitional extfmt.RT module

13 years agoReturn a better result from blocks. Closes issue #377
Brian Anderson [Sun, 15 May 2011 05:51:31 +0000 (01:51 -0400)]
Return a better result from blocks. Closes issue #377

Blocks return in a copy of the result of their ending expression, not the
direct result of the ending expression, as that may be a local variable which
gets zeroed by drop_slot.

13 years agoRegister new snapshots.
Graydon Hoare [Tue, 17 May 2011 02:57:03 +0000 (19:57 -0700)]
Register new snapshots.

13 years agoRename aux.rs to auxiliary.rs since win32 doesn't like files named "aux". Really.
Graydon Hoare [Tue, 17 May 2011 02:21:29 +0000 (19:21 -0700)]
Rename aux.rs to auxiliary.rs since win32 doesn't like files named "aux". Really.

13 years agoUpdate a couple tests that slipped through.
Graydon Hoare [Tue, 17 May 2011 02:08:59 +0000 (19:08 -0700)]
Update a couple tests that slipped through.

13 years agoFix snap rules to depend more correctly on rustc$(X) not rustc.
Graydon Hoare [Tue, 17 May 2011 02:05:08 +0000 (19:05 -0700)]
Fix snap rules to depend more correctly on rustc$(X) not rustc.

13 years agoMerge remote branch 'origin/master' into HEAD
Graydon Hoare [Tue, 17 May 2011 02:04:45 +0000 (19:04 -0700)]
Merge remote branch 'origin/master' into HEAD

Conflicts:
src/comp/middle/trans.rs

13 years agoRewrite everything to use [] instead of vec() in value position.
Graydon Hoare [Tue, 17 May 2011 01:21:22 +0000 (18:21 -0700)]
Rewrite everything to use [] instead of vec() in value position.

13 years agoBegin vec() -> [] transition.
Graydon Hoare [Mon, 16 May 2011 22:25:10 +0000 (15:25 -0700)]
Begin vec() -> [] transition.

13 years agomake the return-checker happy about pretty::pp::base_indent
Tim Chevalier [Mon, 16 May 2011 23:05:21 +0000 (16:05 -0700)]
make the return-checker happy about pretty::pp::base_indent

13 years agoFix get_os and get_arch
Tim Chevalier [Mon, 16 May 2011 21:33:22 +0000 (14:33 -0700)]
Fix get_os and get_arch

get_os and get_arch were failing to return a value in the error
case; they were also assuming that strings are indexed from 1. No
idea how they ever worked, but anyway, fixed.

13 years agoTwo tests that the typechecker correctly unifies type arguments in patterns with...
Tim Chevalier [Sun, 15 May 2011 02:03:08 +0000 (19:03 -0700)]
Two tests that the typechecker correctly unifies type arguments in patterns with their expected tag types

13 years agoStarted adding support for return checking and non-returning function annotations
Tim Chevalier [Sun, 15 May 2011 02:02:30 +0000 (19:02 -0700)]
Started adding support for return checking and non-returning function annotations

* Reorganized typestate into several modules.

* Made typestate check that any function with a non-nil return type
  returns a value. For now, the check is a warning and not an error
  (see next item).

* Added a "bot" type (prettyprinted as _|_), for constructs like be, ret, break, cont, and
  fail that don't locally return a value that can be inspected. "bot"
  is distinct from "nil". There is no concrete syntax for _|_, while
  the concrete syntax for the nil type is ().

* Added support to the parser for a ! annotation on functions whose
  result type is _|_. Such a function is required to have either a
  fail or a call to another ! function that is reached in all control
  flow paths. The point of this annotation is to mark functions like
  unimpl() and span_err(), so that an alt with a call to err() in one
  case isn't a false positive for the return-value checker. I haven't
  actually annotated anything with it yet.

* Random bugfixes:

* * Fixed bug in trans::trans_binary that was throwing away the
    cleanups for nested subexpressions of an and or or
    (tests: box-inside-if and box-inside-if2).

** In typeck, unify the expected type arguments of a tag with the
   actual specified arguments.

13 years agoNoticed that metadata::Encode::enc_sty didn't have a case for ty_task, so I added...
Tim Chevalier [Sun, 15 May 2011 01:56:44 +0000 (18:56 -0700)]
Noticed that metadata::Encode::enc_sty didn't have a case for ty_task, so I added one (though this wasn't causing the problem I was seeing...

13 years agoAdded .bz2 and stage1 directory to .gitignore
Tim Chevalier [Sun, 15 May 2011 01:54:35 +0000 (18:54 -0700)]
Added .bz2 and stage1 directory to .gitignore

13 years agoadd dl/ and .pyc files to .gitignore
Tim Chevalier [Wed, 4 May 2011 17:55:32 +0000 (10:55 -0700)]
add dl/ and .pyc files to .gitignore

13 years agorustc: Fix indentation in typeck::check_lit()
Patrick Walton [Mon, 16 May 2011 22:24:32 +0000 (15:24 -0700)]
rustc: Fix indentation in typeck::check_lit()

13 years agorustc: Don't rebuild the call expression in typeck::replace_expr_type()
Patrick Walton [Mon, 16 May 2011 22:19:29 +0000 (15:19 -0700)]
rustc: Don't rebuild the call expression in typeck::replace_expr_type()

13 years agorustc: Don't unpack annotations in trans::lval_generic_fn()
Patrick Walton [Mon, 16 May 2011 22:19:07 +0000 (15:19 -0700)]
rustc: Don't unpack annotations in trans::lval_generic_fn()

13 years agoBe a bit noisier about being in a transition.
Graydon Hoare [Mon, 16 May 2011 22:14:58 +0000 (15:14 -0700)]
Be a bit noisier about being in a transition.

13 years agoLet the snapshot-file parser parse empty T lines, since they are used to start a...
Graydon Hoare [Mon, 16 May 2011 22:14:44 +0000 (15:14 -0700)]
Let the snapshot-file parser parse empty T lines, since they are used to start a transition.

13 years agorustc: Make the parser use the interner
Patrick Walton [Mon, 16 May 2011 21:53:00 +0000 (14:53 -0700)]
rustc: Make the parser use the interner

13 years agoReplace --bitcode with the canonical --emit-llvm
Kelly Wilson [Mon, 16 May 2011 18:14:24 +0000 (12:14 -0600)]
Replace --bitcode with the canonical --emit-llvm

13 years agoAdd automatic exe generation capabilities. Add --bitcode flag to generate only an...
Kelly Wilson [Mon, 16 May 2011 15:01:36 +0000 (09:01 -0600)]
Add automatic exe generation capabilities. Add --bitcode flag to generate only an LLVM bitcode file.

13 years agorustc: Factor out the code that interns types into an "interner" data structure
Patrick Walton [Mon, 16 May 2011 20:58:13 +0000 (13:58 -0700)]
rustc: Factor out the code that interns types into an "interner" data structure

13 years agorustc: Don't rebuild AST patterns during typechecking
Patrick Walton [Mon, 16 May 2011 18:45:00 +0000 (11:45 -0700)]
rustc: Don't rebuild AST patterns during typechecking

13 years agorustc: Replace the redundant typeck::node_ann_ty_params() with ty::ann_to_type_params()
Patrick Walton [Mon, 16 May 2011 18:43:50 +0000 (11:43 -0700)]
rustc: Replace the redundant typeck::node_ann_ty_params() with ty::ann_to_type_params()

13 years agorustc: Make the type collection pass no longer rebuild the AST
Patrick Walton [Mon, 16 May 2011 17:34:32 +0000 (10:34 -0700)]
rustc: Make the type collection pass no longer rebuild the AST

13 years agorustc: Fix indentation in ty_param_count_and_ty_for_def()
Patrick Walton [Mon, 16 May 2011 17:23:31 +0000 (10:23 -0700)]
rustc: Fix indentation in ty_param_count_and_ty_for_def()

13 years agorustc: Add an item_ann() accessor function
Patrick Walton [Mon, 16 May 2011 17:22:14 +0000 (10:22 -0700)]
rustc: Add an item_ann() accessor function

13 years agorustc: Wait until generic glue is actually emitted to define it as internal
Brian Anderson [Sun, 15 May 2011 23:53:06 +0000 (19:53 -0400)]
rustc: Wait until generic glue is actually emitted to define it as internal

The verifier was not liking this when generating unoptimized bitcode. Per LLVM
docs it is not valid for function declarations to be marked internal, but
their implementations may be.

13 years agorustc: Rename 'Unify' modules to 'unify'
Brian Anderson [Sun, 15 May 2011 01:13:47 +0000 (21:13 -0400)]
rustc: Rename 'Unify' modules to 'unify'

13 years agoRemove xfail-boot lines from tests
Brian Anderson [Sun, 15 May 2011 01:05:22 +0000 (21:05 -0400)]
Remove xfail-boot lines from tests

13 years agoRemove CFG_OCAMLC_OPT
Brian Anderson [Sat, 14 May 2011 20:08:22 +0000 (16:08 -0400)]
Remove CFG_OCAMLC_OPT

13 years agorustc: Use walk instead of fold for the first item collection pass
Patrick Walton [Sat, 14 May 2011 18:02:31 +0000 (11:02 -0700)]
rustc: Use walk instead of fold for the first item collection pass

13 years agorustc: Change "Collect" to "collect"
Patrick Walton [Sat, 14 May 2011 17:15:22 +0000 (10:15 -0700)]
rustc: Change "Collect" to "collect"

13 years agoAdd a regression test for issue #374 (XFAILed)
Brian Anderson [Sat, 14 May 2011 17:29:11 +0000 (13:29 -0400)]
Add a regression test for issue #374 (XFAILed)

13 years agoWIP
Brian Anderson [Sat, 14 May 2011 07:21:08 +0000 (03:21 -0400)]
WIP

13 years agofix a long line that i forgot to commit
Marijn Haverbeke [Sat, 14 May 2011 11:27:21 +0000 (13:27 +0200)]
fix a long line that i forgot to commit

13 years agoMark IDENT tokens that are followed by ::
Marijn Haverbeke [Sat, 14 May 2011 10:54:31 +0000 (12:54 +0200)]
Mark IDENT tokens that are followed by ::

So that the type parser won't go off and try to parse a vec
type when it sees vec::init_op.

13 years agorustllvm: Free TargetMachine in LLVMRustWriteOutputFile
Brian Anderson [Sat, 14 May 2011 04:48:51 +0000 (00:48 -0400)]
rustllvm: Free TargetMachine in LLVMRustWriteOutputFile

13 years agorustc: Dispose intrinsics memory buffer
Brian Anderson [Sat, 14 May 2011 04:29:24 +0000 (00:29 -0400)]
rustc: Dispose intrinsics memory buffer

13 years agorustc: Dispose the intrinsics LLVMModuleRef
Brian Anderson [Sat, 14 May 2011 04:15:53 +0000 (00:15 -0400)]
rustc: Dispose the intrinsics LLVMModuleRef

13 years agoAdd a flag to run the compiler under valgrind
Brian Anderson [Sat, 14 May 2011 03:20:34 +0000 (23:20 -0400)]
Add a flag to run the compiler under valgrind

13 years agort: Don't overshoot the end of the logging spec during parsing
Brian Anderson [Sat, 14 May 2011 03:20:01 +0000 (23:20 -0400)]
rt: Don't overshoot the end of the logging spec during parsing

13 years agort: Allocate room for null terminator in logging spec
Brian Anderson [Sat, 14 May 2011 02:42:52 +0000 (22:42 -0400)]
rt: Allocate room for null terminator in logging spec

13 years agorustc: Look types up in the side table
Patrick Walton [Sat, 14 May 2011 01:46:16 +0000 (18:46 -0700)]
rustc: Look types up in the side table

13 years agoRemove rustboot from the repository.
Graydon Hoare [Sat, 14 May 2011 01:38:28 +0000 (18:38 -0700)]
Remove rustboot from the repository.

13 years agorustc: Write nil types into the node type table wherever plain_ann() is used
Patrick Walton [Sat, 14 May 2011 00:53:42 +0000 (17:53 -0700)]
rustc: Write nil types into the node type table wherever plain_ann() is used

13 years ago'with' no longer a token; whitespace police.
Lindsey Kuper [Sat, 14 May 2011 00:26:14 +0000 (17:26 -0700)]
'with' no longer a token; whitespace police.

Plus renaming the anonymous objects test to a more descriptive name,
and XFAILing it because it doesn't work yet.

13 years agoMore anon obj work; whitespace police in middle::fold
Lindsey Kuper [Fri, 13 May 2011 23:35:22 +0000 (16:35 -0700)]
More anon obj work; whitespace police in middle::fold

Passing args to middle::fold::fold_expr_anon_obj by reference to be
consistent with the other folds; adding a dummy fold_expr_anon_obj to
typeck to be filled in later.

13 years agoUse new module namespace syntax.
Lindsey Kuper [Fri, 13 May 2011 18:00:26 +0000 (11:00 -0700)]
Use new module namespace syntax.

13 years agoMore work toward anonymous objects.
Lindsey Kuper [Wed, 11 May 2011 23:41:25 +0000 (16:41 -0700)]
More work toward anonymous objects.

13 years agoBug fixes.
Lindsey Kuper [Wed, 11 May 2011 19:04:58 +0000 (12:04 -0700)]
Bug fixes.

Fixed infinite loop on anonymous objects in parser; added
expr_anon_obj to walk.rs; fixed syntax of test case.

13 years agoMore progress on anonymous objects.
Lindsey Kuper [Wed, 11 May 2011 02:52:22 +0000 (19:52 -0700)]
More progress on anonymous objects.

Still segfaulting on the method-overriding.rs test, though.

13 years agoCorrect capitalization of "Option".
Lindsey Kuper [Tue, 10 May 2011 18:55:32 +0000 (11:55 -0700)]
Correct capitalization of "Option".

13 years agoStarting on support for anonymous objects. Just syntax so far.
Lindsey Kuper [Sat, 7 May 2011 00:08:41 +0000 (17:08 -0700)]
Starting on support for anonymous objects.  Just syntax so far.

13 years agoAdd support for 'T' transition snapshots, which are identical to S snapshots except...
Graydon Hoare [Sat, 14 May 2011 00:00:43 +0000 (17:00 -0700)]
Add support for 'T' transition snapshots, which are identical to S snapshots except they tell the makefile to stop at stage1.

13 years agorustc: Move replace_expr_type() from ty to typeck, as it's only used in the latter
Patrick Walton [Sat, 14 May 2011 00:06:00 +0000 (17:06 -0700)]
rustc: Move replace_expr_type() from ty to typeck, as it's only used in the latter

13 years agorustc: Fix long lines in typeck.rs
Brian Anderson [Sat, 14 May 2011 00:06:02 +0000 (20:06 -0400)]
rustc: Fix long lines in typeck.rs

13 years agorustc: Get ann_to_type_params() on board the ann_to_ty_param_substs_opt_and_ty()...
Patrick Walton [Fri, 13 May 2011 23:53:35 +0000 (16:53 -0700)]
rustc: Get ann_to_type_params() on board the ann_to_ty_param_substs_opt_and_ty() train

13 years agorustc: Make all type lookups go through the one ty::ann_to_ty_param_substs_opt_and_ty...
Patrick Walton [Fri, 13 May 2011 23:40:21 +0000 (16:40 -0700)]
rustc: Make all type lookups go through the one ty::ann_to_ty_param_substs_opt_and_ty() function

13 years agorustc: Write types contained in "trivial annotations" to the table
Patrick Walton [Fri, 13 May 2011 23:27:55 +0000 (16:27 -0700)]
rustc: Write types contained in "trivial annotations" to the table

13 years agorustc: Change ty::triv_ann() to take a node ID instead of a full annotation
Patrick Walton [Fri, 13 May 2011 21:38:05 +0000 (14:38 -0700)]
rustc: Change ty::triv_ann() to take a node ID instead of a full annotation

13 years agorustc: lowercase the link and link::write modules
Brian Anderson [Fri, 13 May 2011 20:47:37 +0000 (16:47 -0400)]
rustc: lowercase the link and link::write modules

13 years agoSlight adjustments to shape, rename to type_glue.rs.
Graydon Hoare [Fri, 13 May 2011 20:29:41 +0000 (13:29 -0700)]
Slight adjustments to shape, rename to type_glue.rs.

13 years agorustc: Add write_type() wherever ann_types are written, except for triv_ann()
Patrick Walton [Fri, 13 May 2011 20:05:55 +0000 (13:05 -0700)]
rustc: Add write_type() wherever ann_types are written, except for triv_ann()

13 years agoRemove reserved word tests (since reserved words were removed)
Marijn Haverbeke [Fri, 13 May 2011 19:57:34 +0000 (21:57 +0200)]
Remove reserved word tests (since reserved words were removed)

Ping me if you disagree, but I think that in a language that's as
in-flux as rust currently is, it is silly to try and enforce a single
future-compatibility. The reserved words didn't work well with the
parser refactor, so I dropped them for the time being. We can,
eventually, bring them back as type-only reserved words.

13 years agoSafeguard against using statement or item keywords as value ids
Marijn Haverbeke [Fri, 13 May 2011 19:54:32 +0000 (21:54 +0200)]
Safeguard against using statement or item keywords as value ids

This prevents insane things like 'auto while = 2', which would parse
in the previous revision, but then break when you tried to mutate it
with 'while = 10'.

13 years agoMake the parser more careful about keywords
Marijn Haverbeke [Fri, 13 May 2011 19:30:08 +0000 (21:30 +0200)]
Make the parser more careful about keywords

Keywords are now only recognized in contexts where they are valid. The
lexer no longer recognizes them, all words are lexed as IDENT tokens,
that get interpreted by the parser.

13 years agorustc: Fix the type of node_types; stub the write_type function
Patrick Walton [Fri, 13 May 2011 19:12:54 +0000 (12:12 -0700)]
rustc: Fix the type of node_types; stub the write_type function

13 years agorustc: Remove a minor rustboot workaround in typeck::resolve_local_types_in_block()
Patrick Walton [Fri, 13 May 2011 18:22:31 +0000 (11:22 -0700)]
rustc: Remove a minor rustboot workaround in typeck::resolve_local_types_in_block()

13 years agoFix naming of libc that was mangled by recent module changes
Brian Anderson [Fri, 13 May 2011 17:51:13 +0000 (13:51 -0400)]
Fix naming of libc that was mangled by recent module changes

It doesn't appear that rustc makes use of these strings so it didn't actually
break anything yet.

13 years agorustc: Make typeck::instantiate_path() not return an annotation
Patrick Walton [Fri, 13 May 2011 17:53:55 +0000 (10:53 -0700)]
rustc: Make typeck::instantiate_path() not return an annotation

13 years agoImplement module namespaces
Marijn Haverbeke [Fri, 13 May 2011 14:46:20 +0000 (16:46 +0200)]
Implement module namespaces

Module names no longer clash with type and value names. The
tokenizer/parser still needs to be taught to be more careful in
identifying keywords, so that we can use 'str' and 'vec' and so as
module names.

13 years agoExtend crate format to allow multiple definitions for a single name
Marijn Haverbeke [Fri, 13 May 2011 13:17:24 +0000 (15:17 +0200)]
Extend crate format to allow multiple definitions for a single name

The type/value namespace distinction pretty much works now. Module
namespace is up next.

13 years agoMake module indices hold a list of items
Marijn Haverbeke [Fri, 13 May 2011 11:34:59 +0000 (13:34 +0200)]
Make module indices hold a list of items

This way, they can support having both a type and a value
of the same name.

13 years agoMove capture checking into resolve.rs
Marijn Haverbeke [Fri, 13 May 2011 09:57:58 +0000 (11:57 +0200)]
Move capture checking into resolve.rs

Drops capture.rs. The new algorithm also checks for captures function
arguments and obj fields.

13 years agoChange resolve to use walk instead of fold
Marijn Haverbeke [Fri, 13 May 2011 08:51:36 +0000 (10:51 +0200)]
Change resolve to use walk instead of fold

Possibly, at some point, we should add a state-passing variant of
walk, or a wrapper that makes it easier to thread state. (See the
repetetive pop_state_for_* functions in this commit.)

13 years agoEnsure visit_ty is called on type parameters during walk
Marijn Haverbeke [Fri, 13 May 2011 09:31:27 +0000 (11:31 +0200)]
Ensure visit_ty is called on type parameters during walk

13 years agoAdd visit_arm and visit_method to walk.rs
Marijn Haverbeke [Fri, 13 May 2011 07:39:41 +0000 (09:39 +0200)]
Add visit_arm and visit_method to walk.rs

The resolver needs to update its state for individual arms and
methods.

13 years agoChange fuzzer to match new module standards
Brian Anderson [Fri, 13 May 2011 02:45:55 +0000 (22:45 -0400)]
Change fuzzer to match new module standards

13 years agoRename std.extfmt.CT to std.extfmt.RT to ct and rt
Brian Anderson [Thu, 12 May 2011 23:51:22 +0000 (19:51 -0400)]
Rename std.extfmt.CT to std.extfmt.RT to ct and rt

Temporarily duplicate the entire RT module, leaving it with the old name to
accomodate the stage0 compiler. Will be removed after the next snapshot.

13 years agorustc: Flatten recursive vectors in trans::simplify_type(). Prevents an infinite...
Patrick Walton [Fri, 13 May 2011 01:37:28 +0000 (18:37 -0700)]
rustc: Flatten recursive vectors in trans::simplify_type(). Prevents an infinite loop.

13 years agorustc: Beginnings of a "shape" module to convert types to shapes
Patrick Walton [Fri, 13 May 2011 01:30:21 +0000 (18:30 -0700)]
rustc: Beginnings of a "shape" module to convert types to shapes

13 years agorustc: Make ty::expr_ann() terser
Patrick Walton [Thu, 12 May 2011 23:57:08 +0000 (16:57 -0700)]
rustc: Make ty::expr_ann() terser

13 years agorustc: Pass a node type table around, unused as of yet
Patrick Walton [Thu, 12 May 2011 23:36:47 +0000 (16:36 -0700)]
rustc: Pass a node type table around, unused as of yet

13 years agoAdd stats option and lazily emit glue.
Graydon Hoare [Thu, 12 May 2011 22:42:12 +0000 (15:42 -0700)]
Add stats option and lazily emit glue.

13 years agoetc: Update rust.vim with new keywords; color types differently from keywords
Patrick Walton [Thu, 12 May 2011 21:32:54 +0000 (14:32 -0700)]
etc: Update rust.vim with new keywords; color types differently from keywords

13 years agoAdd snap-stageN targets.
Graydon Hoare [Thu, 12 May 2011 19:56:15 +0000 (12:56 -0700)]
Add snap-stageN targets.

13 years agoRegister new snapshots for incompatible-syntax transition.
Graydon Hoare [Thu, 12 May 2011 20:03:05 +0000 (13:03 -0700)]
Register new snapshots for incompatible-syntax transition.

13 years agoFix mistaken replacements in error-pattern comments in tests
Marijn Haverbeke [Thu, 12 May 2011 19:45:29 +0000 (21:45 +0200)]
Fix mistaken replacements in error-pattern comments in tests

13 years agoDowncase std modules again, move to :: for module dereferencing
Marijn Haverbeke [Thu, 12 May 2011 15:24:54 +0000 (17:24 +0200)]
Downcase std modules again, move to :: for module dereferencing

This should be a snapshot transition.

13 years agoTransitional change to make extfmt output lowercase module name
Marijn Haverbeke [Thu, 12 May 2011 16:28:34 +0000 (18:28 +0200)]
Transitional change to make extfmt output lowercase module name

13 years agoChange module dereference syntax from . to ::
Marijn Haverbeke [Thu, 12 May 2011 15:20:07 +0000 (17:20 +0200)]
Change module dereference syntax from . to ::

This will need to be a snapshot.

13 years agoRemove some truly wrong logic in parse_constrs
Marijn Haverbeke [Thu, 12 May 2011 13:52:12 +0000 (15:52 +0200)]
Remove some truly wrong logic in parse_constrs

13 years agoKeep resolve data in external hash table, rather than embedded defs
Marijn Haverbeke [Thu, 12 May 2011 11:25:18 +0000 (13:25 +0200)]
Keep resolve data in external hash table, rather than embedded defs

One step closer to removing fold and having a single, immutable AST.
Resolve still uses fold, because it has to detect and transform
expr_field expressions. If we go through on our plan of moving to a
different syntax for module dereferencing, the parser can spit out
expr_field expressions, and resolve can move to walk.

(I am truly sorry for the things I did in typestate_check.rs. I expect
we'll want to change that to walk as well in the near future, at which
point it should probably pass around a context record, which could
hold the def_map.)