Marijn Haverbeke
6d3a423094
add log_err to rustc
2011-04-19 16:57:13 +02:00
Marijn Haverbeke
9bfc8bf11e
Add log_err to rustboot
2011-04-19 16:57:13 +02:00
Brian Anderson
7f90000ab6
Precision overrides 0-padding in #fmt
2011-04-18 22:53:26 -04:00
Brian Anderson
59d5267936
Rearrange ExtFmt.RT.pad to recover some horizontal space
2011-04-18 21:36:04 -04:00
Brian Anderson
869b28e393
Left-justification overrides 0-padding in #fmt
2011-04-18 21:36:04 -04:00
Brian Anderson
d4f1a48111
Support 0 flag in #fmt
2011-04-18 21:36:04 -04:00
Graydon Hoare
4763cd39ca
Boilerplate city, for anyone who wants it.
2011-04-18 18:32:05 -07:00
Patrick Walton
5f2cfa7351
rustc: Add an operation field to compare glue with ==, <=, and < modes
2011-04-18 12:57:00 -07:00
Rafael Ávila de Espíndola
9657e5d2d3
Revert 9ab42038bb
while I find what is
...
wrong on Windows.
2011-04-18 15:37:04 -04:00
Graydon Hoare
8a6590a75f
Remove use of 'use' from type-params-in-for-each.rs, put out darwin fire.
2011-04-18 12:20:50 -07:00
Rafael Ávila de Espíndola
9ab42038bb
Change the makefiles to use -c.
2011-04-18 15:00:17 -04:00
Lindsey Kuper
0c873993c9
'Type' renamed to 'type definition'.
...
This is basically so people don't confuse a Ref.Item.Type with a
Ref.Type.
2011-04-18 11:49:32 -07:00
Patrick Walton
abd78f2f04
rustc: Create stub glue for structural comparison
2011-04-18 11:14:38 -07:00
Marijn Haverbeke
ef62fae9db
Add a proper check for rustboot
...
Uncomment log initialization.
2011-04-18 19:59:49 +02:00
Marijn Haverbeke
c40cf96656
Temporarily turn off logging initialization
...
Will be restored as soon as I find a way for the runtime
to figure out whether it is on rustboot or rustc.
2011-04-18 18:29:20 +02:00
Marijn Haverbeke
f6be25a870
Update foregoing patches to leave rust_crate alone.
...
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.
2011-04-18 16:21:49 +02:00
Rafael Ávila de Espíndola
f12998e5d7
Add a -c option.
2011-04-18 10:02:52 -04:00
Marijn Haverbeke
148e6f7b00
Make log the log level configurable per module
...
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.
2011-04-18 15:28:47 +02:00
Marijn Haverbeke
0bf75a203e
collect crate meta info and ext crate names
2011-04-18 15:28:47 +02:00
Marijn Haverbeke
0984d1db2e
move rust_crate structure into the actual crate code
2011-04-18 15:28:47 +02:00
Marijn Haverbeke
36c332a241
introduce local_ctxt in trans.rs to keep crate_ctxt global
...
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.
2011-04-18 15:28:47 +02:00
Brian Anderson
9976bb93d6
Support the space flag in #fmt
2011-04-17 19:50:58 -04:00
Brian Anderson
86a43c24d6
Support + flag in #fmt
2011-04-17 18:19:26 -04:00
Brian Anderson
1bec738c56
Support #fmt precision for bools, with same rules as strings
...
Not totally confident this is desirable. The alternative would be to make it a
compile error.
2011-04-17 17:24:17 -04:00
Brian Anderson
da996d6e6b
Fix indentation in syntax-extension-fmt.rs
2011-04-17 17:12:20 -04:00
Brian Anderson
685e820465
Treat char #fmt conversions just like str conversions
...
Add missing tests
2011-04-17 17:06:55 -04:00
Brian Anderson
8f6603f58e
Support #fmt precision for signed types
2011-04-17 16:51:17 -04:00
Brian Anderson
4c0aea69da
Support #fmt precision for unsigned types
2011-04-17 16:18:25 -04:00
Brian Anderson
c7edcb3a72
Support #fmt precision for string types
2011-04-17 13:10:02 -04:00
Brian Anderson
96e3e29e88
Support left-justification in #fmt conversions
2011-04-16 19:43:29 -04:00
Brian Anderson
f7b68e9edd
Add another test for #fmt conversion widths
2011-04-16 18:22:14 -04:00
Brian Anderson
dcfdb02fab
Make #fmt support explicit conversion widths
2011-04-16 18:01:17 -04:00
Brian Anderson
07e820089f
More tests for #fmt
2011-04-16 18:01:17 -04:00
Patrick Walton
0c288720b6
rustc: Capture type parameters into for-each blocks. Add a test case.
2011-04-15 18:14:29 -07:00
Patrick Walton
e37d9fc2b6
rustc: Use a regular vector instead of a hash table for type descriptors
2011-04-15 17:46:16 -07:00
Patrick Walton
3e922e2ecf
stdlib: Add some vector functions: empty, empty_mut, grow_set, and freeze. Change _vec.grow to use uint arguments.
2011-04-15 17:46:16 -07:00
Rafael Ávila de Espíndola
099e094765
Produce PIC code and use -S in the Makefile.
2011-04-15 19:29:13 -04:00
Patrick Walton
cc6a9c8876
rustc: Remove the "boxed" check, and make the static_size_of_tag recursion-eliminating transformation deep
2011-04-15 15:16:06 -07:00
Rafael Ávila de Espíndola
2214b6835d
Add a -S option for producing assembly. I will move more of it to
...
rust once the necessary APIs are available in C.
2011-04-15 17:41:14 -04:00
Patrick Walton
790084ced1
rustc: Make fold_ty no longer use an object; introduce walk_ty
2011-04-15 13:01:31 -07:00
Graydon Hoare
232c450957
Work on destructors, not entirely functional yet (no tydesc integration).
2011-04-14 16:50:59 -07:00
Patrick Walton
0387b5a060
rustc: Use the unified result for the type of assignment expressions
2011-04-14 15:28:50 -07:00
Patrick Walton
55ab187c9c
rustc: Add a test case for previous commit
2011-04-14 12:51:27 -07:00
Patrick Walton
35e021ed53
rustc: Perform type substitutions when recording locals
2011-04-14 12:33:26 -07:00
Patrick Walton
fee88f79f5
rt: Remove half-baked, incomplete, commented-out print_stack_trace() stub
2011-04-14 11:35:22 -07:00
Patrick Walton
65b7578851
rustc: Remove generalize_ty. Instead, maintain an explicit type parameter substitution list.
2011-04-14 11:24:25 -07:00
Patrick Walton
ec5a60d5e2
rustc: Use union-find for variable substitution
2011-04-14 11:24:25 -07:00
Brian Anderson
99a697b56a
Add support for upper-case hex and binary output to #fmt.
...
Only works for uints at present. Necessitated the addition of _str.to_upper.
2011-04-13 22:14:54 -04:00
Brian Anderson
5c0f4c1939
Add more commentary about ExtFmt
2011-04-13 22:14:40 -04:00
Brian Anderson
4844e1c08a
Add support for printing uints as lower-case hex to ExtFmt.
...
Begin passing an ExtFmt.RT.conv parsed format description to each of the
ExtFmt.RT.conv* functions.
2011-04-13 22:14:24 -04:00