Commit Graph

266 Commits

Author SHA1 Message Date
whitequark 0ca4bc86ff doc: explicitly state the contracts of Stack and GuardedStack. 2016-09-02 14:51:29 -04:00
whitequark 3f6c895cb7 README: explicitly list supported platforms. 2016-09-02 14:51:29 -04:00
Jonathan Soo 2f143a18dc Change README to use suspend()
fix #37
2016-09-02 14:45:22 -04:00
edef a60fcbfcdb v1.0.4 2016-08-31 20:25:43 -04:00
whitequark a1ea208652 arch/x86_64: hack to work around ld64 shortcomings on OS X.
fix #35, close #36
2016-08-31 20:25:00 -04:00
edef 49d1a24e8f v1.0.3 2016-08-31 14:25:51 -04:00
Peter Atashian 28c12a5ec5 Clarify UMS threads
fix #32
2016-08-31 14:24:25 -04:00
whitequark a733290359 arch: bring back clobbers for input operands.
This reverts a part of 365e40b. While it is not legal to clobber
the output register, it is legal and necessary to do this for inputs,
since we do not preserve them, and LLVM could have decided to
reuse them.

Thanks to @Amanieu for discovering this.
2016-08-31 14:17:54 -04:00
whitequark 248d7b16b5 arch/or1k: fix typo. 2016-08-31 14:17:54 -04:00
whitequark 4c5b0389c9 README: mention or1k support. 2016-08-31 14:17:54 -04:00
edef f778fbacbf add crates.io badge 2016-08-30 21:09:26 -04:00
edef dd69fa563a update README installation section 2016-08-30 21:03:48 -04:00
edef 1aa5ffdcd0 fix doc comment of Stack::limit 2016-08-30 18:30:58 -04:00
edef 5808a0ac63 v1.0.2 2016-08-30 18:28:51 -04:00
edef bbfa5a43bc add regression test for #31 2016-08-30 18:26:42 -04:00
edef 1994ffee27 don't drop yielded values in the generator
fix #31
2016-08-30 18:17:52 -04:00
edef 89a8f68c7e v1.0.1 2016-08-30 14:03:08 -04:00
edef 3ad902010f get rid of Windows deps 2016-08-30 14:02:32 -04:00
edef 6a1cad2966 v1.0.0 2016-08-30 13:59:05 -04:00
edef a1f77fe456 deal with crates.io's lack of proper SPDX parsing 2016-08-30 13:58:47 -04:00
edef de9e4c59d0 add Cargo metadata 2016-08-30 13:46:29 -04:00
edef e47cb809f4 use valgrind_request from crates.io 2016-08-30 13:43:51 -04:00
whitequark 2d8cefcabc Do not simultaneously clobber registers passed into assembly.
This is not actually legal (although the restriction is not
documented anywhere), and is not caught by LLVM unless the codegen
option -verify-machineinstrs is specified. This option is now used
on Travis.

While not legal, this does not seem to result in invalid output
(although it creates an unnecessary spill); however, under extremely
specific circumstances (e.g. when a register scavenger is run under
severe pressure), this will result in a codegen crash, which is
how I found it.
2016-08-30 12:20:34 -04:00
whitequark e02ef03304 Add #[derive(Debug)] for SliceStack and OwnedStack. 2016-08-30 12:20:34 -04:00
whitequark 5a77a01863 Implement OwnedStack. 2016-08-30 12:20:34 -04:00
whitequark 4b32c18f70 Rename Yielder::generate to Yielder::suspend.
This makes more sense, because "generate" implies *running*
a generator, not *returning* from a generator. That name was
a vestige of the time when libfringe only really provided a .next()
implementation, which made marginally more sense together with
.generate(), but it doesn't anymore when we have .resume().
2016-08-30 12:20:34 -04:00
edef ef0225cacb add license field to Cargo.toml 2016-08-21 00:03:14 +02:00
edef f21b8dc936 Update the license headers for MIT/Apache 2016-08-20 23:45:01 +02:00
edef 271c927c3f List specific authors in LICENSE-MIT, not just "the developers" 2016-08-20 23:41:10 +02:00
Corey Richardson 77f83e0d21 Relicense to dual MIT/Apache-2.0
Closes https://github.com/edef1c/libfringe/issues/23
2016-08-20 23:39:19 +02:00
whitequark eb247666ba Explain how to use on bare metal in README. 2016-08-19 15:12:42 +02:00
whitequark f8cf95f686 Implement SliceStack. 2016-08-19 15:12:42 +02:00
whitequark e0ad79ea0c Add an OR1K port. 2016-08-19 15:12:42 +02:00
whitequark d4b7c427c9 impl Iterator for Generator<Input=()>. 2016-08-13 13:38:04 +02:00
whitequark 145c18125a Explain how trampolines work. 2016-08-13 13:38:04 +02:00
whitequark b79e7c0a9b Rename Stack::top() to Stack::base(), which is correct.
Fixes #25.
2016-08-13 13:38:04 +02:00
whitequark 7d5075edc2 Add more examples to README.
This also renames some functions for a mild increase in backtrace
clarity.
2016-08-13 13:38:04 +02:00
whitequark f34ddc6805 Don't use core::intrinsics.
The core::intrinsics::unreachable() we used at the end of every naked
function is essentially pointless, as #[naked] implies that intrinsic
at the end of the function. rustc currently does not implement that
behavior (rust-lang/rust#32487), but it is a bug. On top of that,
anything except a single asm!() in naked functions is likely to be
disallowed in the future (rust-lang/rust#32490).

A nice side effect is that we avoid the core_intrinsics feature,
which will be never stabilized, though neither asm nor
naked_functions are likely to be stabilized soon.
2016-08-13 13:38:04 +02:00
whitequark ddbf9a5afe Reimplement Generator to pass both input and output values around. 2016-08-13 13:38:04 +02:00
whitequark 308df32ac2 Use a more semantically correct PhantomData field in Generator. 2016-08-13 13:38:04 +02:00
whitequark 302ceef10a Clarify the Windows situation.
Also, remove the Windows OsStack implementation. It will not ever
be useful in libfringe, as even if we add support for Windows
using fibers, the OS allocates stacks for fibers and we needn't
do it manually.
2016-08-13 13:38:04 +02:00
whitequark a5d3430e63 Make Generator safe in presence of destructors. 2016-08-13 13:38:04 +02:00
whitequark 23cf17865d Remove workaround for rust-lang/rust#25544. 2016-08-13 13:38:04 +02:00
edef ca43ba0498 Make fringe::Context private. 2016-08-13 13:38:04 +02:00
edef b1a6b17d0a Move the Context tests and benches into src/
This concludes preparations for making Context private again.
2016-08-13 13:38:04 +02:00
whitequark 892a7696ec Allow unwinding to propagate across a context swap.
The main purpose of this is having nice backtraces in gdb, although
it also slightly simplifies poisoning state of the API consumers
after a panic.
2016-08-13 13:38:04 +02:00
whitequark 40fbfdde0c Kill impl StackPointer.
That was a silly idea for a silly abstraction, and it brought no
improvement, only confusion. So, revert it.
2016-08-13 13:38:04 +02:00
edef 244db8490b Remove the badge for Windows CI too 2016-08-13 12:54:33 +02:00
edef 375fd03a16 Get rid of Windows CI (Appveyor) 2016-08-13 12:52:37 +02:00
edef bb699c0f6e Allow inlining Generator::state 2016-08-13 12:52:12 +02:00