v8/test/mjsunit/harmony
littledan f296dad962 Improve stack traces for async functions
This patch tracks the stack of async functions differently from other
Promise async stack tracking. With this patch, the stack trace of a
callstack of async functions should look similarly to the call stack
if all of the functions were synchronous. An example can be found in
the updated test expectations: https://codereview.chromium.org/2362923002 .

The new stack traces are implemented using existing mechanisms in the
inspector. The inspector has two ways to save async stack traces: recurring
and non-recurring stacks. An example of a non-recurring stack is setTimeout,
and a recurring one is saved for setInterval. Recurring stacks are deleted
only when a special "cancel" function is called, rather than being deleted
after being used the first time. Previous Promise async stack tracking always
used non-recurring stacks.

For async functions, this patch saves a recurring stack. The top frame of
the stack is duplicated, as the resuming function contains a similar frame;
the devtools frontend is responsible for removing or marking this frame,
which it can do based on seeing the [async function] line which follows it.
The second frame will instead be provided by the resuming execution
context. The recurring stack is saved when the async function is entered, and
it is deleted from a finally block. The id of the stack is saved in the outer
Promise being constructed by the async function. When an intermediate
throwaway Promise will be triggered as a reaction, it will be identified as
such based on its debugging metadata, and the corresponding async function's
recurring stack will be used.

BUG=v8:4483

Review-Url: https://codereview.chromium.org/2357423002
Cr-Commit-Position: refs/heads/master@{#39695}
2016-09-23 22:24:03 +00:00
..
regress Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
array-concat-array-proto-getter.js
array-concat-array-proto.js
array-concat-object-proto-dict-getter.js
array-concat-object-proto-dict.js
array-concat-object-proto-generic-dict.js
array-concat-object-proto.js
async-arrow-lexical-arguments.js
async-arrow-lexical-new.target.js
async-arrow-lexical-super.js
async-arrow-lexical-this.js
async-await-basic.js [test] Fix copy&paste error in bug link. 2016-08-18 08:44:32 +00:00
async-await-no-constructor.js [promise] Async/await edge case spec compliance fix 2016-08-06 01:00:47 +00:00
async-await-resolve-new.js [promise] Async/await edge case spec compliance fix 2016-08-06 01:00:47 +00:00
async-await-species.js [promise] separate PerformPromiseThen from PromiseThen 2016-08-04 22:56:45 +00:00
async-debug-basic.js
async-debug-caught-exception-cases0.js Reland Async/await Promise dependency graph 2016-09-20 19:04:26 +00:00
async-debug-caught-exception-cases1.js Reland Async/await Promise dependency graph 2016-09-20 19:04:26 +00:00
async-debug-caught-exception-cases2.js Reland Async/await Promise dependency graph 2016-09-20 19:04:26 +00:00
async-debug-caught-exception-cases3.js Reland Async/await Promise dependency graph 2016-09-20 19:04:26 +00:00
async-debug-caught-exception-cases.js Reland Async/await Promise dependency graph 2016-09-20 19:04:26 +00:00
async-debug-caught-exception.js Change which ExceptionEvents are triggered by Promises 2016-08-24 00:20:50 +00:00
async-debug-step-abort-at-break.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-continue-at-break.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-in-and-out.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-in-out-out.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-in.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-nested.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-next-constant.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-next.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-debug-step-out.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-destructuring.js Destructuring/default tests for generators and async functions 2016-08-10 19:32:29 +00:00
async-function-debug-evaluate.js
async-function-debug-scopes.js [debug] implement intuitive semantics for stepping over await call. 2016-06-03 15:31:52 +00:00
async-function-stacktrace.js [parser] improve inferred function names for async arrow functions 2016-08-12 22:47:11 +00:00
atomics.js
block-lazy-compile.js
dataview-accessors.js Reland of Amend DataView, ArrayBuffer, and TypedArray methods to use ToIndex. (patchset #2 id:170001 of https://codereview.chromium.org/2113593002/ ) 2016-08-17 17:38:56 +00:00
debug-async-break-on-stack.js [esnext] Fix various callsites to use is_resumable, not is_generator 2016-05-31 17:15:15 +00:00
debug-async-break.js [esnext] Fix various callsites to use is_resumable, not is_generator 2016-05-31 17:15:15 +00:00
debug-async-function-async-task-event.js Improve stack traces for async functions 2016-09-23 22:24:03 +00:00
debug-async-liveedit.js Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
default-parameter-do-expression.js Merge DeclarationScope::temps_ and Scope::ordered_variables_ into Scope::locals_ 2016-08-25 19:12:00 +00:00
do-expressions-control.js
do-expressions.js
for-in.js
function-sent.js Fix behavior of return on yield*. 2016-06-28 07:10:54 +00:00
futex.js [Atomics] Rename Atomics.futex*, remove Atomics.futexWakeOrRequeue 2016-07-13 18:34:03 +00:00
generators-turbo.js Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
generators.js Remove the --ignition-generators flag. 2016-07-25 12:56:27 +00:00
harmony-string-pad-end.js
harmony-string-pad-start.js
mirror-async-function-promise.js [test] add FunctionMirror and PromiseMirror tests for async functions 2016-06-21 16:31:52 +00:00
mirror-async-function.js [test] add FunctionMirror and PromiseMirror tests for async functions 2016-06-21 16:31:52 +00:00
module-parsing-eval.js
object-entries.js
object-get-own-property-descriptors.js [builtins] don't create keys for undefined property descriptors in O.gOPDs 2016-07-04 18:04:05 +00:00
object-values.js
private-symbols.js
private.js
regexp-change-exec.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-lookbehind.js
regexp-named-captures.js [regexp] Experimental support for regexp named captures 2016-06-15 06:49:55 +00:00
regexp-property-binary.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-blocks.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-char-class.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-disabled.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-enumerated.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-exact-match.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-general-category.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-lu-ui.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-scripts.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
regexp-property-special.js Remove all harmony runtime flags which shipped in M51 2016-06-24 01:13:10 +00:00
set-prototype-of.js
sharedarraybuffer.js [builtins] Migrate SharedArrayBuffer.byteLength to C++. 2016-07-07 19:44:23 +00:00
simd.js
sloppy-implicit-block-function.js
sloppy-legacy-duplicate-generators.js
sloppy-no-duplicate-async.js
sloppy-no-duplicate-generators.js
sloppy-restrictive-block-function.js
to-length.js
to-name.js [intrinsics] Remove obsolete intrinsics. 2016-07-12 06:41:23 +00:00
to-number.js
to-primitive.js [intrinsics] Remove obsolete intrinsics. 2016-07-12 06:41:23 +00:00
to-string.js [intrinsics] Remove obsolete intrinsics. 2016-07-12 06:41:23 +00:00
trailing-commas-length.js Allow trailing commas in function parameter lists 2016-06-29 01:39:10 +00:00