aboutsummaryrefslogtreecommitdiff
path: root/src/rt
Commit message (Collapse)AuthorAgeFilesLines
* Introduce str_slice runtime functionBrian Anderson2011-05-112-0/+19
| | | | | | | This reduces the time to execute the new lib-str tests from 1:40ish to a few seconds and will eventually allow the full lib-sha1 test to run in a reasonable amount of time. XFAIL lib-str in stage0 - it will run very slowly until the next snapshot.
* Attempt to put out burning darwin tinderbox.Graydon Hoare2011-05-101-0/+4
|
* rt: Consistently refer to structs as structs and classes as classes. Clang ↵Patrick Walton2011-05-083-5/+5
| | | | complains about this.
* Fix OS X build.Rafael Ávila de Espíndola2011-05-051-9/+9
|
* Change the setup so that rust_activate_glue returns to rust_exit_task_glueRafael Ávila de Espíndola2011-05-051-38/+19
| | | | | | | | | | | and rust_exit_task_glue calls the rust main. This is simpler since we only need to setup one frame. It also matches what ld.so does, so gdb is happy and stops a backtrace at rust_exit_task_glue instead of continuing past whatever function happened to be before rust_exit_task_glue is the object file. This is the rt part and should be merged after the rust0 part.
* rustc: Link with intrinsics.bc; change intrinsics linkage to linkonce_odrPatrick Walton2011-05-052-1/+4
|
* Mark valgrind's _qzz_res as unused to silence warnings on gcc 4.6.Ralph Giles2011-05-052-18/+18
| | | | | | | | | | | This applies c11675 by Julian Seward from valgrind trunk (svn://svn.valgrind.org/valgrind/trunk) to rustrt's included copies of memcheck.h and valgrind.h, effectively backporting the fix from the unreleased 3.6.2. The commit simply applies the gcc 'unused' attribute to the relevant declarations. This change allows compilation of the runtime code under gcc 4.6 with -Werror, as the makefile currently requests.
* build: Build intrinsics.bcPatrick Walton2011-05-041-1/+1
|
* Try to fail nicely, again.Graydon Hoare2011-05-042-2/+2
|
* Fail in a slightly more organized fashion for now.Graydon Hoare2011-05-041-4/+2
|
* rustc: Stub Rust intrinsics. We check in the .ll file for now to temporarily ↵Patrick Walton2011-05-032-0/+74
| | | | dodge a dependency on clang.
* Update valgrind.h and memcheck.h to 3.6.0Graydon Hoare2011-05-032-180/+1014
|
* Remove unused variable.Rafael Ávila de Espíndola2011-05-031-7/+1
|
* Split start into rustc and rustboot versions. This introduces a bit ofRafael Ávila de Espíndola2011-05-032-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.
* stdlib: Add a Time module to the standard libraryPatrick Walton2011-04-292-0/+30
|
* Log refcounts in upcall_vec_grow.Graydon Hoare2011-04-281-4/+4
|
* 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
|