Daniel Micay
a32c5c73ee
oldmap: get rid of legacy _ref suffixes
2013-02-08 19:12:51 -05:00
Jed Davis
9318babf6c
Fix const array index limit calculation.
...
The number of operands of the LLVM node initializing the array
underlying a const vector isn't always the array length -- if the
array is of a sufficiently primitive type and all the elements' values
are known (or something like that), LLVM uses a specialized Constant
subclass that stores the data packed, and thus has no operands. Oops.
But, because llsize_of now gives us a ConstantInt, we can just fix
mozilla/rust#3169 and this all goes away.
2013-02-08 01:52:55 -08:00
Jed Davis
e89d9853a6
Fix vector indexing in consts so it works with the enum vector const fix.
2013-02-07 18:31:12 -08:00
Jed Davis
de8dc02634
Make tuple-like structs containing enums work as constants.
2013-02-07 18:31:12 -08:00
Jed Davis
30aae3d910
Fix const enum type issues for structs.
2013-02-07 18:31:12 -08:00
Jed Davis
29b99669dc
Fix pointer consts to work with enums
2013-02-07 18:28:31 -08:00
Jed Davis
9ad616a102
Make vectors of enums work as constants
2013-02-07 18:28:11 -08:00
Jed Davis
6cdc283415
Also need to pad out "C-like" enum consts (paths as well as calls).
2013-02-07 17:57:02 -08:00
Jed Davis
877fc8d891
Pad out enum consts to the expected size; makes enums in tuples work.
...
This is wasted space if the const is just an enum, but optimizing that
case without breaking everything else is an issue that can be addressed
separately.
2013-02-07 17:57:02 -08:00
Jed Davis
52cf61fd3b
Fix const enums better: let them have the same alignment as an "opaque enum".
2013-02-07 17:57:02 -08:00
Patrick Walton
cf6c3d96fb
librustc: Attempt to put out burning tree by fixing translation of unary negation in boolean constants. rs=burningtree
2013-02-06 15:38:23 -08:00
Patrick Walton
801f3225b2
oldmap: use &K instead of K in find and get
...
This reverts commit a4250a96fd
.
This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd
Revert "oldmap: use &K instead of K in find and get"
...
This reverts commit 8e643525d4
.
2013-02-05 14:30:53 -08:00
Daniel Micay
8e643525d4
oldmap: use &K instead of K in find and get
2013-02-03 23:30:56 -05:00
Daniel Micay
f4a27b2c7d
oldmap: get rid of the legacy contains_key method
2013-02-03 15:55:10 -05:00
Patrick Walton
ba11e96289
librustc: De-export trans. rs=deexporting
2013-01-30 11:47:02 -08:00
Graydon Hoare
cb1f957f71
rustc: fix const enums to be packed, r=burningtree.
2013-01-23 16:25:57 -08:00
Graydon Hoare
bcaeb20800
long line police
2013-01-22 17:53:27 -08:00
Josh Matthews
72259e0772
Translate const references to extern functions as *i8 instead of the typical closure pair. Fixes #4522 .
2013-01-22 16:22:55 -08:00
Erick Tryzelaar
530a113bfa
convert ast::item into a struct
2013-01-14 18:15:53 -08:00
Jed Davis
349fa1e550
Omit needless zeroes for C-like variants of non-C-like enums
2013-01-11 23:42:51 -08:00
Jed Davis
abae61257c
Allow consts to be non-nullary enum constructors
2013-01-11 23:42:51 -08:00
Jed Davis
f76e28aa1c
Allow consts' LLVM types to depend on their initializers.
...
Loosening the connection between the LLVM type and the Rust type
is necessary to use non-nullary enum constructors as const initializers,
because the const needs to be initialized with data of the actual type of
the variant in question, which is (generally) not the same as the u8
array in the `type_of` type.
Thus, referring to a const now requires casting the LLVM global to the
expected pointer type instead of using it as-is.
2013-01-11 23:42:51 -08:00
Jed Davis
452642422d
Factor out base::get_discrim_val from const translation
2013-01-11 23:42:51 -08:00
Patrick Walton
ca71c6ec5b
librustc: Make all external functions unsafe. r=tjc
2013-01-10 21:24:08 -08:00
Patrick Walton
2db3abddcd
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 22:02:35 -08:00
Patrick Walton
44ab00ee37
Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
...
This reverts commit a8d37af247
.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247
librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
2013-01-08 19:27:57 -08:00
Patrick Walton
53f41f07ce
librustc: Make vectors no longer implicitly copyable in rustc. r=graydon
...
~20% perf win for trans on -O0, with other minor improvements across the board.
No effect on -O2.
2013-01-07 14:17:36 -08:00
Jed Davis
6043a72774
Make consts of degenerate nullary enums not ICE.
...
This makes the const construction code match the logic in type_of.
2013-01-05 00:24:38 -08:00
Patrick Walton
57c599914a
librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon
2012-12-27 10:02:54 -08:00
Patrick Walton
4c2e4c37ce
librustc: Make use
statements crate-relative by default. r=brson
2012-12-13 13:05:22 -08:00
Tim Chevalier
0046ed9462
Remove un-needed code for obsolete classes
...
and rename "class" to "struct" everywhere possible (except local
vars, I was too lazy for that) -- that is why this commit is so
big.
No review, just dead code removal and renaming.
Closes #3515
2012-12-10 18:45:01 -08:00
Patrick Walton
56ece46f7d
librustc: Remove all legacy pattern bindings from libsyntax and librustc. rs=refactoring
2012-12-04 14:19:19 -08:00
Graydon Hoare
00c856c0b1
Update license, add license boilerplate to most files. Remainder will follow.
2012-12-03 17:12:14 -08:00
Patrick Walton
1088006ed9
librustc: Implement unit-like struct constants. r=brson
2012-11-30 21:10:54 -08:00
Patrick Walton
8fa306a0ad
librustc: Implement tuple struct constants. r=brson
2012-11-30 21:10:17 -08:00
Patrick Walton
5b5a0df7ee
librustc: Implement C-like enum constants. r=tjc
2012-11-30 21:09:14 -08:00
Patrick Walton
bad62dcb04
rustc: Allow constants to be used in patterns. r=nmatsakis
2012-11-14 11:06:29 -08:00
Patrick Walton
fe02814a63
rustc: Implement floating point literal inference. r=nmatsakis
2012-11-12 10:39:08 -08:00
Brian Anderson
69a8b4d8e2
Rename src/rustc to src/librustc. Use the driver crate
2012-11-07 13:53:39 -08:00