rust/src/rt
Alex Crichton 301ff0c2df Remove two allocations from spawning a green task
Two unfortunate allocations were wrapping a proc() in a proc() with
GreenTask::build_start_wrapper, and then boxing this proc in a ~proc() inside of
Context::new(). Both of these allocations were a direct result from two
conditions:

1. The Context::new() function has a nice api of taking a procedure argument to
   start up a new context with. This inherently required an allocation by
   build_start_wrapper because extra code needed to be run around the edges of a
   user-provided proc() for a new task.

2. The initial bootstrap code only understood how to pass one argument to the
   next function. By modifying the assembly and entry points to understand more
   than one argument, more information is passed through in registers instead of
   allocating a pointer-sized context.

This is sadly where I end up throwing mips under a bus because I have no idea
what's going on in the mips context switching code and don't know how to modify
it.

Closes #7767
cc #11389
2014-02-13 20:31:17 -08:00
..
arch Remove two allocations from spawning a green task 2014-02-13 20:31:17 -08:00
msvc Add some C99 and C++ compatibility headers for MSVC 2011-03-21 10:24:00 -07:00
sundown Expand tidy to prevent binaries from being checked 2013-09-30 10:15:47 -07:00
vg rt: Make valgrind Win64-compatible 2013-08-26 22:15:45 +09:00
libuv-auto-clean-trigger uv: Suppress a warning by using an absolute path 2013-12-22 22:30:51 -08:00
miniz.c Move runtime files to C instead of C++ 2013-11-18 21:45:58 -08:00
rust_android_dummy.c rt: Define exp10 on Android 2014-01-03 21:29:40 -08:00
rust_android_dummy.h auto merge of #6234 : yichoi/rust/glob-dummy-pull, r=thestinger 2013-05-04 22:09:36 -07:00
rust_builtin.c std: Hardcode pthread constants and structures 2014-02-03 12:04:30 -08:00
rust_test_helpers.c Remove rust_globals.h 2013-12-24 20:09:49 -08:00
rust_try.ll Stop using C++ exceptions for stack unwinding. 2013-12-24 12:13:42 -08:00
rust_uv.c Removed all instances of XXX in preparation for relaxing of FIXME rule 2014-01-26 14:42:53 -05:00