Skip to content

Commit 768b96e

Browse files
committed
green: remove ancient register-saving code.
@alexcrichton said he thought this was useless (and it's old logic: it's been there since before the runtime was written into Rust).
1 parent 8786405 commit 768b96e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/libgreen/context.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// except according to those terms.
1010

1111
use std::uint;
12-
use std::cast::{transmute, transmute_mut_unsafe,
13-
transmute_region, transmute_mut_region};
12+
use std::cast::{transmute, transmute_mut_unsafe};
1413
use stack::Stack;
1514
use std::rt::stack;
1615
use std::raw;
@@ -55,10 +54,6 @@ impl Context {
5554
// Save and then immediately load the current context,
5655
// which we will then modify to call the given function when restored
5756
let mut regs = new_regs();
58-
unsafe {
59-
rust_swap_registers(transmute_mut_region(&mut *regs),
60-
transmute_region(&*regs));
61-
};
6257

6358
initialize_call_frame(&mut *regs,
6459
init,

0 commit comments

Comments
 (0)