]> git.lizzy.rs Git - rust.git/log
rust.git
13 years agoAdd uint::min
Jesse Ruderman [Sun, 10 Jul 2011 23:09:48 +0000 (16:09 -0700)]
Add uint::min

13 years agoAdd a missing case so nbody.rs can pp
Jesse Ruderman [Sun, 10 Jul 2011 23:09:12 +0000 (16:09 -0700)]
Add a missing case so nbody.rs can pp

13 years agoExport noop_fold_expr so the fuzzer can use it
Jesse Ruderman [Sun, 10 Jul 2011 23:08:13 +0000 (16:08 -0700)]
Export noop_fold_expr so the fuzzer can use it

13 years agofuzzer.rs is now a pseudo-fuzzer that takes an AST and replaces expressions inside it
Jesse Ruderman [Sun, 10 Jul 2011 23:03:01 +0000 (16:03 -0700)]
fuzzer.rs is now a pseudo-fuzzer that takes an AST and replaces expressions inside it

13 years agoType-parameterize ivec_fuzz
Jesse Ruderman [Sun, 10 Jul 2011 23:00:38 +0000 (16:00 -0700)]
Type-parameterize ivec_fuzz

13 years agoRemove comments complaining about https://github.com/graydon/rust/issues/633 since...
Jesse Ruderman [Fri, 8 Jul 2011 12:50:01 +0000 (05:50 -0700)]
Remove comments complaining about https://github.com/graydon/rust/issues/633 since it is fixed

13 years agoPieces of a fuzzer, WIP
Jesse Ruderman [Fri, 8 Jul 2011 09:16:46 +0000 (02:16 -0700)]
Pieces of a fuzzer, WIP

13 years agoMake #fmt work from inside std. Issue #175
Brian Anderson [Mon, 11 Jul 2011 00:00:28 +0000 (17:00 -0700)]
Make #fmt work from inside std. Issue #175

At long last, this patch makes #fmt usable from inside the standard library.
The way it does it us very hackish, but at least it works now.

13 years agoUse more encapsulation for metadata::cstore
Brian Anderson [Sun, 10 Jul 2011 05:56:12 +0000 (22:56 -0700)]
Use more encapsulation for metadata::cstore

13 years agostdlib: Remove FIXME that's more like a WONTFIX
Patrick Walton [Sun, 10 Jul 2011 22:35:06 +0000 (15:35 -0700)]
stdlib: Remove FIXME that's more like a WONTFIX

13 years agostdlib: Remove the cast from ioivec
Patrick Walton [Sun, 10 Jul 2011 20:22:29 +0000 (13:22 -0700)]
stdlib: Remove the cast from ioivec

13 years agostdlib: Implement an interior-vector version of the io module
Patrick Walton [Sun, 10 Jul 2011 19:47:51 +0000 (12:47 -0700)]
stdlib: Implement an interior-vector version of the io module

13 years agostdlib: Implement str::bytes_ivec() using pointers and casts
Patrick Walton [Sun, 10 Jul 2011 09:05:52 +0000 (02:05 -0700)]
stdlib: Implement str::bytes_ivec() using pointers and casts

13 years agostdlib: Add missing unsafe.rs. Puts out burning tinderbox.
Patrick Walton [Sun, 10 Jul 2011 08:32:35 +0000 (01:32 -0700)]
stdlib: Add missing unsafe.rs. Puts out burning tinderbox.

13 years agort: Remove the now-unused upcall_ivec_resize and upcall_ivec_spill, which allocated...
Patrick Walton [Sun, 10 Jul 2011 08:30:45 +0000 (01:30 -0700)]
rt: Remove the now-unused upcall_ivec_resize and upcall_ivec_spill, which allocated from the wrong heap

13 years agostdlib: Add unsafe to the std.rc, now that it actually builds
Patrick Walton [Sun, 10 Jul 2011 08:24:31 +0000 (01:24 -0700)]
stdlib: Add unsafe to the std.rc, now that it actually builds

13 years agort: Remove the _2 prefix from intrinsics; all rust-intrinsics now use explicit return...
Patrick Walton [Sun, 10 Jul 2011 08:20:18 +0000 (01:20 -0700)]
rt: Remove the _2 prefix from intrinsics; all rust-intrinsics now use explicit return pointers

13 years agosnap: Register new snapshots
Patrick Walton [Sun, 10 Jul 2011 08:13:00 +0000 (01:13 -0700)]
snap: Register new snapshots

13 years agorustc: Make rust-intrinsics take an explicit return pointer
Patrick Walton [Sun, 10 Jul 2011 04:13:25 +0000 (21:13 -0700)]
rustc: Make rust-intrinsics take an explicit return pointer

13 years agostdlib: Implement casts. The horror.
Patrick Walton [Sun, 10 Jul 2011 03:14:20 +0000 (20:14 -0700)]
stdlib: Implement casts. The horror.

13 years agoGenerate code to load a crate's tests into the std test runner. Issue #428
Brian Anderson [Sun, 10 Jul 2011 01:36:19 +0000 (18:36 -0700)]
Generate code to load a crate's tests into the std test runner. Issue #428

13 years agoBegin adding some test runner types to std. Issue #428
Brian Anderson [Sat, 9 Jul 2011 23:08:03 +0000 (16:08 -0700)]
Begin adding some test runner types to std. Issue #428

13 years agoCollect functions that look like unit tests. Issue #428
Brian Anderson [Sat, 9 Jul 2011 04:45:50 +0000 (21:45 -0700)]
Collect functions that look like unit tests. Issue #428

13 years agoTrack the path as we fold over the AST looking for unit tests. Issue #428
Brian Anderson [Sat, 9 Jul 2011 03:52:54 +0000 (20:52 -0700)]
Track the path as we fold over the AST looking for unit tests. Issue #428

13 years agoAdd sha1 and int tests to stdtest. Issue #428
Brian Anderson [Sat, 9 Jul 2011 03:52:26 +0000 (20:52 -0700)]
Add sha1 and int tests to stdtest. Issue #428

13 years agoBegin running the test for int::pow
Brian Anderson [Sat, 9 Jul 2011 03:49:38 +0000 (20:49 -0700)]
Begin running the test for int::pow

Somehow this has been disabled forever

13 years agoTests for constraint propagation
Tim Chevalier [Sat, 9 Jul 2011 05:18:23 +0000 (22:18 -0700)]
Tests for constraint propagation

13 years agoPropagate constraints through copy, move, and swap
Tim Chevalier [Sat, 9 Jul 2011 05:05:30 +0000 (22:05 -0700)]
Propagate constraints through copy, move, and swap

Assignments and moves with a simple local variable reference on the
RHS now propagate any typestate constraints the RHS was involved
in to the LHS. Swaps where both sides are local variables
exchange the constraints.

This was a pain in the butt and I'm still not proud of the resulting
code. Needs refactoring like whoa.

13 years agoMinor refactoring
Tim Chevalier [Sat, 9 Jul 2011 04:50:09 +0000 (21:50 -0700)]
Minor refactoring

13 years agoAlias-ify some prettyprinting functions
Tim Chevalier [Sat, 9 Jul 2011 04:49:40 +0000 (21:49 -0700)]
Alias-ify some prettyprinting functions

13 years agoImprove impossible-case handling in ty::get_element_type
Tim Chevalier [Sat, 9 Jul 2011 04:49:34 +0000 (21:49 -0700)]
Improve impossible-case handling in ty::get_element_type

13 years agostdlib: Implement str::unsafe_from_bytes_ivec()
Patrick Walton [Sat, 9 Jul 2011 05:23:11 +0000 (22:23 -0700)]
stdlib: Implement str::unsafe_from_bytes_ivec()

13 years agostdlib: Add an offset function for simple pointer arithmetic on unsafe pointers
Patrick Walton [Sat, 9 Jul 2011 04:55:43 +0000 (21:55 -0700)]
stdlib: Add an offset function for simple pointer arithmetic on unsafe pointers

13 years agoImprove the error message for import glob collisions. Closes #482
Brian Anderson [Sat, 9 Jul 2011 01:41:37 +0000 (18:41 -0700)]
Improve the error message for import glob collisions. Closes #482

Instead of noting where the imported things were defined, note where they were
imported. This is more useful and avoids issue #482.

13 years agoAdd test case for issue #333. Closes #333
Brian Anderson [Sat, 9 Jul 2011 00:43:44 +0000 (17:43 -0700)]
Add test case for issue #333. Closes #333

This has been fixed by a mystery hacker.

13 years agorustc: Use interior vectors for the union-find in rustc
Patrick Walton [Sat, 9 Jul 2011 00:00:21 +0000 (17:00 -0700)]
rustc: Use interior vectors for the union-find in rustc

13 years agosnap: Register new snapshots
Patrick Walton [Fri, 8 Jul 2011 23:51:25 +0000 (16:51 -0700)]
snap: Register new snapshots

13 years agorustc: Move maps over to interior vectors
Patrick Walton [Fri, 8 Jul 2011 23:36:31 +0000 (16:36 -0700)]
rustc: Move maps over to interior vectors

13 years agorustc: Fix a level-of-indirection problem by using size_of() to compute dynamically...
Patrick Walton [Fri, 8 Jul 2011 23:31:28 +0000 (16:31 -0700)]
rustc: Fix a level-of-indirection problem by using size_of() to compute dynamically sized interior vector element sizes instead of field_of_tydesc()

13 years agoDecode types across multiple crates. Closes #632
Brian Anderson [Fri, 8 Jul 2011 21:53:25 +0000 (14:53 -0700)]
Decode types across multiple crates. Closes #632

13 years agoNicer pretty-printing for anon objs. Closes #499.
Lindsey Kuper [Fri, 8 Jul 2011 22:00:47 +0000 (15:00 -0700)]
Nicer pretty-printing for anon objs.  Closes #499.

(Incidentally, what's the right way to test changes to the
pretty-printer?  There has to be a better way than what I did, which
was to log_err the results of expr_to_str as exprs passed through
trans and glance at the output.)

13 years agoRecursively load dependencies of external crates. Issue #632
Brian Anderson [Fri, 8 Jul 2011 19:55:38 +0000 (12:55 -0700)]
Recursively load dependencies of external crates. Issue #632

13 years agoRefactor load_library_crate and resolve_crate
Brian Anderson [Fri, 8 Jul 2011 19:40:16 +0000 (12:40 -0700)]
Refactor load_library_crate and resolve_crate

13 years agoAdd a map from external cnums to local cnums in cstore::crate_metadata
Brian Anderson [Fri, 8 Jul 2011 19:08:43 +0000 (12:08 -0700)]
Add a map from external cnums to local cnums in cstore::crate_metadata

Once populated, this will allow us to load type info for types defined in
external crates referenced by other external crates.

13 years agoExtract resolve_crate from creader::visit_view_item
Brian Anderson [Fri, 8 Jul 2011 19:04:52 +0000 (12:04 -0700)]
Extract resolve_crate from creader::visit_view_item

13 years agoAdding more support for working with u64s.
Eric Holk [Fri, 8 Jul 2011 19:18:54 +0000 (12:18 -0700)]
Adding more support for working with u64s.

13 years agoTry to use static crate if we cannot find the dynamic one. This supports
Rafael Ávila de Espíndola [Fri, 8 Jul 2011 19:33:00 +0000 (15:33 -0400)]
Try to use static crate if we cannot find the dynamic one. This supports
the common case of wanting to link statically with the project's libraries
but dynamically with the system ones.

13 years agoAdd just enough logic to the driver so that we can link std statically.
Rafael Ávila de Espíndola [Fri, 8 Jul 2011 19:03:48 +0000 (15:03 -0400)]
Add just enough logic to the driver so that we can link std statically.

13 years agostdlib: Add an interior vector version of union-find for now
Patrick Walton [Fri, 8 Jul 2011 18:43:14 +0000 (11:43 -0700)]
stdlib: Add an interior vector version of union-find for now

13 years agoAdded an environment variable to override the minimum stack size. Closes #637.
Eric Holk [Fri, 8 Jul 2011 18:34:42 +0000 (11:34 -0700)]
Added an environment variable to override the minimum stack size. Closes #637.

13 years agoFix newlines when outputting crate attributes with --ls
Brian Anderson [Fri, 8 Jul 2011 18:33:51 +0000 (11:33 -0700)]
Fix newlines when outputting crate attributes with --ls

13 years agoEncode/decode a crate's externel dependencies. Issue #632
Brian Anderson [Fri, 8 Jul 2011 18:29:56 +0000 (11:29 -0700)]
Encode/decode a crate's externel dependencies. Issue #632

The encoding is very simple right now, just the crate name. Ultimately this
won't be enough for our versioning needs, but it should fill our immediate
need of being able to correlate encoded crate numbers to actual crates.

13 years agorustc: Do dynamic size calculations properly when concatenating interior vectors...
Patrick Walton [Fri, 8 Jul 2011 18:29:29 +0000 (11:29 -0700)]
rustc: Do dynamic size calculations properly when concatenating interior vectors. Closes #640.

13 years agoDon't export tyencode from the metadata module
Brian Anderson [Fri, 8 Jul 2011 06:55:41 +0000 (23:55 -0700)]
Don't export tyencode from the metadata module

This involves pulling the type_abbrev cache out of crate_ctxt

13 years agoCleanup decoding and crate searching
Brian Anderson [Fri, 8 Jul 2011 06:29:09 +0000 (23:29 -0700)]
Cleanup decoding and crate searching

13 years agoMake the interface to metadata::csearch more consistent
Brian Anderson [Fri, 8 Jul 2011 05:57:09 +0000 (22:57 -0700)]
Make the interface to metadata::csearch more consistent

13 years agoRemove unused functions from metadata::csearch
Brian Anderson [Fri, 8 Jul 2011 05:58:32 +0000 (22:58 -0700)]
Remove unused functions from metadata::csearch

13 years agoExtract various dependencies from metadata::decoder to metadata::csearch
Brian Anderson [Fri, 8 Jul 2011 05:30:07 +0000 (22:30 -0700)]
Extract various dependencies from metadata::decoder to metadata::csearch

13 years agoBegin splitting metadata::decoder into decoding and crate search modules
Brian Anderson [Fri, 8 Jul 2011 05:18:38 +0000 (22:18 -0700)]
Begin splitting metadata::decoder into decoding and crate search modules

13 years agoReplace various ints with ast::crate_nums
Brian Anderson [Fri, 8 Jul 2011 05:01:38 +0000 (22:01 -0700)]
Replace various ints with ast::crate_nums

13 years agoMove external crate/lib resolution to its own pass
Brian Anderson [Fri, 8 Jul 2011 04:43:26 +0000 (21:43 -0700)]
Move external crate/lib resolution to its own pass

The scope of external crate reading is beyond the resolve pass now, as it
builds up tables of information needed for several different purposes.

13 years agoMove crate_map from resolve to cstore
Brian Anderson [Fri, 8 Jul 2011 04:37:56 +0000 (21:37 -0700)]
Move crate_map from resolve to cstore

13 years agoRemove non-existant export from metadata::decoder
Brian Anderson [Fri, 8 Jul 2011 04:15:33 +0000 (21:15 -0700)]
Remove non-existant export from metadata::decoder

13 years agoComment creader
Brian Anderson [Fri, 8 Jul 2011 04:03:09 +0000 (21:03 -0700)]
Comment creader

13 years agoComment cstore
Brian Anderson [Fri, 8 Jul 2011 01:39:44 +0000 (18:39 -0700)]
Comment cstore

13 years agoMove used_link_args from session to cstore
Brian Anderson [Fri, 8 Jul 2011 01:38:42 +0000 (18:38 -0700)]
Move used_link_args from session to cstore

13 years agoMove used_libraries from session to cstore
Brian Anderson [Fri, 8 Jul 2011 01:33:59 +0000 (18:33 -0700)]
Move used_libraries from session to cstore

13 years agoMove used_crate_files from session to cstore
Brian Anderson [Fri, 8 Jul 2011 01:25:56 +0000 (18:25 -0700)]
Move used_crate_files from session to cstore

13 years agoReplace the crate cache in session with the one in cstore
Brian Anderson [Fri, 8 Jul 2011 01:13:24 +0000 (18:13 -0700)]
Replace the crate cache in session with the one in cstore

13 years agoIntroduce metadata::cstore
Brian Anderson [Fri, 8 Jul 2011 01:00:16 +0000 (18:00 -0700)]
Introduce metadata::cstore

I intend for this to be the location for storing all the data retrieved by
creader, most of which is currently in the session.

13 years agoIgnore current scope when resolving self-shadowing imports
Marijn Haverbeke [Fri, 8 Jul 2011 14:04:40 +0000 (16:04 +0200)]
Ignore current scope when resolving self-shadowing imports

That is, for example, import x::y::x, which defines a local x,
and thus wouldn't be able to find x::y anymore.

Closes issue #624

13 years agoDon't unbox types in ty::is_binopable, do it on typeck side instead
Marijn Haverbeke [Fri, 8 Jul 2011 13:52:54 +0000 (15:52 +0200)]
Don't unbox types in ty::is_binopable, do it on typeck side instead

Closes issue #631

Removes ty::strip_boxes entirely, since unboxing is now more complicated
anyway.

13 years agoRemove useless return value in typeck::check_decl_local
Marijn Haverbeke [Fri, 8 Jul 2011 13:01:54 +0000 (15:01 +0200)]
Remove useless return value in typeck::check_decl_local

13 years agoAuto-bind generic functions when their value is taken in non-call context
Marijn Haverbeke [Fri, 8 Jul 2011 12:28:46 +0000 (14:28 +0200)]
Auto-bind generic functions when their value is taken in non-call context

trans::trans_lval will now autobind if the given expression was the
name of a generic functions. Those callees (trans_call and trans_bind)
that are interested in the generics information call trans_lval_gen
now.

13 years agoAvoid superfluous take/drop for temp values passes as arguments
Marijn Haverbeke [Fri, 8 Jul 2011 09:02:26 +0000 (11:02 +0200)]
Avoid superfluous take/drop for temp values passes as arguments

13 years agoMake for-each bodies close over their parent's iterbody
Marijn Haverbeke [Fri, 8 Jul 2011 09:20:02 +0000 (11:20 +0200)]
Make for-each bodies close over their parent's iterbody

Closes issue #639

13 years agorustc: Check iter return types. Closes #638.
Patrick Walton [Fri, 8 Jul 2011 02:08:59 +0000 (19:08 -0700)]
rustc: Check iter return types. Closes #638.

13 years agorustc: Fix long line
Patrick Walton [Fri, 8 Jul 2011 01:41:54 +0000 (18:41 -0700)]
rustc: Fix long line

13 years agorustc: Make trans use interior vectors
Patrick Walton [Fri, 8 Jul 2011 01:30:35 +0000 (18:30 -0700)]
rustc: Make trans use interior vectors

13 years agorustc: Remove all exterior vectors from the AST
Patrick Walton [Thu, 7 Jul 2011 22:31:54 +0000 (15:31 -0700)]
rustc: Remove all exterior vectors from the AST

13 years agoSome cleanup
Eric Holk [Fri, 8 Jul 2011 01:32:45 +0000 (18:32 -0700)]
Some cleanup

13 years agoFixed two races.
Eric Holk [Fri, 8 Jul 2011 01:18:52 +0000 (18:18 -0700)]
Fixed two races.

The first is that the memory_region destructor would complain there is
still an outstanding allocation. This is because circular_buffer from
rust_chan wasn't refing its task, so the task was being destructed too
soon.

The second was where the program could deadlock while joining a
task. The target task would die in the time between checking whether
the task should block and then actually blocking. The fix is to use
the target task's lock.

13 years agoAdded a stress test mode to pfib.
Eric Holk [Fri, 8 Jul 2011 00:28:20 +0000 (17:28 -0700)]
Added a stress test mode to pfib.

13 years agoMade TRACK_ALLOCATIONS add only constant time overhead. This makes it
Eric Holk [Thu, 7 Jul 2011 23:24:35 +0000 (16:24 -0700)]
Made TRACK_ALLOCATIONS add only constant time overhead. This makes it
feasible to turn it on and run rustc.

13 years agoTightened up the scoping for our various new operators, which should
Eric Holk [Thu, 7 Jul 2011 20:06:38 +0000 (13:06 -0700)]
Tightened up the scoping for our various new operators, which should
make it harder to use the wrong one.

13 years agoWork on debugging race conditions.
Eric Holk [Thu, 7 Jul 2011 18:53:08 +0000 (11:53 -0700)]
Work on debugging race conditions.

Ports and channels have been moved to the kernel pool, since they've
been known to outlive their associated task. This probably isn't the
right thing to do, the life cycle needs fixed instead.

Some refactorying in memory_region.cpp. Added a helper function to
increment and decrement the allocation counter. This makes it easier
to switch between atomic and non-atomic increments. Using atomic
increments for now, although this still does not fix the problem.

13 years agoRemoving the synchronized memory region from tasks.
Eric Holk [Wed, 6 Jul 2011 23:42:02 +0000 (16:42 -0700)]
Removing the synchronized memory region from tasks.

13 years agoRemoving most of the locks in rust_upcall.cpp and elsewhere.
Eric Holk [Wed, 6 Jul 2011 19:48:43 +0000 (12:48 -0700)]
Removing most of the locks in rust_upcall.cpp and elsewhere.

13 years agoUn-xfail a test.
Lindsey Kuper [Fri, 8 Jul 2011 00:39:35 +0000 (17:39 -0700)]
Un-xfail a test.

13 years agoFix a bug that was interfering with method overriding. Issue #543.
Lindsey Kuper [Fri, 8 Jul 2011 00:10:17 +0000 (17:10 -0700)]
Fix a bug that was interfering with method overriding.  Issue #543.

Previously, we were creating both a normal vtable entry and a
forwarding function for overriding methods, when they should have just
gotten a vtable entry.  This patch fixes that.

13 years agoAdd missing rules to 'make clean'
Brian Anderson [Fri, 8 Jul 2011 00:22:39 +0000 (17:22 -0700)]
Add missing rules to 'make clean'

13 years agoMake the rules for compiling rustc explicit
Brian Anderson [Fri, 8 Jul 2011 00:11:34 +0000 (17:11 -0700)]
Make the rules for compiling rustc explicit

Not sure why they were implicit since their dependencies only work for rustc

13 years agoAdd missing rt/rustllvm rules for static libstd
Brian Anderson [Thu, 7 Jul 2011 23:57:17 +0000 (16:57 -0700)]
Add missing rt/rustllvm rules for static libstd

13 years agoComplete the transition of glue.o to the lib directory
Brian Anderson [Thu, 7 Jul 2011 23:52:01 +0000 (16:52 -0700)]
Complete the transition of glue.o to the lib directory

13 years agoRegister new snapshots
Brian Anderson [Thu, 7 Jul 2011 23:40:58 +0000 (16:40 -0700)]
Register new snapshots

New snapshots also include rt and rustllvm

13 years agoAdd rt and rustllvm to the snapshot
Brian Anderson [Thu, 7 Jul 2011 22:29:47 +0000 (15:29 -0700)]
Add rt and rustllvm to the snapshot

13 years agoRemove the llvm lib directory from LD_LIBRARY_PATH on unixy systems
Brian Anderson [Thu, 7 Jul 2011 22:18:50 +0000 (15:18 -0700)]
Remove the llvm lib directory from LD_LIBRARY_PATH on unixy systems

Doesn't seem like this has been required for a while. I don't know enough
about the windows build to try to touch that.

13 years agoAlso copy rt and rustllvm to stage0 for now
Brian Anderson [Thu, 7 Jul 2011 22:08:31 +0000 (15:08 -0700)]
Also copy rt and rustllvm to stage0 for now

Once we've updated the snapshots to include them we can remove these rules

13 years agoput librustrt and librustllvm in stageN dirs. Issue #438
Erick Tryzelaar [Thu, 7 Jul 2011 13:39:11 +0000 (06:39 -0700)]
put librustrt and librustllvm in stageN dirs. Issue #438

13 years agoMerge pull request #634 from robarnold/upstream-stable
Patrick Walton [Thu, 7 Jul 2011 22:18:07 +0000 (15:18 -0700)]
Merge pull request #634 from robarnold/upstream-stable

Allocate ivecs out of the kernel pool