aboutsummaryrefslogtreecommitdiff
path: root/src/rt
Commit message (Collapse)AuthorAgeFilesLines
* Slightly more helpful error message for "null lib handle"Tim Chevalier2011-04-281-1/+2
| | | | | I changed the error message to also suggest checking the -L flag when this happens.
* stdlib/rt: Add an unsafe function to cast immutable vectors to mutable onesPatrick Walton2011-04-272-0/+10
|
* rt: Add str_vec to the def file. Puts out burning tinderbox.Patrick Walton2011-04-271-0/+1
|
* Fix _str.bytes to trivial version.Graydon Hoare2011-04-271-0/+26
|
* stdlib: Add a pointer equality function to the standard library and a test casePatrick Walton2011-04-212-0/+6
|
* add rustboot-specific log upcalls to .def fileMarijn Haverbeke2011-04-191-0/+2
|
* Overhaul logging system in runtimeMarijn Haverbeke2011-04-1923-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
* Add log_err to rustbootMarijn Haverbeke2011-04-191-4/+4
|
* Add a proper check for rustbootMarijn Haverbeke2011-04-181-4/+2
| | | | Uncomment log initialization.
* Temporarily turn off logging initializationMarijn Haverbeke2011-04-181-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.
* Update foregoing patches to leave rust_crate alone.Marijn Haverbeke2011-04-185-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.
* Make log the log level configurable per moduleMarijn Haverbeke2011-04-184-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.
* rt: Remove half-baked, incomplete, commented-out print_stack_trace() stubPatrick Walton2011-04-141-17/+0
|
* rustc: Remove generalize_ty. Instead, maintain an explicit type parameter ↵Patrick Walton2011-04-141-0/+17
| | | | substitution list.
* Remove silly legacy glue-offset encoding, predicate runtime adjustments by ↵Graydon Hoare2011-04-091-6/+8
| | | | ABI. LLVM should inline most glue now.
* Avoid some gotchas with logging macrosBrian Anderson2011-04-072-15/+25
| | | | | I think this is sufficient to eliminate multiple evaluation and the possibility of accidental miscompilation from the logging macros.
* add FIXME related to the -fno-strict-aliasing workaroundMarijn Haverbeke2011-04-081-0/+2
|
* Initialize two more variables to keep darwin tinderbox happyMarijn Haverbeke2011-04-081-2/+2
|
* add -O2 when compiling rt, fix warnings triggered by optimizerMarijn Haverbeke2011-04-084-6/+6
|
* Move to macro-based logging checks in the C++ codeMarijn Haverbeke2011-04-0718-237/+254
| | | | | No functions should be called for log statements that turn out to be inactive.
* Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. ↵Graydon Hoare2011-04-021-0/+1
| | | | Major perf win.
* Um, that'd be, align the word *before* retpc. Addresses point to the low ↵Graydon Hoare2011-03-301-7/+7
| | | | part of a word. Un-XFAIL nbody on Darwin.
* Ensure task stacks start out with a 16-byte aligned entry frame. Should make ↵Graydon Hoare2011-03-301-22/+48
| | | | OSX behave a bit better.
* Another go at changing compile-command, this time using RBUILD env var.Graydon Hoare2011-03-251-1/+1
|
* Revert "Bulk-edit compile commands in emacs chatter to point to assumed ↵Graydon Hoare2011-03-251-1/+1
| | | | | | build/ dir off src root." This reverts commit 846f2e2ba994268725f38c36fa12f1a09f21615c.
* Bulk-edit compile commands in emacs chatter to point to assumed build/ dir ↵Graydon Hoare2011-03-251-1/+1
| | | | off src root.
* Parse FP literals without coercing to int. This allows parsing 64-bitTim Chevalier2011-03-251-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.
* Start making the standard-lib utf-8 awareMarijn Haverbeke2011-03-252-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.
* Placate win32 build; no idea how it can be working currently on tinderbox.Graydon Hoare2011-03-253-1/+18
|
* A first stab at the 'nbody' demo, with support for calling C sqrt().Lindsey Kuper2011-03-253-0/+8
|
* build: Generate an object file for stage0/libstd.dylibPatrick Walton2011-03-241-0/+1
|
* rustc: Open "use"d crates; add a _vec.vec_from_buf() method along the way; ↵Patrick Walton2011-03-242-0/+8
| | | | XFAIL use-import-export.rs in rustc
* Add .def.in files that I forgot to stage. Should put out burning tinderboxes ↵Patrick Walton2011-03-241-0/+68
| | | | on Windows and Darwin.
* Generate the platform-specific .def files at build timePatrick Walton2011-03-243-208/+0
|
* Make symbol resolution failures log under rust_log::ERR flag as well.Graydon Hoare2011-03-242-3/+4
|
* Add trailing semicolons to Linux .def filesPatrick Walton2011-03-241-1/+1
|
* Add a Linux .def file. Might put out burning tinderbox.Patrick Walton2011-03-241-0/+70
|
* rustc: Use a .def file for Darwin. Puts out burning Darwin tinderbox.Patrick Walton2011-03-241-0/+68
|
* Further support for floating-point. Literals with exponents workTim Chevalier2011-03-221-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).
* Started adding support for floating-point type, floating-point literals, and ↵Tim Chevalier2011-03-211-0/+7
| | | | logging of floats. Other operations on float probably don't work yet.
* Add a suitable .def file for rustrt.dll on WindowsPatrick Walton2011-03-211-0/+70
|
* Add some C99 and C++ compatibility headers for MSVCPatrick Walton2011-03-213-0/+649
|
* Add some mutable variants of vector functions to the standard libraryPatrick Walton2011-03-181-0/+6
|
* rustc: Add str_from_cstr() and str_from_buf() functions to the standard ↵Patrick Walton2011-03-161-0/+23
| | | | library, as well as a test case
* Add functionality for running external programs to the std libMarijn Haverbeke2011-03-143-7/+97
| | | | See lib/run_program.rs.
* Extend stream functionalityMarijn Haverbeke2011-03-141-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.
* Add basic file-system functionalityMarijn Haverbeke2011-03-143-18/+57
| | | | | std.fs.list_dir will list the files in a directory, std.fs.file_is_dir will, given a pathname, determine whether it is a directory or not.
* Yell louder when a linkage error in rt occurs, as compiler output fails ↵Graydon Hoare2011-03-071-2/+3
| | | | quietly on null return.
* Comment-out TRACK_ALLOCATIONS again. Leave a note about it.Graydon Hoare2011-03-021-1/+4
|
* Parse parameter types for fmt extensionBrian Anderson2011-03-021-1/+1
|