]> git.lizzy.rs Git - rust.git/log
rust.git
12 years agoGet these files compiling again
Jesse Ruderman [Sat, 7 Jan 2012 06:06:32 +0000 (22:06 -0800)]
Get these files compiling again

12 years agotest exposing memory management failure for #1078
Niko Matsakis [Sat, 7 Jan 2012 05:14:20 +0000 (21:14 -0800)]
test exposing memory management failure for #1078

12 years agoRevert "rt: Reduce mac red zone to 6K"
Brian Anderson [Sat, 7 Jan 2012 02:16:19 +0000 (18:16 -0800)]
Revert "rt: Reduce mac red zone to 6K"

This reverts commit d499e739a1eb67e887f5756f9dfef17199a6d041.

12 years agocargo: Print rustc's stdout when compilation fails
Brian Anderson [Sat, 7 Jan 2012 02:04:22 +0000 (18:04 -0800)]
cargo: Print rustc's stdout when compilation fails

stdout is where all the useful info is, not stderr.

12 years agort: Reduce mac red zone to 6K
Brian Anderson [Sat, 7 Jan 2012 00:42:26 +0000 (16:42 -0800)]
rt: Reduce mac red zone to 6K

12 years agorustc: Use std::homedir to locate /home/banderson
Brian Anderson [Sat, 7 Jan 2012 00:38:08 +0000 (16:38 -0800)]
rustc: Use std::homedir to locate /home/banderson

Issue #1359

12 years agostd: Untabify
Brian Anderson [Sat, 7 Jan 2012 00:37:04 +0000 (16:37 -0800)]
std: Untabify

12 years agostd: Add fs::homedir
Brian Anderson [Fri, 6 Jan 2012 19:55:43 +0000 (11:55 -0800)]
std: Add fs::homedir

Returns the home directory of the user as appropriate for the platform.

Issue #1359

12 years agort: Fail the scheduler immediately on task failure in win32
Brian Anderson [Sat, 7 Jan 2012 00:18:33 +0000 (16:18 -0800)]
rt: Fail the scheduler immediately on task failure in win32

12 years agoDisallow variable names that shadow tags in scope
Tim Chevalier [Thu, 5 Jan 2012 19:46:38 +0000 (11:46 -0800)]
Disallow variable names that shadow tags in scope

Now, if you have a tag named "foo", a variable declaration like
"let foo..." is illegal. This change makes it possible to eliminate
the '.' after a nullary tag pattern in an alt (but I'll be doing
that in a future commit) -- as now it's always obvious whether a
name refers to a tag or a new declared variable.

resolve implements this change -- all the other changes are just to
get rid of existing code that declares variables that shadow tag
names.

12 years agoEliminate a use of map::get in freevars
Tim Chevalier [Thu, 5 Jan 2012 19:33:22 +0000 (11:33 -0800)]
Eliminate a use of map::get in freevars

map::get is evil -- just say no!

12 years agoMerge pull request #1450 from erickt/master
Graydon Hoare [Fri, 6 Jan 2012 21:04:49 +0000 (13:04 -0800)]
Merge pull request #1450 from erickt/master

adding some misc functions and some functions just for [u8]

12 years agoAdd some basic comments to trans_imp.rs
Marijn Haverbeke [Fri, 6 Jan 2012 16:50:55 +0000 (17:50 +0100)]
Add some basic comments to trans_imp.rs

12 years agoMake binding of fns with bounded type parameters work
Marijn Haverbeke [Fri, 6 Jan 2012 16:29:06 +0000 (17:29 +0100)]
Make binding of fns with bounded type parameters work

Interns non-static dicts to heap-allocated equivalents so that they no
longer have stack scope.

Closes #1436

12 years agoSupport interface casting in the typechecker
Marijn Haverbeke [Fri, 6 Jan 2012 15:25:04 +0000 (16:25 +0100)]
Support interface casting in the typechecker

Issue #1437

12 years agoDon't delete css and js files in doc/ when making clean
Marijn Haverbeke [Fri, 6 Jan 2012 15:18:27 +0000 (16:18 +0100)]
Don't delete css and js files in doc/ when making clean

We have a bunch of these in the repository.

12 years agoStatically allocate static dicts
Marijn Haverbeke [Fri, 6 Jan 2012 13:22:31 +0000 (14:22 +0100)]
Statically allocate static dicts

Issue #1436

12 years agoFix pretty-printing of ty params in iface methods
Marijn Haverbeke [Fri, 6 Jan 2012 09:36:55 +0000 (10:36 +0100)]
Fix pretty-printing of ty params in iface methods

12 years agoFix bug in method type parameter passing
Marijn Haverbeke [Fri, 6 Jan 2012 09:23:55 +0000 (10:23 +0100)]
Fix bug in method type parameter passing

It would occasionally pass the wrong type parameter, when calling
a generic method from a generic impl on a bounded param type.

12 years agolibstd: rename c_vec::size to len.
Erick Tryzelaar [Fri, 6 Jan 2012 16:12:18 +0000 (08:12 -0800)]
libstd: rename c_vec::size to len.

12 years agoadd alignment to i386 for good measure, though we do not yet
Niko Matsakis [Fri, 6 Jan 2012 15:57:56 +0000 (07:57 -0800)]
add alignment to i386 for good measure, though we do not yet
save SSE regs in i386 (we ought to, though!)

12 years agolibcore: add [u8] helper functions to vec.
Erick Tryzelaar [Fri, 6 Jan 2012 15:36:56 +0000 (07:36 -0800)]
libcore: add [u8] helper functions to vec.

12 years agolibstd: switch map to use libcore's hash functions.
Erick Tryzelaar [Tue, 27 Dec 2011 02:59:50 +0000 (18:59 -0800)]
libstd: switch map to use libcore's hash functions.

12 years agolibcore: add a trivial uint hash function.
Erick Tryzelaar [Tue, 27 Dec 2011 02:58:40 +0000 (18:58 -0800)]
libcore: add a trivial uint hash function.

12 years agolibcore: Add binop functions to u32 and u64
Erick Tryzelaar [Tue, 27 Dec 2011 02:15:17 +0000 (18:15 -0800)]
libcore: Add binop functions to u32 and u64

12 years agofix alignment of registers structure
Niko Matsakis [Fri, 6 Jan 2012 15:45:06 +0000 (07:45 -0800)]
fix alignment of registers structure

12 years agobuild: Don't delete llvm files as part of make clean
Brian Anderson [Fri, 6 Jan 2012 06:46:13 +0000 (22:46 -0800)]
build: Don't delete llvm files as part of make clean

Doing this is just resulting in a broken workspace. We have a clean-llvm
target that does the right thing. If we want to we can make it a dependency
of clean, but most people don't need to clean llvm and doing so results
in a lengthy rebuild.

12 years agolibcore: Use correct link name for lgamma_r on win32
Brian Anderson [Fri, 6 Jan 2012 05:34:33 +0000 (21:34 -0800)]
libcore: Use correct link name for lgamma_r on win32

12 years agoStop configure early if git or subconfigures fail.
Graydon Hoare [Fri, 6 Jan 2012 02:59:54 +0000 (18:59 -0800)]
Stop configure early if git or subconfigures fail.

12 years agorustc: Stop exported back::rpath::test
Brian Anderson [Fri, 6 Jan 2012 02:23:28 +0000 (18:23 -0800)]
rustc: Stop exported back::rpath::test

Tests no longer need to be exported

12 years agorustc: Allow the test runner to run unexported tests
Brian Anderson [Fri, 6 Jan 2012 02:16:42 +0000 (18:16 -0800)]
rustc: Allow the test runner to run unexported tests

12 years agoAttempt to fix build breakage due to lgammaf_r having two leading underscores on...
Graydon Hoare [Fri, 6 Jan 2012 01:54:16 +0000 (17:54 -0800)]
Attempt to fix build breakage due to lgammaf_r having two leading underscores on mingw.

12 years agorustc: Configure out #[test] functions when not testing
Brian Anderson [Fri, 6 Jan 2012 01:30:00 +0000 (17:30 -0800)]
rustc: Configure out #[test] functions when not testing

12 years agoSimplify NSIS package script.
Graydon Hoare [Fri, 6 Jan 2012 01:03:02 +0000 (17:03 -0800)]
Simplify NSIS package script.

12 years agoFix a couple paths in the dist target.
Graydon Hoare [Fri, 6 Jan 2012 00:36:34 +0000 (16:36 -0800)]
Fix a couple paths in the dist target.

12 years agoFix LICENSE.txt pointing to the wrong filenames.
Graydon Hoare [Fri, 6 Jan 2012 00:36:19 +0000 (16:36 -0800)]
Fix LICENSE.txt pointing to the wrong filenames.

12 years agorustc: Add cargo's lib directory to search paths
Brian Anderson [Fri, 6 Jan 2012 00:03:28 +0000 (16:03 -0800)]
rustc: Add cargo's lib directory to search paths

12 years agoUse precise return type to allocate retslot in trans_args
Marijn Haverbeke [Thu, 5 Jan 2012 21:45:02 +0000 (22:45 +0100)]
Use precise return type to allocate retslot in trans_args

Using type_of_or_i8 did, predictably, allocate an i8 for a type parameter,
which leads to memory corruption and general confusion.

Closes #1443

12 years agomake test typecheck
Niko Matsakis [Thu, 5 Jan 2012 06:07:03 +0000 (22:07 -0800)]
make test typecheck

12 years agofix pretty printer to correctly insert parens for disamb
Niko Matsakis [Thu, 5 Jan 2012 06:01:58 +0000 (22:01 -0800)]
fix pretty printer to correctly insert parens for disamb

12 years agoupdate test on disambig to reflect that some cases are no longer legal
Niko Matsakis [Thu, 5 Jan 2012 05:37:02 +0000 (21:37 -0800)]
update test on disambig to reflect that some cases are no longer legal

12 years agocorrect test to reference right value
Niko Matsakis [Thu, 5 Jan 2012 00:04:37 +0000 (16:04 -0800)]
correct test to reference right value

12 years agorequire a non-semi expr acting as a stmt to have unit return type
Niko Matsakis [Wed, 4 Jan 2012 22:16:41 +0000 (14:16 -0800)]
require a non-semi expr acting as a stmt to have unit return type

12 years agomake parser handle parenthesized block-sugar exprs properly
Niko Matsakis [Wed, 4 Jan 2012 06:03:07 +0000 (22:03 -0800)]
make parser handle parenthesized block-sugar exprs properly

12 years agoMerge pull request #1440 from boggle/kmath
Graydon Hoare [Thu, 5 Jan 2012 18:07:00 +0000 (10:07 -0800)]
Merge pull request #1440 from boggle/kmath

Upgraded math to C99 + bessel functions and replaced wrappers with imports

12 years agoMerge branch 'master' into kmath
Stefan Plantikow [Thu, 5 Jan 2012 16:18:40 +0000 (17:18 +0100)]
Merge branch 'master' into kmath

Conflicts:
src/libcore/float.rs

12 years agoMoved generic float::min, max to core::math and cleaned up some imports
Stefan Plantikow [Thu, 5 Jan 2012 16:11:34 +0000 (17:11 +0100)]
Moved generic float::min, max to core::math and cleaned up some imports

12 years agoClean up translating of def_ids in metadata reader
Marijn Haverbeke [Thu, 5 Jan 2012 15:04:59 +0000 (16:04 +0100)]
Clean up translating of def_ids in metadata reader

Reduces the amount of closure allocation, and makes the code cleaner.

12 years agoMerge branch 'master' into kmath
Stefan Plantikow [Thu, 5 Jan 2012 13:46:14 +0000 (14:46 +0100)]
Merge branch 'master' into kmath

12 years agoSwitch to new param kind bound syntax
Marijn Haverbeke [Thu, 5 Jan 2012 14:35:37 +0000 (15:35 +0100)]
Switch to new param kind bound syntax

And remove support for the old syntax

12 years agoClean up some FIXMEs related to impls
Marijn Haverbeke [Thu, 5 Jan 2012 13:55:23 +0000 (14:55 +0100)]
Clean up some FIXMEs related to impls

12 years agoGet external interfaces / impls working
Marijn Haverbeke [Thu, 5 Jan 2012 12:57:27 +0000 (13:57 +0100)]
Get external interfaces / impls working

Issue #1227

12 years agoRegister new snapshot
Marijn Haverbeke [Thu, 5 Jan 2012 10:54:28 +0000 (11:54 +0100)]
Register new snapshot

12 years agoFix bad spans for ast::ty parsing
Marijn Haverbeke [Thu, 5 Jan 2012 10:09:19 +0000 (11:09 +0100)]
Fix bad spans for ast::ty parsing

The span would be pointing after the actual text.

12 years agoWrite the iface type of an impl in the crate data
Marijn Haverbeke [Thu, 5 Jan 2012 09:57:19 +0000 (10:57 +0100)]
Write the iface type of an impl in the crate data

Also, move checking of ifaces into the collect phase of typeck
to give further passes some guarantees.

Issue #1227

12 years agoRemove ty::bind_params_in_type
Marijn Haverbeke [Thu, 5 Jan 2012 09:07:33 +0000 (10:07 +0100)]
Remove ty::bind_params_in_type

It does nothing that substitute_type_params can't do better.

12 years agoExpress some list primitives in a way that doesn't copy
Marijn Haverbeke [Thu, 5 Jan 2012 08:18:19 +0000 (09:18 +0100)]
Express some list primitives in a way that doesn't copy

It was somewhat embarassing that list::len copied its elements.

12 years agoAdd more item types to the ast_map so the test suite can build with debug info.
Josh Matthews [Thu, 5 Jan 2012 06:19:50 +0000 (01:19 -0500)]
Add more item types to the ast_map so the test suite can build with debug info.

12 years agoadded preliminary support for per-architecture generation of math constants (for...
Stefan Plantikow [Thu, 5 Jan 2012 02:14:47 +0000 (03:14 +0100)]
added preliminary support for per-architecture generation of math constants (for porting)

12 years agoMerge branch 'master' into kmath
Stefan Plantikow [Wed, 4 Jan 2012 23:11:25 +0000 (00:11 +0100)]
Merge branch 'master' into kmath

Conflicts:
src/libcore/cmath.rs

12 years agomake scanning more efficient by avoiding recomputation
Niko Matsakis [Wed, 4 Jan 2012 05:26:31 +0000 (21:26 -0800)]
make scanning more efficient by avoiding recomputation

12 years agoextend tester so that error msgs can be attached to lines
Niko Matsakis [Wed, 4 Jan 2012 05:01:48 +0000 (21:01 -0800)]
extend tester so that error msgs can be attached to lines

12 years agoUse the right types for methods in trans_impl
Marijn Haverbeke [Wed, 4 Jan 2012 21:12:43 +0000 (22:12 +0100)]
Use the right types for methods in trans_impl

This prevents misalignment between function and argument
types in corner cases.

12 years agoxfail-pretty iface-generic.rs until i have time to debug
Marijn Haverbeke [Wed, 4 Jan 2012 18:55:17 +0000 (19:55 +0100)]
xfail-pretty iface-generic.rs until i have time to debug

12 years agoReformat typestate error messages so as not to confuse emacs compilation mode
Tim Chevalier [Wed, 4 Jan 2012 17:40:36 +0000 (09:40 -0800)]
Reformat typestate error messages so as not to confuse emacs compilation mode

12 years agoAdd test for generic iface methods
Marijn Haverbeke [Wed, 4 Jan 2012 16:28:16 +0000 (17:28 +0100)]
Add test for generic iface methods

Issue #1227

12 years agoPrevent typenames in param bounds from resolving to their own param
Marijn Haverbeke [Wed, 4 Jan 2012 15:51:25 +0000 (16:51 +0100)]
Prevent typenames in param bounds from resolving to their own param

I.e. fn foo<T: seq<T>>(...). This leads to weird circularities that seem to
never make any sense, so it seems prudent to forbid it.

Issue #1227

12 years agoAdd visit_ty_params to visit.rs
Marijn Haverbeke [Wed, 4 Jan 2012 15:37:39 +0000 (16:37 +0100)]
Add visit_ty_params to visit.rs

And use it to make typechecking of bounds less error-prone.

12 years agoAdd either::is_left and either::is_right
Marijn Haverbeke [Wed, 4 Jan 2012 15:36:53 +0000 (16:36 +0100)]
Add either::is_left and either::is_right

12 years agoProperly typecheck and compile invocations of generic methods.
Marijn Haverbeke [Wed, 4 Jan 2012 10:32:26 +0000 (11:32 +0100)]
Properly typecheck and compile invocations of generic methods.

Aligning the type parameters of the ifaces, impls, and methods
correctly in typeck is almost brain surgery. Seems to work now for
everything I threw at it, but might still break in other corner cases.

Issue #1227

12 years ago"str": rename "str_from_cstr" to "from_cstr" (analogous to the other "from_*")
Lenny222 [Tue, 3 Jan 2012 18:08:13 +0000 (19:08 +0100)]
"str": rename "str_from_cstr" to "from_cstr" (analogous to the other "from_*")

12 years ago"char": use shorter names "to_lower"/"to_upper", analogous to the same names in ...
Lenny222 [Mon, 2 Jan 2012 20:29:44 +0000 (21:29 +0100)]
"char": use shorter names "to_lower"/"to_upper", analogous to the same names in "str"

12 years agoimplement str::is_whitespace using char::is_whitespace
Lenny222 [Mon, 2 Jan 2012 20:14:20 +0000 (21:14 +0100)]
implement str::is_whitespace using char::is_whitespace

12 years agoAdd missing ty_constr cases to trans::type_of_inner and ty::fold_ty.
Tim Chevalier [Tue, 3 Jan 2012 23:50:05 +0000 (15:50 -0800)]
Add missing ty_constr cases to trans::type_of_inner and ty::fold_ty.

Closes #970

12 years agoAllow tail expressions even in no_value blocks. Type checker
Niko Matsakis [Thu, 29 Dec 2011 20:03:39 +0000 (12:03 -0800)]
Allow tail expressions even in no_value blocks.  Type checker
will guarantee they have unit type.

12 years agonew tests
Niko Matsakis [Thu, 29 Dec 2011 17:49:33 +0000 (09:49 -0800)]
new tests

12 years agoextend parser so that expressions that do not require semi-colons
Niko Matsakis [Thu, 29 Dec 2011 15:13:27 +0000 (07:13 -0800)]
extend parser so that expressions that do not require semi-colons
to be statements are not considered expressions in the tail position

12 years agorewrite to put blk as 2nd arg
Niko Matsakis [Thu, 22 Dec 2011 06:16:28 +0000 (22:16 -0800)]
rewrite to put blk as 2nd arg

12 years agominimal changes to permit fn blocks in expr
Niko Matsakis [Wed, 21 Dec 2011 04:12:52 +0000 (20:12 -0800)]
minimal changes to permit fn blocks in expr

12 years agoMerge pull request #1392 from Lenny222/list
Brian Anderson [Tue, 3 Jan 2012 20:18:53 +0000 (12:18 -0800)]
Merge pull request #1392 from Lenny222/list

list: add "is_not_empty" requirement to "head" and "tail" (analogous to "vec")

12 years agoMake resolution of dictionaries on bounded params work
Marijn Haverbeke [Tue, 3 Jan 2012 15:37:41 +0000 (16:37 +0100)]
Make resolution of dictionaries on bounded params work

Issue #1227

12 years agoWire in resolution of param bounds for method calls
Marijn Haverbeke [Tue, 3 Jan 2012 15:07:26 +0000 (16:07 +0100)]
Wire in resolution of param bounds for method calls

Issue #1227

12 years agoMake syntax for impls less magical
Marijn Haverbeke [Tue, 3 Jan 2012 14:29:28 +0000 (15:29 +0100)]
Make syntax for impls less magical

The trick of interpreting parameters to the iface type as parameters
to the impl was just too magical.

Issue #1227

12 years agoMore work on translating dictionary-passing
Marijn Haverbeke [Mon, 2 Jan 2012 15:50:51 +0000 (16:50 +0100)]
More work on translating dictionary-passing

Reached a point where simple uses of interfaces without bounds work.

Issue #1227

12 years agollvm: Revert unneeded debugging change
Brian Anderson [Mon, 2 Jan 2012 20:18:23 +0000 (12:18 -0800)]
llvm: Revert unneeded debugging change

12 years agoFix expected error messages for better printing of ty_ptr
Marijn Haverbeke [Mon, 2 Jan 2012 14:59:04 +0000 (15:59 +0100)]
Fix expected error messages for better printing of ty_ptr

12 years agoAdd a clause ty_ptr to ppaux::ty_to_str
Marijn Haverbeke [Mon, 2 Jan 2012 14:42:13 +0000 (15:42 +0100)]
Add a clause ty_ptr to ppaux::ty_to_str

Closes #1383

12 years agoAdd 'copy' bounds to functions that were faultily accepted without
Marijn Haverbeke [Mon, 2 Jan 2012 14:31:58 +0000 (15:31 +0100)]
Add 'copy' bounds to functions that were faultily accepted without

Issue #1390

12 years agoProperly handle expression blocks in kind.rs
Marijn Haverbeke [Mon, 2 Jan 2012 14:23:11 +0000 (15:23 +0100)]
Properly handle expression blocks in kind.rs

It was only noticing them in expr_block form, not as function
bodies.

Closes #1390

12 years agotypo
Lenny222 [Mon, 2 Jan 2012 13:03:06 +0000 (14:03 +0100)]
typo

12 years agoWrite out vtables for interface implementations
Marijn Haverbeke [Mon, 2 Jan 2012 12:26:51 +0000 (13:26 +0100)]
Write out vtables for interface implementations

Issue #1227

12 years agoDrop two useless sub-passes from trans
Marijn Haverbeke [Mon, 2 Jan 2012 11:58:31 +0000 (12:58 +0100)]
Drop two useless sub-passes from trans

Neither collect_tag_ctors nor the second pass in collect_items needed
to be separate passes.

Also remove obsolete obj_methods table kludge.

12 years agoCreate a trans_impl module
Marijn Haverbeke [Mon, 2 Jan 2012 11:21:44 +0000 (12:21 +0100)]
Create a trans_impl module

12 years agoKey tcx.ty_param_bounds on node_ids, not def_ids
Marijn Haverbeke [Mon, 2 Jan 2012 11:13:26 +0000 (12:13 +0100)]
Key tcx.ty_param_bounds on node_ids, not def_ids

This makes it clearer that it's only valid for local nodes.

12 years agoBox arrays of parameter bounds
Marijn Haverbeke [Mon, 2 Jan 2012 11:09:26 +0000 (12:09 +0100)]
Box arrays of parameter bounds

12 years agoPass bounds to trans::type_of_fn
Marijn Haverbeke [Mon, 2 Jan 2012 11:00:40 +0000 (12:00 +0100)]
Pass bounds to trans::type_of_fn

12 years agoMore resolving and typechecking of bounded type parameters.
Marijn Haverbeke [Thu, 29 Dec 2011 12:12:52 +0000 (13:12 +0100)]
More resolving and typechecking of bounded type parameters.

Extern interfaces still don't get recognized.

Issue #1227

12 years agoCheck that type parameter bounds are interface types
Marijn Haverbeke [Thu, 29 Dec 2011 10:23:35 +0000 (11:23 +0100)]
Check that type parameter bounds are interface types

Issue #1227

12 years agoFix confusing information in tutorial chapter about argument modes
Marijn Haverbeke [Mon, 2 Jan 2012 09:23:04 +0000 (10:23 +0100)]
Fix confusing information in tutorial chapter about argument modes

12 years agoMake last-use pass properly handle closed-over variables
Marijn Haverbeke [Mon, 2 Jan 2012 09:20:58 +0000 (10:20 +0100)]
Make last-use pass properly handle closed-over variables

Closes #1399