]> git.lizzy.rs Git - rust.git/log
rust.git
13 years agoauthors: Correct spelling of jrmuizel's name
Patrick Walton [Wed, 18 May 2011 04:10:18 +0000 (21:10 -0700)]
authors: Correct spelling of jrmuizel's name

13 years agoauthors: Add Erick to AUTHORS
Patrick Walton [Wed, 18 May 2011 04:10:02 +0000 (21:10 -0700)]
authors: Add Erick to AUTHORS

13 years agorustc: Don't rebuild the AST when typechecking statements
Patrick Walton [Wed, 18 May 2011 04:08:55 +0000 (21:08 -0700)]
rustc: Don't rebuild the AST when typechecking statements

13 years agoMerge pull request #386 from erickt/master
Patrick Walton [Wed, 18 May 2011 03:51:00 +0000 (20:51 -0700)]
Merge pull request #386 from erickt/master

Adding a simple vim indent file

13 years agoMove vim syntax file, add indent file.
Erick Tryzelaar [Wed, 18 May 2011 03:35:46 +0000 (20:35 -0700)]
Move vim syntax file, add indent file.

13 years agorustc: Have typechecking no longer rebuild the AST
Patrick Walton [Wed, 18 May 2011 03:11:25 +0000 (20:11 -0700)]
rustc: Have typechecking no longer rebuild the AST

13 years agorustc: Fix type mismatch in lib/sha1.rs constants
Patrick Walton [Wed, 18 May 2011 03:05:47 +0000 (20:05 -0700)]
rustc: Fix type mismatch in lib/sha1.rs constants

13 years agorustc: Run block cleanups on else if blocks
Brian Anderson [Wed, 18 May 2011 00:35:37 +0000 (20:35 -0400)]
rustc: Run block cleanups on else if blocks

With the scheme used to translate 'else if' currently the if expression is
translated in a new (else) scope context. If that if expression wants to
result in a value that requires refcounting then it will need to drop the
refcount in the cleanups of the else block.

13 years agorustc: Remove typeck::check_item_fn(); it's entirely superfluous!
Patrick Walton [Wed, 18 May 2011 02:20:24 +0000 (19:20 -0700)]
rustc: Remove typeck::check_item_fn(); it's entirely superfluous!

13 years agorustc: Make check_const() not rebuild the AST (although it's not called at the moment!)
Patrick Walton [Wed, 18 May 2011 02:13:16 +0000 (19:13 -0700)]
rustc: Make check_const() not rebuild the AST (although it's not called at the moment!)

13 years agorustc: Make check_block not rebuild the AST
Patrick Walton [Wed, 18 May 2011 02:10:24 +0000 (19:10 -0700)]
rustc: Make check_block not rebuild the AST

13 years agorustc: Don't rebuild the AST when writing back locals
Patrick Walton [Wed, 18 May 2011 02:00:29 +0000 (19:00 -0700)]
rustc: Don't rebuild the AST when writing back locals

13 years agorustc: Print the types of declarations in --typed-pretty mode
Patrick Walton [Wed, 18 May 2011 02:00:16 +0000 (19:00 -0700)]
rustc: Print the types of declarations in --typed-pretty mode

13 years agorustc: Pull the type out of the correct expression when typechecking channel types...
Patrick Walton [Wed, 18 May 2011 01:19:45 +0000 (18:19 -0700)]
rustc: Pull the type out of the correct expression when typechecking channel types. Puts out burning tinderbox.

13 years agorustc: Fix return value of expr_spawn case in pushdown_expr. Should put out soon...
Patrick Walton [Wed, 18 May 2011 00:44:30 +0000 (17:44 -0700)]
rustc: Fix return value of expr_spawn case in pushdown_expr. Should put out soon-to-be-burning tinderbox.

13 years agorustc: Don't rebuild the AST when typechecking expressions
Patrick Walton [Wed, 18 May 2011 00:42:37 +0000 (17:42 -0700)]
rustc: Don't rebuild the AST when typechecking expressions

13 years agorustc: Add a typed pretty-printing mode for debugging
Patrick Walton [Wed, 18 May 2011 00:42:23 +0000 (17:42 -0700)]
rustc: Add a typed pretty-printing mode for debugging

13 years agoAdd Eric to AUTHORS.
Graydon Hoare [Tue, 17 May 2011 21:59:25 +0000 (14:59 -0700)]
Add Eric to AUTHORS.

13 years agoFixing compile problems from recent changes.
Eric Holk [Tue, 17 May 2011 21:27:38 +0000 (14:27 -0700)]
Fixing compile problems from recent changes.

13 years agoRemoving the TODO comment.
Eric Holk [Tue, 17 May 2011 18:58:12 +0000 (11:58 -0700)]
Removing the TODO comment.

13 years agoAdded a few more expr_spawn cases so the spawn.rs test case gets a little further...
Eric Holk [Tue, 17 May 2011 18:49:50 +0000 (11:49 -0700)]
Added a few more expr_spawn cases so the spawn.rs test case gets a little further before failing.

13 years agorustc: Don't rebuild call or bind expressions during typechecking
Patrick Walton [Mon, 16 May 2011 22:47:06 +0000 (15:47 -0700)]
rustc: Don't rebuild call or bind expressions during typechecking

13 years agorustc: Make return value checking warnings a little prettier. Also introduce a new...
Patrick Walton [Tue, 17 May 2011 21:12:49 +0000 (14:12 -0700)]
rustc: Make return value checking warnings a little prettier. Also introduce a new "note" diagnostic level.

13 years agorustc: Flatten annotations
Patrick Walton [Tue, 17 May 2011 18:30:11 +0000 (11:30 -0700)]
rustc: Flatten annotations

13 years agoAlias-ify the parser and lexer
Marijn Haverbeke [Tue, 17 May 2011 18:45:49 +0000 (20:45 +0200)]
Alias-ify the parser and lexer

This only shaves a measly 19k off the rustc binary... but hey, every
little thing helps.

13 years agoFinally rename std::_xxx to std::xxx
Marijn Haverbeke [Tue, 17 May 2011 18:41:41 +0000 (20:41 +0200)]
Finally rename std::_xxx to std::xxx

Except for _task, which is still a keyword.

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