Brian Anderson
fd81fb6a24
rustc: Determine the crate type (lib/bin) in the session, not session opts
...
This is in preparation for adding a #[crate_type] attribute
2011-12-08 20:08:00 -08:00
Marijn Haverbeke
e3eca9174b
Change literal representation to not truncate
...
Also shuffles around the organization of numeric literals and types,
separating by int/uint/float instead of machine-vs-non-machine types.
This simplifies some code.
Closes #974
Closes #1252
2011-12-07 21:08:28 +01:00
Graydon Hoare
a1b215aea1
Add --no-core option and inject a use core/import core::* pair into crate unless it's given.
2011-12-06 14:40:30 -08:00
Niko Matsakis
adc79e2f44
remove compile-command from local variable blocks
2011-11-17 11:46:13 -08:00
Haitao Li
388eed383f
rustc: Add a flag '--warn-unused-imports'
...
Followup of issue #889
2011-11-17 09:28:30 +01:00
Stefan Plantikow
99c421f01d
Removed --no-typestate flag from rutsc
...
Fixes issue #1139
2011-11-16 18:52:46 -08:00
Niko Matsakis
cb9675259f
enable comments in generated asm, ll
2011-11-16 15:16:42 -08:00
Marijn Haverbeke
9ff6f816ba
Fix handling of loops and conditionals in alias.rs
...
It now threads information about invalidated aliases through the AST
properly. This makes it more permissive for conditionals (invalidating
an alias in one branch doesn't prevent you from using it in another),
and less permissive for loops (it now properly notices when a loop
invalidates an alias that it might still use in another iteration).
Closes #1144
2011-11-15 13:29:57 +01:00
Haitao Li
5a7249c935
Cleanup unused imports
2011-11-10 19:19:40 -08:00
Niko Matsakis
8011e3fabb
hack around on makefiles trying to get a 64 bit build
...
right now there are many temporary hacks, search for NDM to find them
2011-11-02 14:13:22 -07:00
Niko Matsakis
5b3bddcd87
start to isolate target strings so that they can be configured for
...
x64 or other targets
2011-11-02 14:13:22 -07:00
Niko Matsakis
e8a0e592da
reimplement some of the unsafe stuff which got lost
...
- blocks inherit unsafety
- remove the --check-unsafe flag
- add unsafe annotations where needed to get things to compile
2011-10-12 16:33:07 -07:00
Niko Matsakis
f3c68e7238
enable unsafe checking but only with a flag --check-unsafe
2011-10-12 14:39:34 -07:00
Brian Anderson
d91b7b61ef
Encapsulate current sysroot and lib path handling into util::filesearch
2011-10-04 21:35:06 -07:00
Patrick Walton
e9287e55cc
rustc: Stub a --stack-growth option; it's behind a flag for now because it requires patches to LLVM.
2011-09-30 18:21:39 -07:00
Graydon Hoare
68d50b5928
Add target_triple to session::options. Use host triple by default, accept --target on command line.
2011-09-21 08:46:44 -07:00
Graydon Hoare
a4815b6742
Factor imports mindlessly.
2011-09-12 16:13:28 -07:00
Marijn Haverbeke
fc6b7c8b38
Reformat for new mode syntax, step 1
...
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00
Brian Anderson
5c49e4f4e9
Reformat. Issue #855
2011-09-02 22:11:42 -07:00
Brian Anderson
418d09e547
Convert all uses of #ifmt to #fmt. Issue #855
2011-09-01 18:54:03 -07:00
Brian Anderson
ab6bb035e5
Rename std::istr to std::str. Issue #855
2011-09-01 17:27:58 -07:00
Brian Anderson
e824775d53
Remove std::str. Issue #855
2011-09-01 16:09:15 -07:00
Brian Anderson
498e38b705
Convert uses of #fmt to #ifmt. Issue #855
2011-08-31 11:44:06 -07:00
Brian Anderson
9857048929
Convert rustc::driver::session to istrs. Issue #855
2011-08-27 16:47:50 -07:00
Brian Anderson
3dc2419443
Convert rustc::syntax::codemap to istrs. Issue #855
2011-08-27 15:58:17 -07:00
Brian Anderson
518dc52f85
Reformat
...
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Erick Tryzelaar
e4a0f997fb
Port the compiler to the typaram foo<T> syntax.
2011-08-16 15:05:56 -07:00
Marijn Haverbeke
27169387fe
Remove partial DPS back-end
...
It won't be finished on the short term, and it's already bit-rotting
fast. We can fetch this from git's autumn annals if we need it.
2011-08-16 21:35:50 +02:00
Patrick Walton
a5d5f9ef48
rustc: Add a --gc switch for debugging and experimentation
2011-08-10 22:13:30 -07:00
Erick Tryzelaar
8b15045224
Port the compiler to the ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Brian Anderson
840a09c86e
Add a --no-trans command line option
...
Runs all passes before translation. This will be used for pretty-printing
tests to verify that the results are still probably valid Rust code.
2011-08-02 10:39:12 -07:00
Marijn Haverbeke
df7f21db09
Reformat for new syntax
2011-07-27 15:54:33 +02:00
Josh Matthews
a411c865b2
Make clear the differentiation between char pos and byte pos in filemaps. Fix up error printing for files with multi-byte characters.
2011-07-16 15:57:24 -07:00
Patrick Walton
9fadab64a2
rustc: Introduce a stub destination-passing-style translation engine, accessible via the --dps switch for now
2011-07-15 11:38:46 -07:00
Patrick Walton
917afa4cc9
rustc: Remove a bunch of exterior vectors
2011-07-15 11:38:46 -07:00
Patrick Walton
be489ee9e2
rustc: Move much of metadata reading over to interior vectors
2011-07-14 12:00:48 -07:00
Tim Chevalier
f26ca025de
Make resolve and the typechecker check for a main fn of the
...
correct type
This means if a non-library program leaves out the main program,
the error gets caught earlier than link.
Closes #626 .
2011-07-13 18:30:53 -07:00
Paul Stansifer
425732311a
Move macro expansion to a separate phase, change macro syntax, and add parse_sess to session.
2011-07-11 18:52:50 -07:00
Josh Matthews
fd24fd5e31
Only print up to six lines on error. Print ^~~~~ to highlight error span.
2011-07-11 18:44:27 -07:00
Brian Anderson
58d288a4f7
Move used_link_args from session to cstore
2011-07-08 09:37:00 -07:00
Brian Anderson
4bfa269fe7
Move used_libraries from session to cstore
2011-07-08 09:37:00 -07:00
Brian Anderson
1386420cad
Move used_crate_files from session to cstore
2011-07-08 09:37:00 -07:00
Brian Anderson
82983e5005
Replace the crate cache in session with the one in cstore
2011-07-08 09:37:00 -07:00
Brian Anderson
b23ecd47ce
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.
2011-07-08 09:37:00 -07:00
Rafael Ávila de Espíndola
77c708cdbf
Implement --lib --static.
2011-07-07 15:25:09 -04:00
Rafael Ávila de Espíndola
6d6c4c2a76
Command line changes for adding support for static libraries.
2011-07-07 14:42:50 -04:00
Brian Anderson
b06ccb45ab
Begin adding unit testing infrastructure to the compiler
...
Add a --test flag and a pass for transforming the AST to generate a test
harness.
Issue #428
2011-07-06 14:39:36 -07:00
Marijn Haverbeke
4349eaed84
Don't thread the local crate number through the session
...
It's a constant, anyway.
2011-07-05 16:09:32 +02:00
Marijn Haverbeke
6fd6fdea93
Move everything syntax-related to syntax/, break deps on rest of compiler
...
src/comp/syntax is currently just a sub-module of rustc, but it will,
in the near future, be its own crate. This includes:
- The AST data structure
- The parser
- The pretty-printer
- Visit, walk, and fold
- The syntax extension system
- Some utility stuff that should be in the stdlib*
*) Stdlib extensions currently require a snapshot before they can be
used, and the win build is very broken right now. This is temporary
and will be cleaned up when one of those problems goes away.
A lot of code was moved by this patch, mostly towards a more organized
layout. Some package paths did get longer, and I guess the new layout
will take some getting used to. Sorry about that!
Please try not to re-introduce any dependencies in syntax/ on any of
the other src/comp/ subdirs.
2011-07-05 15:57:21 +02:00
Rafael Ávila de Espíndola
b669430f72
Use metadata to avoid always passing -Lrustllvm to the linker.
2011-07-04 13:22:23 -04:00