On Jun 22, 2014, at 8:52 PM, Patrick Walton <pcwal...@mozilla.com> wrote:
> On 6/22/14 8:46 PM, Daniel Micay wrote: >> It's for faster (but not free) array bounds checking. I don't think Rust >> will be able to use it because it unwinds on out-of-bounds rather than >> aborting, and it will be difficult to turn the OS support (perhaps >> SIGFPE / SIGSEGV on *nix) into well defined unwinding in LLVM. > > GCJ did it. Presumably JavaScriptCore does it too. How? If you’re referring to JSC’s use of LLVM, IIRC (this is based on conversations with some of the people that did it, not looking at the code myself) they added support for on-stack replacement via stack maps and traps to a runtime to LLVM’s JIT. Failure of bounds checks is just treated like any other failure that falls off the optimized path and performs an OSR exit. Cameron _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev