about summary refs log tree commit diff
path: root/src/libcore/rt
AgeCommit message (Collapse)AuthorLines
2013-04-17auto merge of #5726 : brson/rust/struct-return, r=brsonbors-2/+0
r? @nikomatsakis This doesn't completely fix the x86 ABI for structs, but it does fix some cases. On linux, structs appear to be returned correctly now. On windows, structs are only returned by pointer when they are greater than 8 bytes. That scenario works now. In the case where the struct is less than 8 bytes our generated code looks peculiar. When returning a pair of u16, C packs both variables into %eax to return them. Our generated code though expects to find one of the pair in %ax and the other in %dx. Similar for u8. I haven't looked into it yet. There appears to also be struct passing problems on linux, where my `extern-pass-TwoU8s` and `extern-pass-TwoU16s` tests are failing.
2013-04-17rustc: Use an out pointer to return structs in x86 C ABI. #5347Brian Anderson-2/+0
This Adds a bunch of tests for passing and returning structs of various sizes to C. It fixes the struct return rules on unix, and on windows for structs of size > 8 bytes. Struct passing on unix for structs under a certain size appears to still be broken.
2013-04-16Merge remote-tracking branch 'brson/sched-cleanup'Brian Anderson-449/+457
Conflicts: src/libcore/rt/sched/mod.rs
2013-04-15core::rt: Clean up some more hacksBrian Anderson-12/+6
2013-04-15core::rt: Narrow down the unsafety of the thread-local schedulerBrian Anderson-47/+47
Only when borrowing the I/O implementation do we need unsafety
2013-04-15core::rt: Restructure context switches to take ownership of the SchedulerBrian Anderson-62/+94
In order to do a context switch you have to give up ownership of the scheduler, effectively passing it to the next execution context. This could help avoid some situations here tasks retain unsafe pointers to schedulers between context switches, across which they may have changed threads. There are still a number of uses of unsafe scheduler pointers.
2013-04-15core::rt: Make Scheduler::unsafe_local return a fabricated region pointerBrian Anderson-247/+228
Instead of taking a closure. It's unsafe either way. Rename it to unsafe_local_borrow.
2013-04-15core::rt: Rename Scheduler::local to Scheduler::unsafe_localBrian Anderson-26/+30
2013-04-15core::rt: A little bit of cleanup to thread-local schedulerBrian Anderson-20/+13
2013-04-15core::rt: Move thread-local scheduler to its own moduleBrian Anderson-99/+109
2013-04-15core::rt: Fix two incorrect uses of the thread-local schedulerBrian Anderson-2/+8
These would not be threadsafe
2013-04-14core::rt: Clean up the thread-local scheduler codeBrian Anderson-74/+79
Remove the ThreadLocalScheduler type in favor of functions. Move everything into the sched::local module.
2013-04-14core::rt: All context switches are followed by a cleanup actionBrian Anderson-5/+7
2013-04-14core::rt: Schedulers only need a single cleanup_job at a timeBrian Anderson-31/+31
Each context switch has up to one cleanup job and it is always executed immediately after the context switch.
2013-04-14core::rt: Insert calls to run_cleanup_tasks after all context switchesBrian Anderson-5/+8
2013-04-14core::rt: Rename block_running_task_and_then to deschedul_...Brian Anderson-7/+7
2013-04-14core::rt: Restructure task_from_last_cleanup_job to borrow correctlyBrian Anderson-48/+63
We need a number of mutable references to contexts so name it `get_contexts` and return a tuple of all of them.
2013-04-14core: remove unnecessary unsafe blocks/functionsAlex Crichton-6/+4
2013-04-10core: changes in response to #5656Niko Matsakis-0/+61
2013-04-04rt: improve mips backendJyun-Yan You-0/+1
2013-04-01remove stray mode on callback, seems to not change anythingGraydon Hoare-1/+1
2013-03-30Correct type signature for start lang item.Luqman Aden-0/+20
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-1/+1
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-88/+88
2013-03-29auto merge of #5570 : alexcrichton/rust/fix-unused-imports, r=sanxiynbors-12/+7
Before it wouldn't warn about unused imports in the list if something in the list was used. These commits fix that case, add a test, and remove all unused imports in lists of imports throughout the compiler.
2013-03-29libcore: language change minor fix for ARM & MIPSYoung-il Choi-2/+2
2013-03-28Removing unused importsAlex Crichton-12/+7
2013-03-27librustc: Allow expr_repeat to be used with any vstorePatrick Walton-1/+1
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-1/+1
2013-03-26librustc: Remove all uses of the old `[T * N]` fixed-length vector syntaxPatrick Walton-3/+3
2013-03-26Remove unused imports throughoutAlex Crichton-5/+0
2013-03-26core: Make sure every module at least has a one-line descriptionBrian Anderson-0/+2
2013-03-25Merge remote-tracking branch 'brson/rt'Brian Anderson-983/+1618
Conflicts: src/libcore/rt/context.rs src/libcore/rt/sched.rs src/libcore/rt/thread.rs src/libcore/rt/uv.rs
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-10/+10
2013-03-22libsyntax: Stop parsing `pure` and `static`Patrick Walton-1/+1
2013-03-22libcore: Remove `pure` from libcore. rs=depurePatrick Walton-4/+4
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-28/+28
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-1/+1
slice_unique
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-1/+1
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-19libcore: Make a couple of constructors public. rs=testfixingPatrick Walton-3/+3
2013-03-19librustc: Enforce privacy for static methods.Patrick Walton-3/+2
This starts moving a bunch of privacy checks into the privacy checking phase and out of resolve.
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-8/+8
notation. rs=delifetiming
2013-03-18core: Initialize global state lazily in the Scheduler ctorBrian Anderson-10/+7
I don't want any global one-time initalization functions because that will make embedding harder.
2013-03-18Add a way to run the test suite with the new schedulerBrian Anderson-0/+31
TESTARGS=--newrt make check-stage1-rpass Conflicts: src/rt/rustrt.def.in
2013-03-18core: Refactor uv bindingsBrian Anderson-483/+535
I can already see these are going to get massive. Putting them into multiple files.
2013-03-18core: Begin uv file system bindingsBrian Anderson-0/+36
2013-03-18core: Add rt::io and start sketching the APIBrian Anderson-0/+92
2013-03-18core: Rename rt::io to rt::rtioBrian Anderson-6/+4
This is an internal interface. I want to use rt::io for public interfaces.
2013-03-18core: Convert some multiline statements to single-lineBrian Anderson-135/+67
2013-03-18core: Simplify uvll bindings and strip out currently-unused bitsBrian Anderson-1770/+315
No more mapping uv structs to Rust structs