rust/mk
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
..
clean.mk Build compiler-rt and link it to all crates, similarly to morestack. 2014-02-11 15:59:59 -08:00
crates.mk Remove two allocations from spawning a green task 2014-02-13 20:31:17 -08:00
ctags.mk Don't make tags for our dependencies and tests. 2013-11-16 13:44:52 +11:00
dist.mk Include compiler-rt in the distribution tarballs 2014-02-13 12:50:25 -08:00
docs.mk auto merge of #12114 : brson/rust/faqs, r=cmr 2014-02-08 20:01:27 -08:00
host.mk Refactor the build system for easily adding crates 2014-01-26 00:53:41 -08:00
install.mk Build compiler-rt and link it to all crates, similarly to morestack. 2014-02-11 15:59:59 -08:00
llvm.mk Only build LLVM tools Rust needs. 2014-01-15 17:47:48 -08:00
perf.mk support for GNU configure syntax 2013-10-29 16:22:08 -07:00
platform.mk Consolidate codegen-related compiler flags 2014-02-10 00:50:39 -08:00
rt.mk Remove two allocations from spawning a green task 2014-02-13 20:31:17 -08:00
rustllvm.mk Remove VPATH usage in Makefiles 2014-02-02 10:59:14 -08:00
snap.mk support for GNU configure syntax 2013-10-29 16:22:08 -07:00
stage0.mk Make rustc's own lib directory configurable and change the default to rustlib. Fixes #3319 2014-01-05 12:06:20 +01:00
target.mk Build compiler-rt and link it to all crates, similarly to morestack. 2014-02-11 15:59:59 -08:00
tests.mk mk: make NO_REBUILD more forceful and more general. 2014-02-13 12:54:01 -08:00