aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/trans.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* rustc: Don't return "result" types from glue helper functions. This allows ↵Patrick Walton2011-04-191-46/+46
| | | | glue to fail.
* rustc: Assert that each basic block isn't terminated before adding ↵Patrick Walton2011-04-191-1/+1
| | | | instructions to it
* replace error logging with log_err in stdlib and rustcMarijn Haverbeke2011-04-191-16/+17
|
* add log_err to rustcMarijn Haverbeke2011-04-191-8/+9
|
* rustc: Add an operation field to compare glue with ==, <=, and < modesPatrick Walton2011-04-181-9/+12
|
* rustc: Create stub glue for structural comparisonPatrick Walton2011-04-181-23/+78
|
* Update foregoing patches to leave rust_crate alone.Marijn Haverbeke2011-04-181-11/+11
| | | | | | | | | Apparently it can't live in the main binary, since on non-Linux platforms, dynamics libs won't find symbols in the binary. This removes the crate_map pointer from rust_crate again, and instead passes it as an extra argument to rust_start. Rustboot doesn't pass this argument, but supposedly that's okay as long as we don't actually use it on that platform.
* Add a -c option.Rafael Ávila de Espíndola2011-04-181-4/+26
|
* Make log the log level configurable per moduleMarijn Haverbeke2011-04-181-27/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This overloads the meaning of RUST_LOG to also allow 'module.submodule' or 'module.somethingelse=2' forms. The first turn on all logging for a module (loglevel 3), the second sets its loglevel to 2. Log levels are: 0: Show only errors 1: Errors and warnings 2: Errors, warnings, and notes 3: Everything, including debug logging Right now, since we only have one 'log' operation, everything happens at level 1 (warning), so the only meaningful thing that can be done with the new RUST_LOG support is disable logging (=0) for some modules. TODOS: * Language support for logging at a specific level * Also add a log level field to tasks, query the current task as well as the current module before logging (log if one of them allows it) * Revise the C logging API to conform to this set-up (globals for per-module log level, query the task level before logging, stop using a global mask) Implementation notes: Crates now contain two extra data structures. A 'module map' that contains names and pointers to the module-log-level globals for each module in the crate that logs, and a 'crate map' that points at the crate's module map, as well as at the crate maps of all external crates it depends on. These are walked by the runtime (in rust_crate.cpp) to set the currect log levels based on RUST_LOG. These module log globals are allocated as-needed whenever a log expression is encountered, and their location is hard-coded into the logging code, which compares the current level to the log statement's level, and skips over all logging code when it is lower.
* move rust_crate structure into the actual crate codeMarijn Haverbeke2011-04-181-4/+2
|
* introduce local_ctxt in trans.rs to keep crate_ctxt globalMarijn Haverbeke2011-04-181-318/+333
| | | | | | This reduces crate_ctxt copying (which unfortunately did not result in a noticeable speedup), and makes the role of that type a bit more clear.
* rustc: Capture type parameters into for-each blocks. Add a test case.Patrick Walton2011-04-151-2/+33
|
* rustc: Use a regular vector instead of a hash table for type descriptorsPatrick Walton2011-04-151-14/+13
|
* rustc: Remove the "boxed" check, and make the static_size_of_tag ↵Patrick Walton2011-04-151-33/+32
| | | | recursion-eliminating transformation deep
* Add a -S option for producing assembly. I will move more of it toRafael Ávila de Espíndola2011-04-151-11/+23
| | | | rust once the necessary APIs are available in C.
* rustc: Make fold_ty no longer use an object; introduce walk_tyPatrick Walton2011-04-151-16/+14
|
* Work on destructors, not entirely functional yet (no tydesc integration).Graydon Hoare2011-04-141-0/+37
|
* rustc: Remove generalize_ty. Instead, maintain an explicit type parameter ↵Patrick Walton2011-04-141-12/+15
| | | | substitution list.
* Fix temporary-spilling logic in trans_args, uncomment most of lib-deque.rs ↵Graydon Hoare2011-04-131-1/+5
| | | | (which now passes on stage0).
* Enable alias analysis and the function attributes pass.Rafael Ávila de Espíndola2011-04-131-4/+5
| | | | | The C API extension is already upstream, we can drop the local copy once the bots are updated.
* rustc: Switch to indices for type parametersPatrick Walton2011-04-121-64/+52
|
* Make glue always pass-by-alias and rename "scalar_or_boxed" concept to ↵Graydon Hoare2011-04-121-48/+73
| | | | "immediate"
* Tighten up condition on use of opaque_tag, remove blunt hammer of alias ↵Graydon Hoare2011-04-121-5/+20
| | | | arg-casting in trans_args.
* Enable more optimizations.Rafael Ávila de Espíndola2011-04-121-6/+6
|
* Remove silly legacy glue-offset encoding, predicate runtime adjustments by ↵Graydon Hoare2011-04-091-42/+24
| | | | ABI. LLVM should inline most glue now.
* Move to single-uint file-position representation.Marijn Haverbeke2011-04-091-2/+3
| | | | | | | | This makes passing them around cheaper. There is now a table (see front/codemap.rs) that is needed to transform such an uint into an actual filename/line/col location. Also cleans up the span building in the parser a bit.
* Make block results work for generic typesBrian Anderson2011-04-071-14/+17
| | | | | | | I think just about every type can be used as a block result now. There's quite a proliferation of tests here, but they all test slightly different things and some are split out to remain XFAILed. The tests of generic vectors are still XFAILed because generic aliased boxes still don't work in general.
* rustc: Pointer cast when crossing a box boundary for statically-sized ↵Patrick Walton2011-04-071-0/+4
| | | | elements in trans_index()
* rustc: Pointer cast when autodereferencing boxed tag typesPatrick Walton2011-04-071-1/+13
|
* rustc: Use the name "opaque_tag", not "tag", for opaque tagsPatrick Walton2011-04-071-1/+1
|
* Support for self-calls that take arguments.Lindsey Kuper2011-04-071-9/+1
| | | | | | | Nicer parsing of self-calls (expr_self_method nodes inside expr_call nodes, rather than a separate expr_call_self) makes typechecking tractable. We can now write self-calls that take arguments and return values (see: test/run-pass/obj-self-*.rs).
* rustc: Remove useless call to type_of() in trans_rec()Patrick Walton2011-04-071-1/+0
|
* rustc: Allow dereference expressions to be used as lvalues. Add a test case.Patrick Walton2011-04-071-20/+26
|
* Add a -O option and change the Makefile to use it.Rafael Ávila de Espíndola2011-04-071-5/+5
|
* rustc: Reindent line. Puts out burning tinderbox.Patrick Walton2011-04-071-2/+2
|
* rustc: Link to external tag discriminants. Un-XFAIL test/run-pass/lib-option.rs.Patrick Walton2011-04-071-44/+52
|
* Merge branch 'master' of github.com:graydon/rustPatrick Walton2011-04-071-8/+69
|\
| * Run optimizations.Rafael Ávila de Espíndola2011-04-071-5/+66
| | | | | | | | | | It is always on for now just to make sure the bots are happy. If they are, I will add a -O option and update the makefile.
| * Continued sketching out code for checking states against preconditions.Tim Chevalier2011-04-061-3/+3
| | | | | | | | | | | | | | | | | | It's still sketchy. I added a typestate annotation field to statements tagged stmt_decl or stmt_expr, because a stmt_decl statement has a typestate that's different from that of its child node. This necessitated trivial changes to a bunch of other files all over to the compiler. I also added a few small standard library functions, some of which I didn't actually end up using but which I thought might be useful anyway.
* | Merge branch 'master' of github.com:graydon/rustPatrick Walton2011-04-061-118/+129
|\|
| * Brute force and ignorance workaround for tag-and-generic-obj; un-XFAIL it.Graydon Hoare2011-04-051-0/+3
| |
| * Last pieces of self-call support.Lindsey Kuper2011-04-051-5/+30
| | | | | | | | | | | | | | | | The last few pieces of the hack that lets us use trans.trans_call() to translate self-calls, plus a fix for the parser buy that was preventing self-call expressions from getting past parsing. test/run-pass/obj-self.rs works now (as in it actually prints "hi!" twice!).
| * Further on the path toward self-awareness.Lindsey Kuper2011-04-051-108/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | Mostly: * Merciless refactoring of trans.rs so that trans_call can work for self-calls as well as other kinds of calls Also: * Various changes to go with having idents, rather than exprs, in expr_call_self AST nodes * Added missing case for SELF token to token.to_str()
| * FIx native wrapper generation to handle more arg types.Graydon Hoare2011-04-051-3/+23
| |
| * Knocking out a quick fixme: pretty-printing exprs in error messages.Lindsey Kuper2011-04-051-2/+3
| |
| * Make box prefix operator and box type carry mutability flag.Graydon Hoare2011-04-041-5/+5
| |
* | rustc: Make type_of() return the type of the wrapper for native functions. ↵Patrick Walton2011-04-031-4/+4
|/ | | | lib-map now compiles, but fails to work properly.
* Begin comparing vectors from the correct addressBrian Anderson2011-04-031-1/+1
| | | | Start at the first element instead of the address of the vector.
* Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. ↵Graydon Hoare2011-04-021-0/+2
| | | | Major perf win.
* Add FIXMEs around type handling in trans_if, trans_altBrian Anderson2011-04-021-0/+2
|