Use const-initialized thread locals (#3923)
This was a relatively recent feature added to the Rust standard library which should help accelerate calls into WebAssembly slightly.
This commit is contained in:
@@ -176,7 +176,7 @@ mod details {
|
||||
|
||||
// Information about passes in a single thread.
|
||||
thread_local! {
|
||||
static CURRENT_PASS: Cell<Pass> = Cell::new(Pass::None);
|
||||
static CURRENT_PASS: Cell<Pass> = const { Cell::new(Pass::None) };
|
||||
static PASS_TIME: RefCell<PassTimes> = RefCell::new(Default::default());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user