Patrick Walton
0cd72d24dc
rustc: Autoderef through region pointers
2012-03-14 16:13:05 -07:00
Marijn Haverbeke
de79caa97e
Add crude support for casts in constant expressions
...
Only casts to integral and float types are supported
Closes #1975
2012-03-14 18:05:28 +01:00
Brian Anderson
aeb445b2ea
rustc: Don't make the while loop body's basic block a child of the condition
...
As a child of the condition, when the body encounters a ret or break it
incorrectly re-runs the cleanups of the condition.
2012-03-13 17:27:17 -07:00
Brian Anderson
cd72b1f848
Overhaul constructor naming in libs
2012-03-13 11:07:22 -07:00
Marijn Haverbeke
463cf837eb
rustc: Teach trans::alt.rs about exhaustive alts
...
Closes #1971
2012-03-13 16:20:31 +01:00
Graydon Hoare
6f5853f5a1
Libc/os/run/rand/io reorganization. Close #1373 . Close #1638 .
...
- Move io, run and rand to core.
- Remove incorrect ctypes module (use libc).
- Remove os-specific modules for os and fs.
- Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Patrick Walton
dd610a151b
rustc: Add node IDs to AST types so we can associate them with region environments
2012-03-12 17:34:37 -07:00
Patrick Walton
59a56ad043
Revert "rustc: Add node IDs to AST types so we can associate them with region environments"
...
This reverts commit 96e1bbd4a0
.
2012-03-12 16:33:55 -07:00
Patrick Walton
96e1bbd4a0
rustc: Add node IDs to AST types so we can associate them with region environments
2012-03-12 16:28:15 -07:00
Tim Chevalier
35400e13ad
Use loop instead of while(true) in libraries and compiler itself
...
And remove spurious fails/unreachable() calls.
2012-03-10 20:34:17 -08:00
Tim Chevalier
321fd80219
Add an infinite loop construct
...
Add a loop {} construct for infinite loops, and use it in test
cases. See #1906 for details.
2012-03-09 16:40:58 -08:00
Patrick Walton
ddeaea2287
rustc: Change the address-of operator to an explicit production so that we can parse the mutability
2012-03-08 16:34:36 -08:00
Patrick Walton
0722786664
rustc: Add some missing cases in various folds for reference types and some broken trans code for the address-of operator
2012-03-08 15:55:28 -08:00
Marijn Haverbeke
c71306b0db
Explicitly store self_ids use for self locals in methods
...
This makes it possible to move them between crates without confusion,
and to instantiate them at a point where the monomorphizing
substitutions are known.
Issue #1944
2012-03-08 21:17:32 +01:00
Marijn Haverbeke
fd465f91a8
Drop collect_items pass, create decls on demand
...
This solves a problem with inlined functions that have inner functions.
2012-03-08 21:17:32 +01:00
Patrick Walton
ec8380f9b1
rustc: Add the safe address-of operator to the AST
2012-03-08 12:04:02 -08:00
Niko Matsakis
2bfed908e3
Fix #1941 : inlining of items that themselves contain nested items
...
The fix is to drop nested items from the encoded AST. Nested items may
themselves be inlined, but that is an independent question.
2012-03-07 18:06:29 -08:00
Niko Matsakis
712dd23541
make inline enabled by default
2012-03-06 09:01:40 -08:00
Marijn Haverbeke
19508c7d53
Make trans pass responsible for pulling in inlined functions
...
This makes the logic for finding the inlinable items much easier --
they are simply pulled in lazily when encountered.
2012-03-06 14:00:21 +01:00
Brian Anderson
0ee96de4ee
rustc: Lower case error messages
2012-03-05 17:05:20 -08:00
Niko Matsakis
0416a946b7
give user control of whether we use inline hint or inline always
...
supply inline hints for resource ctors/dtors
2012-03-05 16:47:51 -08:00
Niko Matsakis
cc2ebfc105
set LLVM inline hint for all #[inline] methods, whether CC or local
2012-03-05 16:47:51 -08:00
Brian Anderson
15df3950ad
rustc: Remove remaining non-inbounds GEPs
2012-03-05 15:12:36 -08:00
Tim Chevalier
e2fa6f03f5
Translate simple classes
...
Programs using classes with fields only (no methods) compile and run,
as long as nothing refers to a class in a different crate (todo).
Also changed the AST representation of classes to have a separate
record for constructor info (instead of inlining the fields in the
item_class node), and fixed up spans and pretty-printing for
classes.
2012-03-04 12:43:17 -08:00
Graydon Hoare
87c14f1e3d
Move src/comp to src/rustc
2012-03-02 18:46:13 -08:00