38301e7bb9
This reverts commitc7c47c68f2
. Reason for revert: breaks TSAN https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/28738 Original change's description: > Reland "[runtime] Move Context::native_context to the map" > > This is a reland off05bae1e0d
> > Previously I presumed that the context read from a frame in the profiler was > a valid context. Turns out that on non-intel we're not guaranteed that the > frame is properly set up. In the case we looked at, the profiler took a > sample right before writing the frame marker indicating a builtin frame, > causing the "context" pointer from that frame to be a bytecode array. Since > we'll read random garbage on the stack as a possible context pointer, I made > the code reading the native context from it a little more defensive. > > Bug: v8:9860 > > Original change's description: > > [runtime] Move Context::native_context to the map > > > > Remove the native context slot from contexts by making context maps > > native-context-specific. Now we require 2 loads to go from a context to the > > native context, but we have 1 field fewer to store when creating contexts. > > > > Change-Id: I3c0d7c50c94060c4129db684f46a567de6f30e8d > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1859629 > > Commit-Queue: Toon Verwaest <verwaest@chromium.org> > > Reviewed-by: Igor Sheludko <ishell@chromium.org> > > Reviewed-by: Peter Marshall <petermarshall@chromium.org> > > Reviewed-by: Maya Lekova <mslekova@chromium.org> > > Reviewed-by: Georg Neis <neis@chromium.org> > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > > Reviewed-by: Toon Verwaest <verwaest@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#64296} > > Change-Id: If9461e9b21d35a260d71c79d7f95e518cc429e09 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864930 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Reviewed-by: Peter Marshall <petermarshall@chromium.org> > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Commit-Queue: Toon Verwaest <verwaest@chromium.org> > Auto-Submit: Toon Verwaest <verwaest@chromium.org> > Cr-Commit-Position: refs/heads/master@{#64314} TBR=ulan@chromium.org,neis@chromium.org,petermarshall@chromium.org,ishell@chromium.org,verwaest@chromium.org,mslekova@chromium.org,victorgomes@google.com Change-Id: I4f9edc62ea6f9f5857619ff0ad1a63cab4b33cc3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:9860 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864937 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#64316}
350 lines
12 KiB
Plaintext
350 lines
12 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
module: yes
|
|
top level: yes
|
|
top level await: yes
|
|
|
|
---
|
|
snippet: "
|
|
await 42;
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 142
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
B(LdaConstant), U8(2),
|
|
B(Star), R(3),
|
|
B(Mov), R(arg0), R(2),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(2),
|
|
B(PushContext), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(Mov), R(this), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(3), U8(2),
|
|
B(Star), R(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(3),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
|
B(Ldar), R(3),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(3),
|
|
/* 10 S> */ B(Return),
|
|
B(Mov), R(3), R(1),
|
|
B(Ldar), R(1),
|
|
B(Mov), R(context), R(3),
|
|
/* 0 S> */ B(LdaSmi), I8(42),
|
|
B(Star), R(5),
|
|
B(Mov), R(0), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(4), U8(2),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(4),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(4),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
B(Star), R(5),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(4), U8(3),
|
|
/* 10 S> */ B(Return),
|
|
B(Star), R(4),
|
|
B(CreateCatchContext), R(4), U8(5),
|
|
B(Star), R(3),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(3),
|
|
B(PushContext), R(4),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(6),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(5), U8(3),
|
|
/* 10 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [36],
|
|
Smi [80],
|
|
SCOPE_INFO_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
SCOPE_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
[64, 114, 114],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
await import(\"foo\");
|
|
"
|
|
frame size: 8
|
|
parameter count: 2
|
|
bytecode array length: 152
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
B(LdaConstant), U8(2),
|
|
B(Star), R(3),
|
|
B(Mov), R(arg0), R(2),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(2),
|
|
B(PushContext), R(2),
|
|
B(Mov), R(closure), R(3),
|
|
B(Mov), R(this), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(3), U8(2),
|
|
B(Star), R(0),
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(3),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
|
B(Ldar), R(3),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(3),
|
|
/* 21 S> */ B(Return),
|
|
B(Mov), R(3), R(1),
|
|
B(Ldar), R(1),
|
|
B(Mov), R(context), R(3),
|
|
/* 0 S> */ B(LdaConstant), U8(5),
|
|
B(Star), R(5),
|
|
B(Mov), R(closure), R(4),
|
|
B(CallRuntime), U16(Runtime::kDynamicImportCall), R(4), U8(2),
|
|
B(Star), R(5),
|
|
B(Mov), R(0), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(4), U8(2),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(4),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(5),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(4),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
B(Star), R(5),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(4), U8(3),
|
|
/* 21 S> */ B(Return),
|
|
B(Star), R(4),
|
|
B(CreateCatchContext), R(4), U8(6),
|
|
B(Star), R(3),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(3),
|
|
B(PushContext), R(4),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(6),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(5), U8(3),
|
|
/* 21 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [36],
|
|
Smi [90],
|
|
SCOPE_INFO_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["foo"],
|
|
SCOPE_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
[64, 124, 124],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
await 42;
|
|
async function foo() {
|
|
await 42;
|
|
}
|
|
foo();
|
|
"
|
|
frame size: 9
|
|
parameter count: 2
|
|
bytecode array length: 153
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
B(LdaConstant), U8(2),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(2),
|
|
B(PushContext), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(Mov), R(this), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
|
|
B(Star), R(0),
|
|
B(CreateClosure), U8(3), U8(0), U8(0),
|
|
B(Star), R(1),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(Ldar), R(0),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(4),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 54 S> */ B(Return),
|
|
B(Mov), R(4), R(2),
|
|
B(Ldar), R(2),
|
|
B(Mov), R(context), R(4),
|
|
/* 0 S> */ B(LdaSmi), I8(42),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(5), U8(2),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(6),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(5),
|
|
B(ReThrow),
|
|
/* 47 S> */ B(CallUndefinedReceiver0), R(1), U8(0),
|
|
B(LdaUndefined),
|
|
B(Star), R(6),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(5), U8(3),
|
|
/* 54 S> */ B(Return),
|
|
B(Star), R(5),
|
|
B(CreateCatchContext), R(5), U8(6),
|
|
B(Star), R(4),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(4),
|
|
B(PushContext), R(5),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(7),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(6), U8(3),
|
|
/* 54 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [44],
|
|
Smi [88],
|
|
SCOPE_INFO_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
SCOPE_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
[72, 125, 125],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
import * as foo from \"bar\";
|
|
await import(\"goo\");
|
|
"
|
|
frame size: 9
|
|
parameter count: 2
|
|
bytecode array length: 164
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
B(LdaConstant), U8(2),
|
|
B(Star), R(4),
|
|
B(Mov), R(arg0), R(3),
|
|
B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(2),
|
|
B(PushContext), R(3),
|
|
B(Mov), R(closure), R(4),
|
|
B(Mov), R(this), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
|
|
B(Star), R(0),
|
|
B(LdaZero),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(4), U8(1),
|
|
B(Star), R(1),
|
|
/* 0 E> */ B(StackCheck),
|
|
B(Ldar), R(0),
|
|
/* 0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(4),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 0 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 49 S> */ B(Return),
|
|
B(Mov), R(4), R(2),
|
|
B(Ldar), R(2),
|
|
B(Mov), R(context), R(4),
|
|
/* 28 S> */ B(LdaConstant), U8(5),
|
|
B(Star), R(6),
|
|
B(Mov), R(closure), R(5),
|
|
B(CallRuntime), U16(Runtime::kDynamicImportCall), R(5), U8(2),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(5), U8(2),
|
|
/* 28 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(6),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(5),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
B(Star), R(6),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(5), U8(3),
|
|
/* 49 S> */ B(Return),
|
|
B(Star), R(5),
|
|
B(CreateCatchContext), R(5), U8(6),
|
|
B(Star), R(4),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(4),
|
|
B(PushContext), R(5),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(7),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(6), U8(3),
|
|
/* 49 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [48],
|
|
Smi [102],
|
|
SCOPE_INFO_TYPE,
|
|
Smi [10],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["goo"],
|
|
SCOPE_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
[76, 136, 136],
|
|
]
|
|
|