Fix running code via '-Z jit'
This commit is contained in:
parent
6148c1c0c5
commit
21d7098427
|
@ -200,6 +200,8 @@ pub mod jit {
|
|||
}
|
||||
}
|
||||
|
||||
// The stage1 compiler won't work, but that doesn't really matter. TLS
|
||||
// changed only very recently to allow storage of owned values.
|
||||
fn engine_key(_: ~Engine) {}
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
|
@ -213,6 +215,8 @@ pub mod jit {
|
|||
pub fn consume_engine() -> Option<~Engine> {
|
||||
unsafe { local_data::pop(engine_key) }
|
||||
}
|
||||
#[cfg(stage0)]
|
||||
pub fn consume_engine() -> Option<~Engine> { None }
|
||||
}
|
||||
|
||||
pub mod write {
|
||||
|
|
|
@ -332,7 +332,11 @@ pub fn monitor(f: ~fn(diagnostic::Emitter)) {
|
|||
|
||||
let _finally = finally { ch: ch };
|
||||
|
||||
f(demitter)
|
||||
f(demitter);
|
||||
|
||||
// Due reasons explain in #7732, if there was a jit execution context it
|
||||
// must be consumed and passed along to our parent task.
|
||||
back::link::jit::consume_engine()
|
||||
} {
|
||||
result::Ok(_) => { /* fallthrough */ }
|
||||
result::Err(_) => {
|
||||
|
|
Loading…
Reference in New Issue