@@ -44,25 +44,25 @@ pub fn op_set_handled_promise_rejection_handler(
4444 * exception_state. js_handled_promise_rejection_cb . borrow_mut ( ) = f;
4545}
4646
47- #[ op2]
47+ #[ op2( fast ) ]
4848pub fn op_ref_op ( scope : & mut v8:: HandleScope , promise_id : i32 ) {
4949 let context_state = JsRealm :: state_from_scope ( scope) ;
5050 context_state. unrefed_ops . borrow_mut ( ) . remove ( & promise_id) ;
5151}
5252
53- #[ op2]
53+ #[ op2( fast ) ]
5454pub fn op_unref_op ( scope : & mut v8:: HandleScope , promise_id : i32 ) {
5555 let context_state = JsRealm :: state_from_scope ( scope) ;
5656 context_state. unrefed_ops . borrow_mut ( ) . insert ( promise_id) ;
5757}
5858
59- #[ op2]
59+ #[ op2( fast ) ]
6060pub fn op_leak_tracing_enable ( scope : & mut v8:: HandleScope , enabled : bool ) {
6161 let context_state = JsRealm :: state_from_scope ( scope) ;
6262 context_state. activity_traces . set_enabled ( enabled) ;
6363}
6464
65- #[ op2]
65+ #[ op2( fast ) ]
6666pub fn op_leak_tracing_submit (
6767 scope : & mut v8:: HandleScope ,
6868 #[ smi] kind : u8 ,
@@ -168,7 +168,7 @@ pub fn op_timer_queue_immediate(
168168 context_state. timers . queue_timer ( 0 , ( task, 0 ) ) as _
169169}
170170
171- #[ op2]
171+ #[ op2( fast ) ]
172172pub fn op_timer_cancel ( scope : & mut v8:: HandleScope , id : f64 ) {
173173 let context_state = JsRealm :: state_from_scope ( scope) ;
174174 context_state. timers . cancel_timer ( id as _ ) ;
@@ -177,13 +177,13 @@ pub fn op_timer_cancel(scope: &mut v8::HandleScope, id: f64) {
177177 . complete ( RuntimeActivityType :: Timer , id as _ ) ;
178178}
179179
180- #[ op2]
180+ #[ op2( fast ) ]
181181pub fn op_timer_ref ( scope : & mut v8:: HandleScope , id : f64 ) {
182182 let context_state = JsRealm :: state_from_scope ( scope) ;
183183 context_state. timers . ref_timer ( id as _ ) ;
184184}
185185
186- #[ op2]
186+ #[ op2( fast ) ]
187187pub fn op_timer_unref ( scope : & mut v8:: HandleScope , id : f64 ) {
188188 let context_state = JsRealm :: state_from_scope ( scope) ;
189189 context_state. timers . unref_timer ( id as _ ) ;
@@ -225,14 +225,14 @@ pub fn op_run_microtasks(isolate: *mut v8::Isolate) {
225225 } ;
226226}
227227
228- #[ op2]
228+ #[ op2( fast ) ]
229229pub fn op_has_tick_scheduled ( scope : & mut v8:: HandleScope ) -> bool {
230230 JsRealm :: state_from_scope ( scope)
231231 . has_next_tick_scheduled
232232 . get ( )
233233}
234234
235- #[ op2]
235+ #[ op2( fast ) ]
236236pub fn op_set_has_tick_scheduled ( scope : & mut v8:: HandleScope , v : bool ) {
237237 JsRealm :: state_from_scope ( scope)
238238 . has_next_tick_scheduled
@@ -776,7 +776,7 @@ pub fn op_get_promise_details<'a>(
776776 out. into ( )
777777}
778778
779- #[ op2]
779+ #[ op2( fast ) ]
780780pub fn op_set_promise_hooks (
781781 scope : & mut v8:: HandleScope ,
782782 init_hook : v8:: Local < v8:: Value > ,
@@ -1005,7 +1005,7 @@ pub fn op_destructure_error(
10051005/// Effectively throw an uncatchable error. This will terminate runtime
10061006/// execution before any more JS code can run, except in the REPL where it
10071007/// should just output the error to the console.
1008- #[ op2( reentrant) ]
1008+ #[ op2( fast , reentrant) ]
10091009pub fn op_dispatch_exception (
10101010 scope : & mut v8:: HandleScope ,
10111011 exception : v8:: Local < v8:: Value > ,
@@ -1129,7 +1129,7 @@ pub fn op_set_format_exception_callback<'a>(
11291129 old. map ( |func| func. into ( ) )
11301130}
11311131
1132- #[ op2]
1132+ #[ op2( fast ) ]
11331133pub fn op_event_loop_has_more_work ( scope : & mut v8:: HandleScope ) -> bool {
11341134 JsRuntime :: has_more_work ( scope)
11351135}
0 commit comments