Skip to content

Commit 911b980

Browse files
committed
Reapply "feat(op2): remove async attribute and make FromV8/ToV8 the default behaviour (#1262)" (#1275)
This reverts commit 84dbf9a.
1 parent dc4f9b1 commit 911b980

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+992
-1454
lines changed

core/benches/ops/async.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ pub fn op_make_external() -> *const c_void {
5151
std::ptr::null()
5252
}
5353

54-
#[op2(async)]
54+
#[op2]
5555
pub async fn op_async_void() {}
5656

57-
#[op2(async)]
57+
#[op2]
5858
pub async fn op_async_yield() {
5959
tokio::task::yield_now().await
6060
}

core/benches/ops/sync.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ deno_core::extension!(
2525
op_local,
2626
op_local_scope,
2727
op_local_nofast,
28-
op_global,
29-
op_global_scope,
3028
op_scope,
3129
op_isolate_nofast,
3230
op_make_external,
@@ -111,16 +109,6 @@ pub fn op_local_scope<'s>(
111109
#[op2(nofast)]
112110
pub fn op_local_nofast(_s: v8::Local<v8::String>) {}
113111

114-
#[op2]
115-
pub fn op_global(#[global] _s: v8::Global<v8::String>) {}
116-
117-
#[op2]
118-
pub fn op_global_scope(
119-
_scope: &mut v8::PinScope,
120-
#[global] _s: v8::Global<v8::String>,
121-
) {
122-
}
123-
124112
#[op2(fast)]
125113
pub fn op_scope(_scope: &mut v8::PinScope) {}
126114

@@ -455,28 +443,6 @@ fn bench_op_v8_local_nofast(b: &mut Bencher) {
455443
);
456444
}
457445

458-
/// A function that takes a v8::Global<String>
459-
fn bench_op_v8_global(b: &mut Bencher) {
460-
bench_op(
461-
b,
462-
BENCH_COUNT,
463-
"op_global",
464-
1,
465-
"op_global('this is a reasonably long string that we would like to get the length of!');",
466-
);
467-
}
468-
469-
/// A function that takes a v8::Global<String>
470-
fn bench_op_v8_global_scope(b: &mut Bencher) {
471-
bench_op(
472-
b,
473-
BENCH_COUNT,
474-
"op_global_scope",
475-
1,
476-
"op_global_scope('this is a reasonably long string that we would like to get the length of!');",
477-
);
478-
}
479-
480446
fn bench_op_bigint(b: &mut Bencher) {
481447
bench_op(b, BENCH_COUNT, "op_bigint", 1, "op_bigint(0n);");
482448
}
@@ -581,8 +547,6 @@ benchmark_group!(
581547
bench_op_v8_local,
582548
bench_op_v8_local_scope,
583549
bench_op_v8_local_nofast,
584-
bench_op_v8_global,
585-
bench_op_v8_global_scope,
586550
bench_op_bigint,
587551
bench_op_bigint_return,
588552
bench_op_v8_scope,

0 commit comments

Comments
 (0)