about summary refs log tree commit diff
path: root/src/rt
AgeCommit message (Collapse)AuthorLines
2011-05-03Remove unused variable.Rafael Ávila de Espíndola-7/+1
2011-05-03Split start into rustc and rustboot versions. This introduces a bit ofRafael Ávila de Espíndola-27/+122
duplication, but we will hopefully drop the rustboot one soon. This is also a preparation for changing the rustc one to have the activate glue return to the exit glue which will then call the main function. This (returning to the function that calls main) matches what happens when loader stats a program or a new thread. It lets gdb produce good backtraces and should help with EH too.
2011-04-29stdlib: Add a Time module to the standard libraryPatrick Walton-0/+30
2011-04-28Log refcounts in upcall_vec_grow.Graydon Hoare-4/+4
2011-04-28Slightly more helpful error message for "null lib handle"Tim Chevalier-1/+2
I changed the error message to also suggest checking the -L flag when this happens.
2011-04-27stdlib/rt: Add an unsafe function to cast immutable vectors to mutable onesPatrick Walton-0/+10
2011-04-27rt: Add str_vec to the def file. Puts out burning tinderbox.Patrick Walton-0/+1
2011-04-27Fix _str.bytes to trivial version.Graydon Hoare-0/+26
2011-04-21stdlib: Add a pointer equality function to the standard library and a test casePatrick Walton-0/+6
2011-04-19add rustboot-specific log upcalls to .def fileMarijn Haverbeke-0/+2
2011-04-19Overhaul logging system in runtimeMarijn Haverbeke-633/+459
See https://github.com/graydon/rust/wiki/Logging-vision The runtime logging categories are now treated in the same way as modules in compiled code. Each domain now has a log_lvl that can be used to restrict the logging from that domain (will be used to allow logging to be restricted to a single domain). Features dropped (can be brought back to life if there is interest): - Logger indentation - Multiple categories per log statement - I possibly broke some of the color code -- it confuses me
2011-04-19Add log_err to rustbootMarijn Haverbeke-4/+4
2011-04-18Add a proper check for rustbootMarijn Haverbeke-4/+2
Uncomment log initialization.
2011-04-18Temporarily turn off logging initializationMarijn Haverbeke-3/+4
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-18Update foregoing patches to leave rust_crate alone.Marijn Haverbeke-93/+89
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-18Make log the log level configurable per moduleMarijn Haverbeke-2/+95
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-14rt: Remove half-baked, incomplete, commented-out print_stack_trace() stubPatrick Walton-17/+0
2011-04-14rustc: Remove generalize_ty. Instead, maintain an explicit type parameter ↵Patrick Walton-0/+17
substitution list.
2011-04-09Remove silly legacy glue-offset encoding, predicate runtime adjustments by ↵Graydon Hoare-6/+8
ABI. LLVM should inline most glue now.
2011-04-07Avoid some gotchas with logging macrosBrian Anderson-15/+25
I think this is sufficient to eliminate multiple evaluation and the possibility of accidental miscompilation from the logging macros.
2011-04-08add FIXME related to the -fno-strict-aliasing workaroundMarijn Haverbeke-0/+2
2011-04-08Initialize two more variables to keep darwin tinderbox happyMarijn Haverbeke-2/+2
2011-04-08add -O2 when compiling rt, fix warnings triggered by optimizerMarijn Haverbeke-6/+6
2011-04-07Move to macro-based logging checks in the C++ codeMarijn Haverbeke-237/+254
No functions should be called for log statements that turn out to be inactive.
2011-04-02Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. ↵Graydon Hoare-0/+1
Major perf win.
2011-03-30Um, that'd be, align the word *before* retpc. Addresses point to the low ↵Graydon Hoare-7/+7
part of a word. Un-XFAIL nbody on Darwin.
2011-03-30Ensure task stacks start out with a 16-byte aligned entry frame. Should make ↵Graydon Hoare-22/+48
OSX behave a bit better.
2011-03-25Another go at changing compile-command, this time using RBUILD env var.Graydon Hoare-1/+1
2011-03-25Revert "Bulk-edit compile commands in emacs chatter to point to assumed ↵Graydon Hoare-1/+1
build/ dir off src root." This reverts commit 846f2e2ba994268725f38c36fa12f1a09f21615c.
2011-03-25Bulk-edit compile commands in emacs chatter to point to assumed build/ dir ↵Graydon Hoare-1/+1
off src root.
2011-03-25Parse FP literals without coercing to int. This allows parsing 64-bitTim Chevalier-0/+1
floats. However, if someone writes a literal that can't be represented precisely in 64 bits, the front-end will accept it while the back-end will (presumably) complain.
2011-03-25Start making the standard-lib utf-8 awareMarijn Haverbeke-0/+22
Finally implements _str.is_utf8, adds from_chars, from_char, to_chars, char_at, char_len, (push|pop|shift|unshift)_char. Also, proper character I/O for streams.
2011-03-25Placate win32 build; no idea how it can be working currently on tinderbox.Graydon Hoare-1/+18
2011-03-25A first stab at the 'nbody' demo, with support for calling C sqrt().Lindsey Kuper-0/+8
2011-03-24build: Generate an object file for stage0/libstd.dylibPatrick Walton-0/+1
2011-03-24rustc: Open "use"d crates; add a _vec.vec_from_buf() method along the way; ↵Patrick Walton-0/+8
XFAIL use-import-export.rs in rustc
2011-03-24Add .def.in files that I forgot to stage. Should put out burning tinderboxes ↵Patrick Walton-0/+68
on Windows and Darwin.
2011-03-24Generate the platform-specific .def files at build timePatrick Walton-208/+0
2011-03-24Make symbol resolution failures log under rust_log::ERR flag as well.Graydon Hoare-3/+4
2011-03-24Add trailing semicolons to Linux .def filesPatrick Walton-1/+1
2011-03-24Add a Linux .def file. Might put out burning tinderbox.Patrick Walton-0/+70
2011-03-24rustc: Use a .def file for Darwin. Puts out burning Darwin tinderbox.Patrick Walton-0/+68
2011-03-22Further support for floating-point. Literals with exponents workTim Chevalier-1/+8
and literals with the 'f32' or 'f64' suffixes work as well. In addition, logging things with the f32 or f64 type works. (float is still assumed to be a synonym for f64).
2011-03-21Started adding support for floating-point type, floating-point literals, and ↵Tim Chevalier-0/+7
logging of floats. Other operations on float probably don't work yet.
2011-03-21Add a suitable .def file for rustrt.dll on WindowsPatrick Walton-0/+70
2011-03-21Add some C99 and C++ compatibility headers for MSVCPatrick Walton-0/+649
2011-03-18Add some mutable variants of vector functions to the standard libraryPatrick Walton-0/+6
2011-03-16rustc: Add str_from_cstr() and str_from_buf() functions to the standard ↵Patrick Walton-0/+23
library, as well as a test case
2011-03-14Add functionality for running external programs to the std libMarijn Haverbeke-7/+97
See lib/run_program.rs.
2011-03-14Extend stream functionalityMarijn Haverbeke-0/+3
Writer and reader streams now come with methods to write and read little-endian numbers. Whether that is the right place for such methods is debatable, but for now, that's where they live.