Haitao Li
b8dd148444
rustllvm: Add a GetOrInsertFunction wrapper
...
Fixes issue #1161
Test-case-by: Brian Anderson <banderson@mozilla.com>
Signed-off-by: Haitao Li <lihaitao@gmail.com>
2011-11-15 00:33:29 +08:00
Haitao Li
5a7249c935
Cleanup unused imports
2011-11-10 19:19:40 -08:00
Brian Anderson
b7ab28b50f
Rename "c-stack-cdecl" ABI to "cdecl"
2011-11-09 18:44:12 -08:00
Haitao Li
b12de98814
rustc: Add support of generating LLVM assembly
...
rustc generates output files in LLVM bitcode format if "--emit-llvm"
option is given. When used with the "-S" option, rustc generates LLVM
intermediate language assembly files.
Fixes Issue #476
2011-11-07 21:44:40 +08:00
Marijn Haverbeke
f3468d03a2
Fix a long line
2011-11-07 10:10:27 +01:00
Joshua Wise
07bab92970
llvm::mk_object_file should really return an option, since the underlying LLVM function can fail. Fixes a crash on OS X when rust has bad dylibs within eyeshot.
2011-11-07 09:56:30 +01:00
Patrick Walton
329f045d4c
rustc: Enable segmented stacks in LLVM when --stack-growth is on
2011-10-31 14:42:44 -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
f994871a3d
remove unsafe tags
2011-10-12 16:33:07 -07:00
Niko Matsakis
85da98db4a
continue to annotate functions as unsafe where neccessary
2011-10-12 16:33:06 -07:00
Niko Matsakis
d4d7eb069b
add unsafe tags into various points in the translation chains
...
and so forth
2011-10-12 16:33:06 -07:00
Marijn Haverbeke
f9fbd86f52
Parse and typecheck by-value and by-ref arg specs
...
Add sprinkle && throughout the compiler to make it typecheck again.
Issue #1008
2011-10-07 09:09:50 +02:00
Patrick Walton
42287d0fd3
rustc: Call LLVM on the C stack
2011-09-30 18:50:07 -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
Marijn Haverbeke
8c85745452
Remove some bogus white-space from llvm.rs
2011-09-20 17:14:50 +02:00
Graydon Hoare
a4815b6742
Factor imports mindlessly.
2011-09-12 16:13:28 -07:00
Brian Anderson
393deeb06f
Merge branch 'unwind'
...
Conflicts:
src/comp/middle/trans.rs
src/comp/middle/trans_build.rs
src/lib/run_program.rs
src/test/compiletest/runtest.rs
2011-09-12 09:36:51 -07:00
Marijn Haverbeke
ca1df2b111
Pretty-print for new arg-mode syntax
2011-09-12 12:49:00 +02: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
5e4637b61f
Add Rust definitions for new LLVM EH instructions
...
Issue #236
2011-09-11 17:31:38 -07: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
498e38b705
Convert uses of #fmt to #ifmt. Issue #855
2011-08-31 11:44:06 -07:00
Brian Anderson
fcdbdaf2ab
Convert the rest of rustc::lib::llvm to istrs. Issue #855
2011-08-27 15:54:44 -07:00
Brian Anderson
d7fa75413f
Convert rustc::lib::llvm to istr::sbufs. Issue #855
2011-08-27 15:54:44 -07:00
Brian Anderson
652332f9d4
Convert std::map::new_str_hash to istrs. Issue #855
2011-08-27 15:54:44 -07:00
Brian Anderson
53be480d20
Convert std::int to istrs. Issue #855
2011-08-27 15:53:08 -07:00
Marijn Haverbeke
b9112525ba
Move to a more lightweight builder system
...
You now do
bld::Ret(bcx, someval)
where you used to say
bcx.build.Ret(someval)
Two fewer boxes are allocated for each block context, and build calls
no longer go through a vtable.
2011-08-24 16:48:10 +02: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
Marijn Haverbeke
cd440d338e
Remove or _-prefix all unused function arguments
...
This should make the compilation process a bit less noisy.
2011-08-18 10:02:13 +02:00
Erick Tryzelaar
af21a27002
Port the compiler to the expr foo::<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
e4a0f997fb
Port the compiler to the typaram foo<T> syntax.
2011-08-16 15:05:56 -07:00
Brian Anderson
f05a91a0dc
Rename std::ivec to std::vec
2011-08-16 10:36:19 -07:00
Lindsey Kuper
f91351aaf6
The wonky for...in... whitespace was bothering me. Sorry!
2011-08-15 22:19:50 -07:00
Rafael Ávila de Espíndola
6402b63b4f
Use the new C API for PassManagerBuilder.
2011-08-11 19:09:52 -04:00
Rafael Ávila de Espíndola
4cee063976
Update for llvm api change.
2011-08-11 14:58:30 -07:00
Erick Tryzelaar
8b15045224
Port the compiler to the ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Marijn Haverbeke
30d2e358be
Replace obj dtors with resources in stdlib and rustc
2011-07-29 14:03:24 +02:00
Marijn Haverbeke
2593c50e75
Re-format some obj dtors that were messed up by the pretty-printer
2011-07-27 16:52:49 +02:00
Marijn Haverbeke
6e2a7bff7f
Fix damage done by the pretty-printer
2011-07-27 15:54:33 +02:00
Marijn Haverbeke
df7f21db09
Reformat for new syntax
2011-07-27 15:54:33 +02:00
Marijn Haverbeke
5cdb010fae
Remove typechecker work-arounds now that I know how
2011-07-22 20:15:46 +02:00
Marijn Haverbeke
b45d973552
Rewrite trans_cast, float->float and float->int casts
2011-07-22 13:10:59 +02:00
Brian Anderson
c40d6265ce
Support x86 stdcall convention
...
This allows rust to call the Win32 API
2011-07-18 13:56:15 -07:00
Rafael Ávila de Espíndola
c124a025bf
Move rustc to the new llvm type system. Requires an update to llvm trunk.
2011-07-14 15:19:17 -04:00
Graydon Hoare
39151f2ad8
Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.
2011-07-13 15:44:09 -07:00
Patrick Walton
edf8245273
rustc: Make trans use interior vectors
2011-07-07 18:39:05 -07:00
Marijn Haverbeke
7661c08496
Remove temporary stdlib placeholders, use actual stdlib functions
...
(Possible now that a snapshot took place.)
2011-07-06 16:46:17 +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