about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-05 08:26:51 -0700
committerbors <bors@rust-lang.org>2014-06-05 08:26:51 -0700
commit57e7147f3ef69ea7b5dd7eb1e3f621f0938672cc (patch)
tree86c81e4c63e7506cb5017db347b08ee9c8e17358 /src/rustllvm/RustWrapper.cpp
parentbb57e417eaac8b61abd353f1c5a59fe8f148592a (diff)
parent0c7c93b8e83544abc7eef5abd76526e5c49882f5 (diff)
downloadrust-57e7147f3ef69ea7b5dd7eb1e3f621f0938672cc.tar.gz
rust-57e7147f3ef69ea7b5dd7eb1e3f621f0938672cc.zip
auto merge of #14644 : alexcrichton/rust/more-no-runtime-use-cases, r=brson
A few notable improvements were implemented to cut down on the number of aborts
triggered by the standard library when a local task is not found.

* Primarily, the unwinding functionality was restructured to support an unsafe
  top-level function, `try`. This function invokes a closure, capturing any
  failure which occurs inside of it. The purpose of this function is to be as
  lightweight of a "try block" as possible for rust, intended for use when the
  runtime is difficult to set up.

  This function is *not* meant to be used by normal rust code, nor should it be
  consider for use with normal rust code.

* When invoking spawn(), a `fail!()` is triggered rather than an abort.

* When invoking LocalIo::borrow(), which is transitively called by all I/O
  constructors, None is returned rather than aborting to indicate that there is
  no local I/O implementation.

A test case was also added showing the variety of things that you can do without
a runtime or task set up now. In general, this is just a refactoring to abort
less quickly in the standard library when a local task is not found.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions