aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest
diff options
context:
space:
mode:
authorMaya Lekova <mslekova@chromium.org>2018-05-14 10:55:07 +0200
committerMyles Borins <mylesborins@google.com>2018-06-01 09:59:19 +0200
commitf781758d41a2fe76d3c8060accea77917bc29812 (patch)
tree7fd3ba2cadd159c31512ebe2d5a0b40beaf94f3f /deps/v8/test/cctest
parent109ba58b5f6fe42a4a22b990eb5fb21946012727 (diff)
downloadandroid-node-v8-f781758d41a2fe76d3c8060accea77917bc29812.tar.gz
android-node-v8-f781758d41a2fe76d3c8060accea77917bc29812.tar.bz2
android-node-v8-f781758d41a2fe76d3c8060accea77917bc29812.zip
deps: backport 91ddb65d from upstream V8
Original commit message: Revert promises optimizations due to regressions in async hooks Revert "[async-await] Eliminate throwaway promise in async functions." This reverts commit a840f1f8f7e6c9ab32dec456a954612619855093. Revert "[async-generators] Also avoid throwaway promise here." This reverts commit feb545ceba5cb477ba883b46b60142f441ad5a3d. Revert "[async-await] Turn await closures into intrinsics." This reverts commit d97bb317386506a6798386b74647cbe0502fce35. Revert "[async-generators] Add fast-path for primitives in AsyncGeneratorYield." This reverts commit e57b500eb26dc595609613963468910eb4bcae2e. Revert "[async-generators] Add fast-path to skip "then" lookup in AsyncGeneratorResolve." This reverts commit c15802e11e30976528d1b711a9b9e6ff6b490117. Revert "[promises] Correctly run before/after hooks for await." This reverts commit ca7639239fc13e992e857710cbf7dbaac87163bf. Bug: v8:7253, v8:7745 Change-Id: I25ad0d2df3cfbc84dbb431aa25b268bce8a39e89 Reviewed-on: https://chromium-review.googlesource.com/1049975 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#53139} Refs: https://github.com/v8/v8/commit/91ddb65d3b34c07c5026727de84dc91b5e0a43cd Fixes: https://github.com/nodejs/node/issues/20516 Co-authored-by: Matteo Collina <matteo.collina@gmail.com> PR-URL: https://github.com/nodejs/node/pull/19989 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/test/cctest')
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden12
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden18
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden2
-rw-r--r--deps/v8/test/cctest/test-api.cc6
5 files changed, 17 insertions, 23 deletions
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden
index df6b372358..2b4eb6b2cc 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden
@@ -39,7 +39,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
+ B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(1),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
@@ -166,7 +166,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
+ B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(2),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
@@ -404,7 +404,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(16),
B(Mov), R(2), R(15),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(15), U8(2),
+ B(CallJSRuntime), U8(%async_generator_await_uncaught), R(15), U8(2),
B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
@@ -580,7 +580,7 @@ bytecodes: [
B(Jump), U8(2),
B(Star), R(13),
B(Mov), R(0), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(12), U8(2),
+ B(CallJSRuntime), U8(%async_generator_await_uncaught), R(12), U8(2),
/* 49 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(1),
B(ResumeGenerator), R(0), R(0), U8(12),
B(Star), R(12),
@@ -598,7 +598,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
B(Star), R(13),
B(Mov), R(0), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(12), U8(2),
+ B(CallJSRuntime), U8(%async_generator_await_uncaught), R(12), U8(2),
/* 49 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(2),
B(ResumeGenerator), R(0), R(0), U8(12),
B(Star), R(12),
@@ -639,7 +639,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
+ B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(4),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
index 95400dacf8..4d36315f02 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
@@ -53,7 +53,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(20), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
@@ -137,7 +137,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(20), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
@@ -160,7 +160,7 @@ bytecodes: [
B(Star), R(20),
B(Mov), R(2), R(19),
B(Mov), R(11), R(21),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(19), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
B(ResumeGenerator), R(2), R(0), U8(19),
B(Star), R(19),
@@ -306,7 +306,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(20), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
@@ -391,7 +391,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(20), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
@@ -414,7 +414,7 @@ bytecodes: [
B(Star), R(20),
B(Mov), R(2), R(19),
B(Mov), R(11), R(21),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(19), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
B(ResumeGenerator), R(2), R(0), U8(19),
B(Star), R(19),
@@ -575,7 +575,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(20), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
@@ -667,7 +667,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(20), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
@@ -690,7 +690,7 @@ bytecodes: [
B(Star), R(20),
B(Mov), R(2), R(19),
B(Mov), R(11), R(21),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(19), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
B(ResumeGenerator), R(2), R(0), U8(19),
B(Star), R(19),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
index 1a0155da79..f92076e6e6 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
@@ -1196,7 +1196,7 @@ bytecodes: [
/* 45 S> */ B(Mov), R(2), R(21),
B(Mov), R(0), R(22),
B(Mov), R(11), R(23),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(21), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
/* 45 E> */ B(SuspendGenerator), R(2), R(0), U8(21), U8(0),
B(ResumeGenerator), R(2), R(0), U8(21),
B(Star), R(21),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
index 80609db7b8..7edf446ce3 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
@@ -493,7 +493,7 @@ bytecodes: [
/* 52 S> */ B(Mov), R(1), R(7),
B(Mov), R(0), R(8),
B(Mov), R(2), R(9),
- B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(7), U8(3),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(7), U8(3),
/* 52 E> */ B(SuspendGenerator), R(1), R(0), U8(7), U8(0),
B(ResumeGenerator), R(1), R(0), U8(7),
B(Star), R(7),
diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc
index 2f552a9d9d..8b93944d93 100644
--- a/deps/v8/test/cctest/test-api.cc
+++ b/deps/v8/test/cctest/test-api.cc
@@ -18358,12 +18358,6 @@ TEST(PromiseHook) {
CHECK_EQ(v8::Promise::kFulfilled, GetPromise("p")->State());
CHECK_EQ(9, promise_hook_data->promise_hook_count);
- promise_hook_data->Reset();
- source = "(async() => await p)();\n";
-
- CompileRun(source);
- CHECK_EQ(11, promise_hook_data->promise_hook_count);
-
delete promise_hook_data;
isolate->SetPromiseHook(nullptr);
}