v8/test/cctest/interpreter
Benedikt Meurer 9f28c129a0 [async] Introduce the notion of a "current microtask".
Change the way we start collecting async stack traces by storing the
current microtask as a root instead of trying to make sense of the
last frame we see. This makes it possible to use the zero cost async
stack traces in Node.js as well (where the last JavaScript frame we
see is not the actual async function, but some frame related to the
main event loop usually).

In addition to the benefit that it now works with Node.js, we can also
extend the new machinery to look through (almost arbitrary) promise
chains. For example this code snippet

```js
(async function() {
  await Promise.resolve().then(() =>
    console.log(new Error().stack));
})();
```

can be made to also show the async function frame, even though at the
point where the stack trace is collected we don't have any async
function on the stack. But instead there's a PromiseReactionJobTask
as "current microtask", and we can dig into the chained promise to
see where the async execution is going to continue and eventually
find the await promise in the chain.

This also removes the removes the need to allocate `.generator_object`
specially during scope resolution.

Bug: v8:7522
Ref: nodejs/node#11865
Tbr: ulan@chromium.org
Design-Document: bit.ly/v8-zero-cost-async-stack-traces
Change-Id: Ib96cb17c2f75cce083a24e5ba2bbb7914e20d203
Reviewed-on: https://chromium-review.googlesource.com/c/1277505
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56590}
2018-10-12 08:42:53 +00:00
..
bytecode_expectations [async] Introduce the notion of a "current microtask". 2018-10-12 08:42:53 +00:00
bytecode-expectations-printer.cc [interpreter][runtime] Avoid AllocationSites for oneshot code 2018-08-10 13:34:13 +00:00
bytecode-expectations-printer.h [interpreter][runtime] Avoid AllocationSites for oneshot code 2018-08-10 13:34:13 +00:00
generate-bytecode-expectations.cc [interpreter][runtime] Avoid AllocationSites for oneshot code 2018-08-10 13:34:13 +00:00
interpreter-tester.cc [cleanup] Refactor interpreter to use default members. 2018-09-14 16:50:34 +00:00
interpreter-tester.h [cleanup] Refactor interpreter to use default members. 2018-09-14 16:50:34 +00:00
source-position-matcher.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
source-position-matcher.h Use source position table for unoptimized code. 2016-06-28 05:52:52 +00:00
test-bytecode-generator.cc [interpreter] Restrict one-shot optimizations to only top-level IIFEs 2018-09-19 10:15:13 +00:00
test-interpreter-intrinsics.cc [cleanup] Remove a lot of dead intrinsics/runtime functions. 2018-09-20 12:48:57 +00:00
test-interpreter.cc [interpreter] Always put bytecode handlers in builtins table 2018-09-20 09:58:15 +00:00
test-source-positions.cc [cleanup] Refactor TestCaseData to use delete 2018-09-12 07:54:35 +00:00