Move generator-close on exception from the generator function to the GeneratorResume builtin.
The change also moves creation of the iterator result from the parser to the bytecode generator. Unfortunately, async generators will stay on the old scheme (try-finally around generator body) because I am not exactly sure how they work. Review-Url: https://codereview.chromium.org/2917263002 Cr-Commit-Position: refs/heads/master@{#45713}
This commit is contained in:
parent
e5e55c61c7
commit
7fa77063cf
@ -2541,6 +2541,10 @@ class Suspend final : public Expression {
|
||||
return suspend_id() > 0 && (flags() & SuspendFlags::kAsyncGeneratorAwait) ==
|
||||
SuspendFlags::kAsyncGenerator;
|
||||
}
|
||||
inline bool IsNonInitialGeneratorYield() const {
|
||||
// Return true if is_generator() && !is_await() && yield_id() > 0
|
||||
return suspend_id() > 0 && (flags() == SuspendFlags::kGeneratorYield);
|
||||
}
|
||||
|
||||
void set_expression(Expression* e) { expression_ = e; }
|
||||
void set_suspend_id(int id) { suspend_id_ = id; }
|
||||
|
@ -1049,7 +1049,11 @@ namespace internal {
|
||||
|
||||
#define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseHandleReject)
|
||||
|
||||
#define BUILTIN_EXCEPTION_UNCAUGHT_PREDICTION_LIST(V) V(MapConstructor)
|
||||
#define BUILTIN_EXCEPTION_UNCAUGHT_PREDICTION_LIST(V) \
|
||||
V(MapConstructor) \
|
||||
V(GeneratorPrototypeNext) \
|
||||
V(GeneratorPrototypeReturn) \
|
||||
V(GeneratorPrototypeThrow)
|
||||
|
||||
#define IGNORE_BUILTIN(...)
|
||||
|
||||
|
@ -47,12 +47,32 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
|
||||
GotoIf(SmiLessThan(receiver_continuation, closed), &if_receiverisrunning);
|
||||
|
||||
// Resume the {receiver} using our trampoline.
|
||||
VARIABLE(var_exception, MachineRepresentation::kTagged, UndefinedConstant());
|
||||
Label if_exception(this, Label::kDeferred), if_final_return(this);
|
||||
Node* result =
|
||||
CallStub(CodeFactory::ResumeGenerator(isolate()), context, value,
|
||||
receiver, SmiConstant(resume_mode),
|
||||
SmiConstant(static_cast<int>(SuspendFlags::kGeneratorYield)));
|
||||
// Make sure we close the generator if there was an exception.
|
||||
GotoIfException(result, &if_exception, &var_exception);
|
||||
|
||||
// If the generator is not suspended (i.e., it's state is 'closed'),
|
||||
// wrap the return value in IteratorResult.
|
||||
Node* result_continuation =
|
||||
LoadObjectField(receiver, JSGeneratorObject::kContinuationOffset);
|
||||
GotoIf(SmiEqual(result_continuation, closed), &if_final_return);
|
||||
Return(result);
|
||||
|
||||
Callable create_iter_result_object =
|
||||
CodeFactory::CreateIterResultObject(isolate());
|
||||
|
||||
BIND(&if_final_return);
|
||||
{
|
||||
// Return the wrapped result.
|
||||
Return(
|
||||
CallStub(create_iter_result_object, context, result, TrueConstant()));
|
||||
}
|
||||
|
||||
BIND(&if_receiverisincompatible);
|
||||
{
|
||||
// The {receiver} is not a valid JSGeneratorObject.
|
||||
@ -65,9 +85,6 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
|
||||
|
||||
BIND(&if_receiverisclosed);
|
||||
{
|
||||
Callable create_iter_result_object =
|
||||
CodeFactory::CreateIterResultObject(isolate());
|
||||
|
||||
// The {receiver} is closed already.
|
||||
Node* result = nullptr;
|
||||
switch (resume_mode) {
|
||||
@ -91,6 +108,14 @@ void GeneratorBuiltinsAssembler::GeneratorPrototypeResume(
|
||||
CallRuntime(Runtime::kThrowGeneratorRunning, context);
|
||||
Unreachable();
|
||||
}
|
||||
|
||||
BIND(&if_exception);
|
||||
{
|
||||
StoreObjectFieldNoWriteBarrier(
|
||||
receiver, JSGeneratorObject::kContinuationOffset, closed);
|
||||
CallRuntime(Runtime::kReThrow, context, var_exception.value());
|
||||
Unreachable();
|
||||
}
|
||||
}
|
||||
|
||||
// ES6 #sec-generator.prototype.next
|
||||
|
@ -981,13 +981,16 @@ void BytecodeGenerator::BuildGeneratorPrologue() {
|
||||
|
||||
// This is a resume call. Restore the current context and the registers,
|
||||
// then perform state dispatch.
|
||||
Register generator_context = register_allocator()->NewRegister();
|
||||
builder()
|
||||
->CallRuntime(Runtime::kInlineGeneratorGetContext, generator_object_)
|
||||
.PushContext(generator_context)
|
||||
.RestoreGeneratorState(generator_object_)
|
||||
.StoreAccumulatorInRegister(generator_state_)
|
||||
.SwitchOnSmiNoFeedback(generator_jump_table_);
|
||||
{
|
||||
RegisterAllocationScope register_scope(this);
|
||||
Register generator_context = register_allocator()->NewRegister();
|
||||
builder()
|
||||
->CallRuntime(Runtime::kInlineGeneratorGetContext, generator_object_)
|
||||
.PushContext(generator_context)
|
||||
.RestoreGeneratorState(generator_object_)
|
||||
.StoreAccumulatorInRegister(generator_state_)
|
||||
.SwitchOnSmiNoFeedback(generator_jump_table_);
|
||||
}
|
||||
// We fall through when the generator state is not in the jump table.
|
||||
// TODO(leszeks): Only generate this for debug builds.
|
||||
BuildAbort(BailoutReason::kInvalidJumpTableIndex);
|
||||
@ -2183,6 +2186,15 @@ void BytecodeGenerator::BuildReturn() {
|
||||
if (info()->literal()->feedback_vector_spec()->HasTypeProfileSlot()) {
|
||||
builder()->CollectTypeProfile(info()->literal()->return_position());
|
||||
}
|
||||
if (IsGeneratorFunction(info()->literal()->kind())) {
|
||||
// Mark the generator as closed if returning from a generator function.
|
||||
RegisterAllocationScope register_scope(this);
|
||||
Register result = register_allocator()->NewRegister();
|
||||
builder()
|
||||
->StoreAccumulatorInRegister(result)
|
||||
.CallRuntime(Runtime::kInlineGeneratorClose, generator_object_)
|
||||
.LoadAccumulatorWithRegister(result);
|
||||
}
|
||||
builder()->Return();
|
||||
}
|
||||
|
||||
@ -2533,7 +2545,15 @@ void BytecodeGenerator::BuildGeneratorSuspend(Suspend* expr,
|
||||
->LoadLiteral(Smi::FromInt(expr->suspend_id()))
|
||||
.SuspendGenerator(generator_object_, registers_to_save, expr->flags());
|
||||
|
||||
if (expr->IsNonInitialAsyncGeneratorYield()) {
|
||||
if (expr->IsNonInitialGeneratorYield()) {
|
||||
// GeneratorYield: Wrap the value into IteratorResult.
|
||||
RegisterList args = register_allocator()->NewRegisterList(2);
|
||||
builder()
|
||||
->MoveRegister(value, args[0])
|
||||
.LoadFalse()
|
||||
.StoreAccumulatorInRegister(args[1])
|
||||
.CallRuntime(Runtime::kInlineCreateIterResultObject, args);
|
||||
} else if (expr->IsNonInitialAsyncGeneratorYield()) {
|
||||
// AsyncGenerator yields (with the exception of the initial yield) delegate
|
||||
// to AsyncGeneratorResolve(), implemented via the runtime call below.
|
||||
RegisterList args = register_allocator()->NewRegisterList(3);
|
||||
@ -2606,17 +2626,11 @@ void BytecodeGenerator::BuildGeneratorResume(
|
||||
{
|
||||
// Resume with return.
|
||||
builder()->Bind(jump_table, JSGeneratorObject::kReturn);
|
||||
builder()->LoadAccumulatorWithRegister(input);
|
||||
if (expr->is_async_generator()) {
|
||||
// Async generator methods will produce the iter result object.
|
||||
builder()->LoadAccumulatorWithRegister(input);
|
||||
execution_control()->AsyncReturnAccumulator();
|
||||
} else {
|
||||
RegisterList args = register_allocator()->NewRegisterList(2);
|
||||
builder()
|
||||
->MoveRegister(input, args[0])
|
||||
.LoadTrue()
|
||||
.StoreAccumulatorInRegister(args[1])
|
||||
.CallRuntime(Runtime::kInlineCreateIterResultObject, args);
|
||||
execution_control()->ReturnAccumulator();
|
||||
}
|
||||
}
|
||||
|
@ -1388,10 +1388,6 @@ class ParserBase {
|
||||
// Convenience method which determines the type of return statement to emit
|
||||
// depending on the current function type.
|
||||
inline StatementT BuildReturnStatement(ExpressionT expr, int pos) {
|
||||
if (is_generator() && !is_async_generator()) {
|
||||
expr = impl()->BuildIteratorResult(expr, true);
|
||||
}
|
||||
|
||||
if (is_async_function()) {
|
||||
return factory()->NewAsyncReturnStatement(expr, pos);
|
||||
}
|
||||
@ -2999,12 +2995,6 @@ typename ParserBase<Impl>::ExpressionT ParserBase<Impl>::ParseYieldExpression(
|
||||
return impl()->RewriteYieldStar(expression, pos);
|
||||
}
|
||||
|
||||
if (!is_async_generator()) {
|
||||
// Async generator yield is rewritten in Ignition, and doesn't require
|
||||
// producing an Iterator Result.
|
||||
expression = impl()->BuildIteratorResult(expression, false);
|
||||
}
|
||||
|
||||
// Hackily disambiguate o from o.next and o [Symbol.iterator]().
|
||||
// TODO(verwaest): Come up with a better solution.
|
||||
ExpressionT yield = BuildSuspend(expression, pos, Suspend::kOnExceptionThrow,
|
||||
@ -4091,7 +4081,9 @@ void ParserBase<Impl>::ParseFunctionBody(
|
||||
{
|
||||
BlockState block_state(&scope_, inner_scope);
|
||||
|
||||
if (IsGeneratorFunction(kind)) {
|
||||
if (IsAsyncGeneratorFunction(kind)) {
|
||||
impl()->ParseAndRewriteAsyncGeneratorFunctionBody(pos, kind, body, ok);
|
||||
} else if (IsGeneratorFunction(kind)) {
|
||||
impl()->ParseAndRewriteGeneratorFunctionBody(pos, kind, body, ok);
|
||||
} else if (IsAsyncFunction(kind)) {
|
||||
const bool accept_IN = true;
|
||||
|
@ -352,19 +352,6 @@ Expression* Parser::BuildUnaryExpression(Expression* expression,
|
||||
return factory()->NewUnaryOperation(op, expression, pos);
|
||||
}
|
||||
|
||||
Expression* Parser::BuildIteratorResult(Expression* value, bool done) {
|
||||
int pos = kNoSourcePosition;
|
||||
|
||||
if (value == nullptr) value = factory()->NewUndefinedLiteral(pos);
|
||||
|
||||
auto args = new (zone()) ZoneList<Expression*>(2, zone());
|
||||
args->Add(value, zone());
|
||||
args->Add(factory()->NewBooleanLiteral(done, pos), zone());
|
||||
|
||||
return factory()->NewCallRuntime(Runtime::kInlineCreateIterResultObject, args,
|
||||
pos);
|
||||
}
|
||||
|
||||
Expression* Parser::NewThrowError(Runtime::FunctionId id,
|
||||
MessageTemplate::Template message,
|
||||
const AstRawString* arg, int pos) {
|
||||
@ -1778,11 +1765,15 @@ Statement* Parser::RewriteTryStatement(Block* try_block, Block* catch_block,
|
||||
void Parser::ParseAndRewriteGeneratorFunctionBody(int pos, FunctionKind kind,
|
||||
ZoneList<Statement*>* body,
|
||||
bool* ok) {
|
||||
// For ES6 Generators, we produce:
|
||||
//
|
||||
// try { InitialYield; ...body...; return {value: undefined, done: true} }
|
||||
// finally { %_GeneratorClose(generator) }
|
||||
//
|
||||
// For ES6 Generators, we just prepend the initial yield.
|
||||
Expression* initial_yield = BuildInitialYield(pos, kind);
|
||||
body->Add(factory()->NewExpressionStatement(initial_yield, kNoSourcePosition),
|
||||
zone());
|
||||
ParseStatementList(body, Token::RBRACE, ok);
|
||||
}
|
||||
|
||||
void Parser::ParseAndRewriteAsyncGeneratorFunctionBody(
|
||||
int pos, FunctionKind kind, ZoneList<Statement*>* body, bool* ok) {
|
||||
// For ES2017 Async Generators, we produce:
|
||||
//
|
||||
// try {
|
||||
@ -1803,6 +1794,7 @@ void Parser::ParseAndRewriteGeneratorFunctionBody(int pos, FunctionKind kind,
|
||||
// - BytecodeGenerator performs special handling for ReturnStatements in
|
||||
// async generator functions, resolving the appropriate Promise with an
|
||||
// "done" iterator result object containing a Promise-unwrapped value.
|
||||
DCHECK(IsAsyncGeneratorFunction(kind));
|
||||
|
||||
Block* try_block = factory()->NewBlock(nullptr, 3, false, kNoSourcePosition);
|
||||
Expression* initial_yield = BuildInitialYield(pos, kind);
|
||||
@ -1812,49 +1804,45 @@ void Parser::ParseAndRewriteGeneratorFunctionBody(int pos, FunctionKind kind,
|
||||
ParseStatementList(try_block->statements(), Token::RBRACE, ok);
|
||||
if (!*ok) return;
|
||||
|
||||
if (IsAsyncGeneratorFunction(kind)) {
|
||||
// Don't create iterator result for async generators, as the resume methods
|
||||
// will create it.
|
||||
Statement* final_return = BuildReturnStatement(
|
||||
factory()->NewUndefinedLiteral(kNoSourcePosition), kNoSourcePosition);
|
||||
try_block->statements()->Add(final_return, zone());
|
||||
// Don't create iterator result for async generators, as the resume methods
|
||||
// will create it.
|
||||
Statement* final_return = BuildReturnStatement(
|
||||
factory()->NewUndefinedLiteral(kNoSourcePosition), kNoSourcePosition);
|
||||
try_block->statements()->Add(final_return, zone());
|
||||
|
||||
// For AsyncGenerators, a top-level catch block will reject the Promise.
|
||||
Scope* catch_scope = NewHiddenCatchScopeWithParent(scope());
|
||||
// For AsyncGenerators, a top-level catch block will reject the Promise.
|
||||
Scope* catch_scope = NewHiddenCatchScopeWithParent(scope());
|
||||
|
||||
ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(2, zone());
|
||||
args->Add(factory()->NewVariableProxy(
|
||||
function_state_->generator_object_variable()),
|
||||
zone());
|
||||
args->Add(factory()->NewVariableProxy(catch_scope->catch_variable()),
|
||||
zone());
|
||||
ZoneList<Expression*>* reject_args =
|
||||
new (zone()) ZoneList<Expression*>(2, zone());
|
||||
reject_args->Add(
|
||||
factory()->NewVariableProxy(function_state_->generator_object_variable()),
|
||||
zone());
|
||||
reject_args->Add(factory()->NewVariableProxy(catch_scope->catch_variable()),
|
||||
zone());
|
||||
|
||||
Expression* call = factory()->NewCallRuntime(
|
||||
Runtime::kInlineAsyncGeneratorReject, args, kNoSourcePosition);
|
||||
Block* catch_block = IgnoreCompletion(
|
||||
factory()->NewReturnStatement(call, kNoSourcePosition));
|
||||
Expression* reject_call = factory()->NewCallRuntime(
|
||||
Runtime::kInlineAsyncGeneratorReject, reject_args, kNoSourcePosition);
|
||||
Block* catch_block = IgnoreCompletion(
|
||||
factory()->NewReturnStatement(reject_call, kNoSourcePosition));
|
||||
|
||||
TryStatement* try_catch = factory()->NewTryCatchStatementForAsyncAwait(
|
||||
try_block, catch_scope, catch_block, kNoSourcePosition);
|
||||
TryStatement* try_catch = factory()->NewTryCatchStatementForAsyncAwait(
|
||||
try_block, catch_scope, catch_block, kNoSourcePosition);
|
||||
|
||||
try_block = factory()->NewBlock(nullptr, 1, false, kNoSourcePosition);
|
||||
try_block->statements()->Add(try_catch, zone());
|
||||
} else {
|
||||
Statement* final_return = factory()->NewReturnStatement(
|
||||
BuildIteratorResult(nullptr, true), kNoSourcePosition);
|
||||
try_block->statements()->Add(final_return, zone());
|
||||
}
|
||||
try_block = factory()->NewBlock(nullptr, 1, false, kNoSourcePosition);
|
||||
try_block->statements()->Add(try_catch, zone());
|
||||
|
||||
Block* finally_block =
|
||||
factory()->NewBlock(nullptr, 1, false, kNoSourcePosition);
|
||||
ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(1, zone());
|
||||
ZoneList<Expression*>* close_args =
|
||||
new (zone()) ZoneList<Expression*>(1, zone());
|
||||
VariableProxy* call_proxy =
|
||||
factory()->NewVariableProxy(function_state_->generator_object_variable());
|
||||
args->Add(call_proxy, zone());
|
||||
Expression* call = factory()->NewCallRuntime(Runtime::kInlineGeneratorClose,
|
||||
args, kNoSourcePosition);
|
||||
close_args->Add(call_proxy, zone());
|
||||
Expression* close_call = factory()->NewCallRuntime(
|
||||
Runtime::kInlineGeneratorClose, close_args, kNoSourcePosition);
|
||||
finally_block->statements()->Add(
|
||||
factory()->NewExpressionStatement(call, kNoSourcePosition), zone());
|
||||
factory()->NewExpressionStatement(close_call, kNoSourcePosition), zone());
|
||||
|
||||
body->Add(factory()->NewTryFinallyStatement(try_block, finally_block,
|
||||
kNoSourcePosition),
|
||||
|
@ -352,6 +352,9 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
|
||||
void ParseAndRewriteGeneratorFunctionBody(int pos, FunctionKind kind,
|
||||
ZoneList<Statement*>* body,
|
||||
bool* ok);
|
||||
void ParseAndRewriteAsyncGeneratorFunctionBody(int pos, FunctionKind kind,
|
||||
ZoneList<Statement*>* body,
|
||||
bool* ok);
|
||||
void CreateFunctionNameAssignment(const AstRawString* function_name, int pos,
|
||||
FunctionLiteral::FunctionType function_type,
|
||||
DeclarationScope* function_scope,
|
||||
@ -874,8 +877,6 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
|
||||
Expression* BuildUnaryExpression(Expression* expression, Token::Value op,
|
||||
int pos);
|
||||
|
||||
Expression* BuildIteratorResult(Expression* value, bool done);
|
||||
|
||||
// Generate AST node that throws a ReferenceError with the given type.
|
||||
V8_INLINE Expression* NewThrowReferenceError(
|
||||
MessageTemplate::Template message, int pos) {
|
||||
|
@ -1076,6 +1076,10 @@ class PreParser : public ParserBase<PreParser> {
|
||||
int pos, FunctionKind kind, PreParserStatementList body, bool* ok) {
|
||||
ParseStatementList(body, Token::RBRACE, ok);
|
||||
}
|
||||
V8_INLINE void ParseAndRewriteAsyncGeneratorFunctionBody(
|
||||
int pos, FunctionKind kind, PreParserStatementList body, bool* ok) {
|
||||
ParseStatementList(body, Token::RBRACE, ok);
|
||||
}
|
||||
V8_INLINE void CreateFunctionNameAssignment(
|
||||
PreParserIdentifier function_name, int pos,
|
||||
FunctionLiteral::FunctionType function_type,
|
||||
@ -1289,11 +1293,6 @@ class PreParser : public ParserBase<PreParser> {
|
||||
return PreParserExpression::Default();
|
||||
}
|
||||
|
||||
V8_INLINE PreParserExpression BuildIteratorResult(PreParserExpression value,
|
||||
bool done) {
|
||||
return PreParserExpression::Default();
|
||||
}
|
||||
|
||||
V8_INLINE PreParserStatement
|
||||
BuildInitializationBlock(DeclarationParsingResult* parsing_result,
|
||||
ZoneList<const AstRawString*>* names, bool* ok) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -641,9 +641,9 @@ snippet: "
|
||||
}
|
||||
f([1, 2, 3]);
|
||||
"
|
||||
frame size: 24
|
||||
frame size: 20
|
||||
parameter count: 2
|
||||
bytecode array length: 434
|
||||
bytecode array length: 370
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(11),
|
||||
B(Ldar), R(new_target),
|
||||
@ -654,58 +654,52 @@ bytecodes: [
|
||||
B(Star), R(12),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(14),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(14), U8(1),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(12),
|
||||
B(CreateFunctionContext), U8(1),
|
||||
B(PushContext), R(14),
|
||||
B(PushContext), R(13),
|
||||
B(Ldar), R(arg0),
|
||||
B(StaCurrentContextSlot), U8(4),
|
||||
B(Mov), R(closure), R(15),
|
||||
B(Mov), R(this), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(15), U8(2),
|
||||
B(Mov), R(closure), R(14),
|
||||
B(Mov), R(this), R(15),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(14), U8(2),
|
||||
B(Star), R(3),
|
||||
/* 11 E> */ B(StackCheck),
|
||||
B(Star), R(11),
|
||||
B(Mov), R(context), R(17),
|
||||
B(LdaZero),
|
||||
B(Mov), R(3), R(18),
|
||||
/* 11 E> */ B(SuspendGenerator), R(11), R(0), U8(18), U8(0),
|
||||
B(Ldar), R(18),
|
||||
B(Mov), R(3), R(11),
|
||||
B(Mov), R(3), R(14),
|
||||
/* 11 E> */ B(SuspendGenerator), R(11), R(0), U8(14), U8(0),
|
||||
B(Ldar), R(14),
|
||||
/* 55 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(11), R(0), U8(18),
|
||||
B(RestoreGeneratorRegisters), R(11), R(0), U8(14),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(11), U8(1),
|
||||
B(Star), R(18),
|
||||
B(Star), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(11), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
||||
B(Ldar), R(18),
|
||||
B(Ldar), R(14),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(20),
|
||||
B(Mov), R(18), R(19),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(19), U8(2),
|
||||
B(Star), R(16),
|
||||
B(LdaZero),
|
||||
B(Star), R(15),
|
||||
B(JumpConstant), U8(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(11), U8(1),
|
||||
B(Ldar), R(14),
|
||||
/* 55 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
B(Star), R(7),
|
||||
B(Mov), R(context), R(20),
|
||||
B(Mov), R(context), R(21),
|
||||
B(Mov), R(context), R(16),
|
||||
B(Mov), R(context), R(17),
|
||||
/* 35 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(22),
|
||||
B(LdaNamedProperty), R(22), U8(3), U8(3),
|
||||
B(Star), R(23),
|
||||
B(CallProperty0), R(23), R(22), U8(5),
|
||||
B(Star), R(18),
|
||||
B(LdaNamedProperty), R(18), U8(3), U8(3),
|
||||
B(Star), R(19),
|
||||
B(CallProperty0), R(19), R(18), U8(5),
|
||||
B(JumpIfJSReceiver), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
||||
B(Star), R(5),
|
||||
/* 30 S> */ B(LdaNamedProperty), R(5), U8(4), U8(9),
|
||||
B(Star), R(22),
|
||||
B(CallProperty0), R(22), R(5), U8(7),
|
||||
B(Star), R(18),
|
||||
B(CallProperty0), R(18), R(5), U8(7),
|
||||
B(Star), R(6),
|
||||
/* 30 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
|
||||
B(ToBooleanLogicalNot),
|
||||
@ -725,29 +719,29 @@ bytecodes: [
|
||||
B(Star), R(7),
|
||||
B(JumpLoop), U8(53), I8(0),
|
||||
B(Jump), U8(36),
|
||||
B(Star), R(22),
|
||||
B(Star), R(18),
|
||||
B(Ldar), R(closure),
|
||||
/* 50 E> */ B(CreateCatchContext), R(22), U8(7), U8(8),
|
||||
B(PushContext), R(22),
|
||||
B(Star), R(21),
|
||||
/* 50 E> */ B(CreateCatchContext), R(18), U8(7), U8(8),
|
||||
B(PushContext), R(18),
|
||||
B(Star), R(17),
|
||||
B(LdaSmi), I8(2),
|
||||
B(TestEqualStrict), R(7), U8(15),
|
||||
B(JumpIfFalse), U8(6),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(7),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(23),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(23), U8(1),
|
||||
B(PopContext), R(22),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(18),
|
||||
B(Jump), U8(7),
|
||||
B(Star), R(19),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(19), U8(1),
|
||||
B(PopContext), R(18),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(14),
|
||||
B(Jump), U8(7),
|
||||
B(Star), R(15),
|
||||
B(LdaZero),
|
||||
B(Star), R(18),
|
||||
B(Star), R(14),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(20),
|
||||
B(Star), R(16),
|
||||
B(LdaZero),
|
||||
B(TestEqualStrict), R(7), U8(16),
|
||||
B(JumpIfTrue), U8(104),
|
||||
@ -764,77 +758,50 @@ bytecodes: [
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(18),
|
||||
B(Wide), B(LdaSmi), I16(130),
|
||||
B(Star), R(21),
|
||||
B(Star), R(17),
|
||||
B(LdaConstant), U8(10),
|
||||
B(Star), R(22),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(21), U8(2),
|
||||
B(Star), R(18),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(17), U8(2),
|
||||
B(Throw),
|
||||
B(Mov), R(context), R(21),
|
||||
B(Mov), R(9), R(22),
|
||||
B(Mov), R(5), R(23),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(22), U8(2),
|
||||
B(Mov), R(context), R(17),
|
||||
B(Mov), R(9), R(18),
|
||||
B(Mov), R(5), R(19),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(18), U8(2),
|
||||
B(Jump), U8(20),
|
||||
B(Star), R(22),
|
||||
B(Star), R(18),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(22), U8(7), U8(11),
|
||||
B(Star), R(21),
|
||||
B(CreateCatchContext), R(18), U8(7), U8(11),
|
||||
B(Star), R(17),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(21),
|
||||
B(PushContext), R(22),
|
||||
B(PopContext), R(22),
|
||||
B(Ldar), R(17),
|
||||
B(PushContext), R(18),
|
||||
B(PopContext), R(18),
|
||||
B(Jump), U8(27),
|
||||
B(Mov), R(9), R(21),
|
||||
B(Mov), R(5), R(22),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
|
||||
B(Mov), R(9), R(17),
|
||||
B(Mov), R(5), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
|
||||
B(Star), R(10),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
||||
B(Ldar), R(20),
|
||||
B(Ldar), R(16),
|
||||
B(SetPendingMessage),
|
||||
B(LdaZero),
|
||||
B(TestEqualStrictNoFeedback), R(18),
|
||||
B(JumpIfFalse), U8(11),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(15),
|
||||
B(Mov), R(19), R(16),
|
||||
B(Jump), U8(31),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(18),
|
||||
B(LdaTrue),
|
||||
B(Star), R(19),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(18), U8(2),
|
||||
B(Star), R(16),
|
||||
B(LdaZero),
|
||||
B(Star), R(15),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(15),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(16),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(15),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(3), U8(1),
|
||||
B(Ldar), R(17),
|
||||
B(SetPendingMessage),
|
||||
B(TestEqualStrictNoFeedback), R(14),
|
||||
B(JumpIfFalse), U8(5),
|
||||
B(Ldar), R(15),
|
||||
B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(16),
|
||||
/* 55 S> */ B(Return),
|
||||
B(Ldar), R(16),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(11), U8(1),
|
||||
B(Ldar), R(14),
|
||||
/* 55 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [55],
|
||||
Smi [24],
|
||||
Smi [53],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
SYMBOL_TYPE,
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
@ -845,15 +812,11 @@ constant pool: [
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
||||
FIXED_ARRAY_TYPE,
|
||||
Smi [295],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[60, 395, 401],
|
||||
[120, 238, 244],
|
||||
[123, 202, 204],
|
||||
[304, 314, 316],
|
||||
[108, 226, 232],
|
||||
[111, 190, 192],
|
||||
[292, 302, 304],
|
||||
]
|
||||
|
||||
---
|
||||
@ -863,9 +826,9 @@ snippet: "
|
||||
}
|
||||
f([1, 2, 3]);
|
||||
"
|
||||
frame size: 24
|
||||
frame size: 20
|
||||
parameter count: 2
|
||||
bytecode array length: 528
|
||||
bytecode array length: 453
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(10),
|
||||
B(Ldar), R(new_target),
|
||||
@ -876,52 +839,46 @@ bytecodes: [
|
||||
B(Star), R(11),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
|
||||
B(Star), R(12),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(11),
|
||||
B(CreateFunctionContext), U8(1),
|
||||
B(PushContext), R(13),
|
||||
B(PushContext), R(12),
|
||||
B(Ldar), R(arg0),
|
||||
B(StaCurrentContextSlot), U8(4),
|
||||
B(Mov), R(closure), R(14),
|
||||
B(Mov), R(this), R(15),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(14), U8(2),
|
||||
B(Mov), R(closure), R(13),
|
||||
B(Mov), R(this), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
|
||||
B(Star), R(2),
|
||||
/* 11 E> */ B(StackCheck),
|
||||
B(Star), R(10),
|
||||
B(Mov), R(context), R(16),
|
||||
B(LdaZero),
|
||||
B(Mov), R(2), R(17),
|
||||
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(17), U8(0),
|
||||
B(Ldar), R(17),
|
||||
B(Mov), R(2), R(10),
|
||||
B(Mov), R(2), R(13),
|
||||
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(13), U8(0),
|
||||
B(Ldar), R(13),
|
||||
/* 49 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(17),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(13),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
|
||||
B(Star), R(17),
|
||||
B(Star), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(17),
|
||||
B(Ldar), R(13),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(19),
|
||||
B(Mov), R(17), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(18), U8(2),
|
||||
B(Star), R(15),
|
||||
B(LdaZero),
|
||||
B(Star), R(14),
|
||||
B(JumpConstant), U8(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(13),
|
||||
/* 49 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
B(Star), R(6),
|
||||
B(Mov), R(context), R(19),
|
||||
B(Mov), R(context), R(20),
|
||||
B(Mov), R(context), R(15),
|
||||
B(Mov), R(context), R(16),
|
||||
/* 35 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(21),
|
||||
B(LdaNamedProperty), R(21), U8(4), U8(3),
|
||||
B(Star), R(22),
|
||||
B(CallProperty0), R(22), R(21), U8(5),
|
||||
B(Star), R(17),
|
||||
B(LdaNamedProperty), R(17), U8(4), U8(3),
|
||||
B(Star), R(18),
|
||||
B(CallProperty0), R(18), R(17), U8(5),
|
||||
B(JumpIfJSReceiver), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
||||
B(Star), R(4),
|
||||
@ -931,18 +888,18 @@ bytecodes: [
|
||||
/* 35 E> */ B(TestEqualStrictNoFeedback), R(11),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(21),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(21), U8(1),
|
||||
B(Star), R(17),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(17), U8(1),
|
||||
/* 30 S> */ B(LdaNamedProperty), R(4), U8(6), U8(9),
|
||||
B(Star), R(21),
|
||||
B(CallProperty0), R(21), R(4), U8(7),
|
||||
B(Star), R(17),
|
||||
B(CallProperty0), R(17), R(4), U8(7),
|
||||
B(Star), R(5),
|
||||
/* 30 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
|
||||
B(ToBooleanLogicalNot),
|
||||
B(JumpIfFalse), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
|
||||
B(LdaNamedProperty), R(5), U8(7), U8(11),
|
||||
B(JumpIfToBooleanTrue), U8(89),
|
||||
B(JumpIfToBooleanTrue), U8(79),
|
||||
B(LdaNamedProperty), R(5), U8(8), U8(13),
|
||||
B(Star), R(7),
|
||||
B(LdaSmi), I8(2),
|
||||
@ -950,59 +907,54 @@ bytecodes: [
|
||||
B(Mov), R(7), R(3),
|
||||
/* 21 E> */ B(StackCheck),
|
||||
B(Mov), R(3), R(0),
|
||||
/* 40 S> */ B(LdaFalse),
|
||||
B(Star), R(22),
|
||||
B(Mov), R(0), R(21),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(21), U8(2),
|
||||
B(Star), R(21),
|
||||
B(LdaSmi), I8(1),
|
||||
B(SuspendGenerator), R(10), R(0), U8(21), U8(0),
|
||||
B(Ldar), R(21),
|
||||
/* 40 S> */ B(LdaSmi), I8(1),
|
||||
B(Mov), R(0), R(17),
|
||||
B(SuspendGenerator), R(10), R(0), U8(17), U8(0),
|
||||
B(LdaFalse),
|
||||
B(Star), R(19),
|
||||
B(Mov), R(17), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(18), U8(2),
|
||||
/* 49 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(21),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(17),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
|
||||
B(Star), R(21),
|
||||
B(Star), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
|
||||
B(Ldar), R(21),
|
||||
B(Ldar), R(17),
|
||||
/* 40 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(23),
|
||||
B(Mov), R(21), R(22),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(22), U8(2),
|
||||
B(Star), R(18),
|
||||
B(LdaZero),
|
||||
B(Star), R(17),
|
||||
B(Star), R(13),
|
||||
B(Mov), R(17), R(14),
|
||||
B(Jump), U8(56),
|
||||
B(LdaZero),
|
||||
B(Star), R(6),
|
||||
B(JumpLoop), U8(135), I8(0),
|
||||
B(JumpLoop), U8(125), I8(0),
|
||||
B(Jump), U8(36),
|
||||
B(Star), R(21),
|
||||
B(Star), R(17),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(21), U8(11), U8(12),
|
||||
B(PushContext), R(21),
|
||||
B(Star), R(20),
|
||||
B(CreateCatchContext), R(17), U8(11), U8(12),
|
||||
B(PushContext), R(17),
|
||||
B(Star), R(16),
|
||||
B(LdaSmi), I8(2),
|
||||
B(TestEqualStrict), R(6), U8(15),
|
||||
B(JumpIfFalse), U8(6),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(6),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(22),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(22), U8(1),
|
||||
B(PopContext), R(21),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(17),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(18),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(18), U8(1),
|
||||
B(PopContext), R(17),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(13),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(14),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(17),
|
||||
B(Star), R(13),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(19),
|
||||
B(Star), R(15),
|
||||
B(LdaZero),
|
||||
B(TestEqualStrict), R(6), U8(16),
|
||||
B(JumpIfTrue), U8(104),
|
||||
@ -1019,89 +971,61 @@ bytecodes: [
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(18),
|
||||
B(Wide), B(LdaSmi), I16(130),
|
||||
B(Star), R(20),
|
||||
B(Star), R(16),
|
||||
B(LdaConstant), U8(14),
|
||||
B(Star), R(21),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(20), U8(2),
|
||||
B(Star), R(17),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(16), U8(2),
|
||||
B(Throw),
|
||||
B(Mov), R(context), R(20),
|
||||
B(Mov), R(8), R(21),
|
||||
B(Mov), R(4), R(22),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
|
||||
B(Mov), R(context), R(16),
|
||||
B(Mov), R(8), R(17),
|
||||
B(Mov), R(4), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
|
||||
B(Jump), U8(20),
|
||||
B(Star), R(21),
|
||||
B(Star), R(17),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(21), U8(11), U8(15),
|
||||
B(Star), R(20),
|
||||
B(CreateCatchContext), R(17), U8(11), U8(15),
|
||||
B(Star), R(16),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(20),
|
||||
B(PushContext), R(21),
|
||||
B(PopContext), R(21),
|
||||
B(Ldar), R(16),
|
||||
B(PushContext), R(17),
|
||||
B(PopContext), R(17),
|
||||
B(Jump), U8(27),
|
||||
B(Mov), R(8), R(20),
|
||||
B(Mov), R(4), R(21),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
|
||||
B(Mov), R(8), R(16),
|
||||
B(Mov), R(4), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
|
||||
B(Star), R(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
|
||||
B(Ldar), R(19),
|
||||
B(Ldar), R(15),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(17),
|
||||
B(Ldar), R(13),
|
||||
B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
|
||||
B(Jump), U8(19),
|
||||
B(LdaZero),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(18), R(15),
|
||||
B(Jump), U8(40),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(18), R(15),
|
||||
B(Jump), U8(31),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(17),
|
||||
B(LdaTrue),
|
||||
B(Star), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
|
||||
B(Star), R(15),
|
||||
B(LdaZero),
|
||||
B(Star), R(14),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(14),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(15),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(14),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
|
||||
B(Ldar), R(16),
|
||||
B(SetPendingMessage),
|
||||
B(Jump), U8(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(14),
|
||||
B(SwitchOnSmiNoFeedback), U8(19), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(15),
|
||||
/* 49 S> */ B(Return),
|
||||
B(Ldar), R(15),
|
||||
B(Ldar), R(14),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(13),
|
||||
/* 49 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [55],
|
||||
Smi [129],
|
||||
Smi [24],
|
||||
Smi [53],
|
||||
Smi [117],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
SYMBOL_TYPE,
|
||||
Smi [88],
|
||||
Smi [87],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
||||
Smi [24],
|
||||
Smi [15],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
||||
FIXED_ARRAY_TYPE,
|
||||
@ -1109,16 +1033,12 @@ constant pool: [
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
||||
FIXED_ARRAY_TYPE,
|
||||
Smi [6],
|
||||
Smi [14],
|
||||
Smi [389],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
Smi [13],
|
||||
]
|
||||
handlers: [
|
||||
[60, 489, 495],
|
||||
[120, 320, 326],
|
||||
[123, 284, 286],
|
||||
[387, 397, 399],
|
||||
[108, 298, 304],
|
||||
[111, 262, 264],
|
||||
[365, 375, 377],
|
||||
]
|
||||
|
||||
---
|
||||
@ -1340,9 +1260,9 @@ snippet: "
|
||||
}
|
||||
f([1, 2, 3]);
|
||||
"
|
||||
frame size: 27
|
||||
frame size: 26
|
||||
parameter count: 2
|
||||
bytecode array length: 546
|
||||
bytecode array length: 537
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(11),
|
||||
B(Ldar), R(new_target),
|
||||
@ -1353,35 +1273,35 @@ bytecodes: [
|
||||
B(Star), R(12),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(14),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(14), U8(1),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(12),
|
||||
B(CreateFunctionContext), U8(1),
|
||||
B(PushContext), R(14),
|
||||
B(PushContext), R(13),
|
||||
B(Ldar), R(arg0),
|
||||
B(StaCurrentContextSlot), U8(4),
|
||||
B(Mov), R(closure), R(15),
|
||||
B(Mov), R(this), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(15), U8(2),
|
||||
B(Mov), R(closure), R(14),
|
||||
B(Mov), R(this), R(15),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(14), U8(2),
|
||||
B(Star), R(2),
|
||||
/* 16 E> */ B(StackCheck),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(15),
|
||||
B(CallJSRuntime), U8(%async_function_promise_create), R(15), U8(1),
|
||||
B(Star), R(14),
|
||||
B(CallJSRuntime), U8(%async_function_promise_create), R(14), U8(1),
|
||||
B(Star), R(3),
|
||||
B(Mov), R(context), R(17),
|
||||
B(Mov), R(context), R(16),
|
||||
B(Mov), R(2), R(11),
|
||||
B(Mov), R(context), R(18),
|
||||
B(Mov), R(context), R(17),
|
||||
B(LdaZero),
|
||||
B(Star), R(7),
|
||||
B(Mov), R(context), R(20),
|
||||
B(Mov), R(context), R(21),
|
||||
B(Mov), R(context), R(22),
|
||||
/* 40 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(22),
|
||||
B(LdaNamedProperty), R(22), U8(1), U8(3),
|
||||
B(Star), R(23),
|
||||
B(LdaNamedProperty), R(23), U8(1), U8(3),
|
||||
B(Star), R(24),
|
||||
B(CallProperty0), R(24), R(23), U8(5),
|
||||
B(CallProperty0), R(23), R(22), U8(5),
|
||||
B(JumpIfJSReceiver), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
||||
B(Star), R(5),
|
||||
@ -1391,18 +1311,18 @@ bytecodes: [
|
||||
/* 40 E> */ B(TestEqualStrictNoFeedback), R(12),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(23),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(23), U8(1),
|
||||
B(Star), R(22),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(22), U8(1),
|
||||
/* 35 S> */ B(LdaNamedProperty), R(5), U8(3), U8(9),
|
||||
B(Star), R(23),
|
||||
B(CallProperty0), R(23), R(5), U8(7),
|
||||
B(Star), R(22),
|
||||
B(CallProperty0), R(22), R(5), U8(7),
|
||||
B(Star), R(6),
|
||||
/* 35 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
|
||||
B(ToBooleanLogicalNot),
|
||||
B(JumpIfFalse), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
|
||||
B(LdaNamedProperty), R(6), U8(4), U8(11),
|
||||
B(JumpIfToBooleanTrue), U8(95),
|
||||
B(JumpIfToBooleanTrue), U8(86),
|
||||
B(LdaNamedProperty), R(6), U8(5), U8(13),
|
||||
B(Star), R(8),
|
||||
B(LdaSmi), I8(2),
|
||||
@ -1411,63 +1331,59 @@ bytecodes: [
|
||||
/* 26 E> */ B(StackCheck),
|
||||
B(Mov), R(4), R(0),
|
||||
/* 45 S> */ B(LdaUndefined),
|
||||
B(Star), R(23),
|
||||
B(Mov), R(2), R(24),
|
||||
B(Mov), R(4), R(25),
|
||||
B(Mov), R(3), R(26),
|
||||
/* 51 E> */ B(CallJSRuntime), U8(%async_function_await_uncaught), R(23), U8(4),
|
||||
B(Star), R(22),
|
||||
B(Mov), R(2), R(23),
|
||||
B(Mov), R(4), R(24),
|
||||
B(Mov), R(3), R(25),
|
||||
/* 51 E> */ B(CallJSRuntime), U8(%async_function_await_uncaught), R(22), U8(4),
|
||||
B(LdaZero),
|
||||
B(Mov), R(3), R(23),
|
||||
B(SuspendGenerator), R(11), R(0), U8(23), U8(2),
|
||||
B(Ldar), R(23),
|
||||
B(Mov), R(3), R(22),
|
||||
B(SuspendGenerator), R(11), R(0), U8(22), U8(2),
|
||||
B(Ldar), R(22),
|
||||
/* 54 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(11), R(0), U8(23),
|
||||
B(RestoreGeneratorRegisters), R(11), R(0), U8(22),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(11), U8(1),
|
||||
B(Star), R(23),
|
||||
B(Star), R(22),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(11), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(0),
|
||||
B(Ldar), R(23),
|
||||
B(Ldar), R(22),
|
||||
/* 45 E> */ B(ReThrow),
|
||||
B(LdaTrue),
|
||||
B(Star), R(25),
|
||||
B(Mov), R(23), R(24),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(24), U8(2),
|
||||
B(Star), R(20),
|
||||
B(LdaZero),
|
||||
B(Star), R(19),
|
||||
B(Star), R(18),
|
||||
B(Mov), R(22), R(19),
|
||||
B(Jump), U8(60),
|
||||
B(LdaZero),
|
||||
B(Star), R(7),
|
||||
B(JumpLoop), U8(141), I8(0),
|
||||
B(JumpLoop), U8(132), I8(0),
|
||||
B(Jump), U8(40),
|
||||
B(Star), R(23),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(23), U8(8), U8(9),
|
||||
B(Star), R(22),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(22), U8(8), U8(9),
|
||||
B(Star), R(21),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(22),
|
||||
B(PushContext), R(23),
|
||||
B(Ldar), R(21),
|
||||
B(PushContext), R(22),
|
||||
B(LdaSmi), I8(2),
|
||||
B(TestEqualStrict), R(7), U8(15),
|
||||
B(JumpIfFalse), U8(6),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(7),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(24),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(24), U8(1),
|
||||
B(PopContext), R(23),
|
||||
B(Star), R(23),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(23), U8(1),
|
||||
B(PopContext), R(22),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(19),
|
||||
B(Star), R(18),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(20),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(19),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(18),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(21),
|
||||
B(Star), R(20),
|
||||
B(LdaZero),
|
||||
B(TestEqualStrict), R(7), U8(16),
|
||||
B(JumpIfTrue), U8(104),
|
||||
@ -1484,98 +1400,98 @@ bytecodes: [
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(18),
|
||||
B(Wide), B(LdaSmi), I16(130),
|
||||
B(Star), R(22),
|
||||
B(Star), R(21),
|
||||
B(LdaConstant), U8(11),
|
||||
B(Star), R(23),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(22), U8(2),
|
||||
B(Throw),
|
||||
B(Mov), R(context), R(22),
|
||||
B(Mov), R(9), R(23),
|
||||
B(Mov), R(5), R(24),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(23), U8(2),
|
||||
B(Jump), U8(20),
|
||||
B(Star), R(23),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(23), U8(8), U8(12),
|
||||
B(Star), R(22),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(22),
|
||||
B(PushContext), R(23),
|
||||
B(PopContext), R(23),
|
||||
B(Jump), U8(27),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(21), U8(2),
|
||||
B(Throw),
|
||||
B(Mov), R(context), R(21),
|
||||
B(Mov), R(9), R(22),
|
||||
B(Mov), R(5), R(23),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(22), U8(2),
|
||||
B(Jump), U8(20),
|
||||
B(Star), R(22),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(22), U8(8), U8(12),
|
||||
B(Star), R(21),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(21),
|
||||
B(PushContext), R(22),
|
||||
B(PopContext), R(22),
|
||||
B(Jump), U8(27),
|
||||
B(Mov), R(9), R(21),
|
||||
B(Mov), R(5), R(22),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
|
||||
B(Star), R(10),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
||||
B(Ldar), R(21),
|
||||
B(Ldar), R(20),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(19),
|
||||
B(Ldar), R(18),
|
||||
B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(0),
|
||||
B(Jump), U8(13),
|
||||
B(LdaZero),
|
||||
B(Star), R(15),
|
||||
B(Mov), R(20), R(16),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(19), R(15),
|
||||
B(Jump), U8(83),
|
||||
B(Ldar), R(20),
|
||||
B(Ldar), R(19),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(19),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(21),
|
||||
B(Mov), R(3), R(20),
|
||||
B(CallJSRuntime), U8(%promise_resolve), R(19), U8(3),
|
||||
B(LdaZero),
|
||||
B(Star), R(15),
|
||||
B(Mov), R(3), R(16),
|
||||
B(Jump), U8(59),
|
||||
B(Jump), U8(45),
|
||||
B(Star), R(19),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(19), U8(8), U8(15),
|
||||
B(Star), R(18),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(18),
|
||||
B(PushContext), R(19),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(20),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(22),
|
||||
B(LdaFalse),
|
||||
B(Star), R(23),
|
||||
B(Mov), R(3), R(21),
|
||||
B(CallJSRuntime), U8(%promise_internal_reject), R(20), U8(4),
|
||||
B(PopContext), R(19),
|
||||
B(Mov), R(3), R(19),
|
||||
B(CallJSRuntime), U8(%promise_resolve), R(18), U8(3),
|
||||
B(LdaZero),
|
||||
B(Star), R(15),
|
||||
B(Mov), R(3), R(16),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(15),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(16),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(15),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(3), R(15),
|
||||
B(Jump), U8(59),
|
||||
B(Jump), U8(45),
|
||||
B(Star), R(18),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(18), U8(8), U8(15),
|
||||
B(Star), R(17),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(17),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(18),
|
||||
B(Mov), R(3), R(19),
|
||||
B(CallJSRuntime), U8(%async_function_promise_release), R(18), U8(2),
|
||||
B(Ldar), R(17),
|
||||
B(PushContext), R(18),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(19),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(21),
|
||||
B(LdaFalse),
|
||||
B(Star), R(22),
|
||||
B(Mov), R(3), R(20),
|
||||
B(CallJSRuntime), U8(%promise_internal_reject), R(19), U8(4),
|
||||
B(PopContext), R(18),
|
||||
B(LdaZero),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(3), R(15),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(14),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(15),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(14),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(15),
|
||||
B(Star), R(16),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(17),
|
||||
B(Mov), R(3), R(18),
|
||||
B(CallJSRuntime), U8(%async_function_promise_release), R(17), U8(2),
|
||||
B(Ldar), R(16),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(14),
|
||||
B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(16),
|
||||
B(Ldar), R(15),
|
||||
/* 54 S> */ B(Return),
|
||||
B(Ldar), R(16),
|
||||
B(Ldar), R(15),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
/* 54 S> */ B(Return),
|
||||
@ -1587,7 +1503,7 @@ constant pool: [
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
||||
Smi [24],
|
||||
Smi [15],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
||||
FIXED_ARRAY_TYPE,
|
||||
@ -1601,10 +1517,10 @@ constant pool: [
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[70, 501, 507],
|
||||
[73, 456, 458],
|
||||
[79, 289, 295],
|
||||
[82, 249, 251],
|
||||
[356, 366, 368],
|
||||
[70, 492, 498],
|
||||
[73, 447, 449],
|
||||
[79, 280, 286],
|
||||
[82, 240, 242],
|
||||
[347, 357, 359],
|
||||
]
|
||||
|
||||
|
@ -11,9 +11,9 @@ snippet: "
|
||||
function* f() { }
|
||||
f();
|
||||
"
|
||||
frame size: 10
|
||||
frame size: 5
|
||||
parameter count: 1
|
||||
bytecode array length: 162
|
||||
bytecode array length: 104
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(1),
|
||||
B(Ldar), R(new_target),
|
||||
@ -24,79 +24,45 @@ bytecodes: [
|
||||
B(Star), R(2),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(4),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
|
||||
B(Star), R(3),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
B(Mov), R(this), R(5),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
|
||||
B(Mov), R(closure), R(3),
|
||||
B(Mov), R(this), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
|
||||
B(Star), R(0),
|
||||
/* 11 E> */ B(StackCheck),
|
||||
B(Star), R(1),
|
||||
B(Mov), R(context), R(6),
|
||||
B(LdaZero),
|
||||
B(Mov), R(0), R(7),
|
||||
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(7), U8(0),
|
||||
B(Ldar), R(7),
|
||||
B(Mov), R(0), R(1),
|
||||
B(Mov), R(0), R(3),
|
||||
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
|
||||
B(Ldar), R(3),
|
||||
/* 16 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(1), R(0), U8(7),
|
||||
B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(2),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
|
||||
B(Star), R(7),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
||||
B(Ldar), R(7),
|
||||
B(Ldar), R(3),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(9),
|
||||
B(Mov), R(7), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
|
||||
B(Star), R(5),
|
||||
B(LdaZero),
|
||||
B(Star), R(4),
|
||||
B(Jump), U8(31),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(7),
|
||||
B(LdaTrue),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
||||
B(Star), R(5),
|
||||
B(LdaZero),
|
||||
B(Star), R(4),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(4),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(5),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(4),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(6),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
||||
B(Ldar), R(6),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(4),
|
||||
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(5),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 16 S> */ B(Return),
|
||||
B(Ldar), R(5),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 16 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [47],
|
||||
Smi [24],
|
||||
Smi [45],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[52, 123, 129],
|
||||
]
|
||||
|
||||
---
|
||||
@ -104,9 +70,9 @@ snippet: "
|
||||
function* f() { yield 42 }
|
||||
f();
|
||||
"
|
||||
frame size: 10
|
||||
frame size: 6
|
||||
parameter count: 1
|
||||
bytecode array length: 227
|
||||
bytecode array length: 158
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(1),
|
||||
B(Ldar), R(new_target),
|
||||
@ -117,109 +83,69 @@ bytecodes: [
|
||||
B(Star), R(2),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(4),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
|
||||
B(Star), R(3),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(2),
|
||||
B(Mov), R(closure), R(4),
|
||||
B(Mov), R(this), R(5),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
|
||||
B(Mov), R(closure), R(3),
|
||||
B(Mov), R(this), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
|
||||
B(Star), R(0),
|
||||
/* 11 E> */ B(StackCheck),
|
||||
B(Star), R(1),
|
||||
B(Mov), R(context), R(6),
|
||||
B(LdaZero),
|
||||
B(Mov), R(0), R(7),
|
||||
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(7), U8(0),
|
||||
B(Ldar), R(7),
|
||||
B(Mov), R(0), R(1),
|
||||
B(Mov), R(0), R(3),
|
||||
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
|
||||
B(Ldar), R(3),
|
||||
/* 25 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(1), R(0), U8(7),
|
||||
B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(2),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
|
||||
B(Star), R(7),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(7),
|
||||
B(Ldar), R(3),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(9),
|
||||
B(Mov), R(7), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
|
||||
B(Star), R(5),
|
||||
B(LdaZero),
|
||||
B(Star), R(4),
|
||||
B(Jump), U8(96),
|
||||
/* 16 S> */ B(LdaSmi), I8(42),
|
||||
B(Star), R(7),
|
||||
B(LdaFalse),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
||||
B(Star), R(7),
|
||||
B(LdaSmi), I8(1),
|
||||
B(SuspendGenerator), R(1), R(0), U8(7), U8(0),
|
||||
B(Ldar), R(7),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 25 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(1), R(0), U8(7),
|
||||
/* 16 S> */ B(LdaSmi), I8(42),
|
||||
B(Star), R(3),
|
||||
B(LdaSmi), I8(1),
|
||||
B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
|
||||
B(LdaFalse),
|
||||
B(Star), R(5),
|
||||
B(Mov), R(3), R(4),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
|
||||
/* 25 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(2),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
|
||||
B(Star), R(7),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
|
||||
B(Ldar), R(7),
|
||||
B(Ldar), R(3),
|
||||
/* 16 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(9),
|
||||
B(Mov), R(7), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
|
||||
B(Star), R(5),
|
||||
B(LdaZero),
|
||||
B(Star), R(4),
|
||||
B(Jump), U8(31),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(7),
|
||||
B(LdaTrue),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
|
||||
B(Star), R(5),
|
||||
B(LdaZero),
|
||||
B(Star), R(4),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(4),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(5),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(4),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(6),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
||||
B(Ldar), R(6),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(4),
|
||||
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(5),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 25 S> */ B(Return),
|
||||
B(Ldar), R(5),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(1), U8(1),
|
||||
B(Ldar), R(3),
|
||||
/* 25 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [47],
|
||||
Smi [112],
|
||||
Smi [24],
|
||||
Smi [45],
|
||||
Smi [99],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
Smi [24],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[52, 188, 194],
|
||||
]
|
||||
|
||||
---
|
||||
@ -227,9 +153,9 @@ snippet: "
|
||||
function* f() { for (let x of [42]) yield x }
|
||||
f();
|
||||
"
|
||||
frame size: 23
|
||||
frame size: 19
|
||||
parameter count: 1
|
||||
bytecode array length: 522
|
||||
bytecode array length: 447
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(10),
|
||||
B(Ldar), R(new_target),
|
||||
@ -240,48 +166,42 @@ bytecodes: [
|
||||
B(Star), R(11),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
|
||||
B(Star), R(12),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(11),
|
||||
B(Mov), R(closure), R(13),
|
||||
B(Mov), R(this), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
|
||||
B(Mov), R(closure), R(12),
|
||||
B(Mov), R(this), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
|
||||
B(Star), R(2),
|
||||
/* 11 E> */ B(StackCheck),
|
||||
B(Star), R(10),
|
||||
B(Mov), R(context), R(15),
|
||||
B(LdaZero),
|
||||
B(Mov), R(2), R(16),
|
||||
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(16), U8(0),
|
||||
B(Ldar), R(16),
|
||||
B(Mov), R(2), R(10),
|
||||
B(Mov), R(2), R(12),
|
||||
/* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(12), U8(0),
|
||||
B(Ldar), R(12),
|
||||
/* 44 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(16),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(12),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
|
||||
B(Star), R(16),
|
||||
B(Star), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(16),
|
||||
B(Ldar), R(12),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(18),
|
||||
B(Mov), R(16), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
|
||||
B(Star), R(14),
|
||||
B(LdaZero),
|
||||
B(Star), R(13),
|
||||
B(JumpConstant), U8(19),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(12),
|
||||
/* 44 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
B(Star), R(6),
|
||||
B(Mov), R(context), R(18),
|
||||
B(Mov), R(context), R(19),
|
||||
B(Mov), R(context), R(14),
|
||||
B(Mov), R(context), R(15),
|
||||
/* 30 S> */ B(CreateArrayLiteral), U8(4), U8(3), U8(17),
|
||||
B(Star), R(20),
|
||||
B(LdaNamedProperty), R(20), U8(5), U8(4),
|
||||
B(Star), R(21),
|
||||
B(CallProperty0), R(21), R(20), U8(6),
|
||||
B(Star), R(16),
|
||||
B(LdaNamedProperty), R(16), U8(5), U8(4),
|
||||
B(Star), R(17),
|
||||
B(CallProperty0), R(17), R(16), U8(6),
|
||||
B(JumpIfJSReceiver), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
||||
B(Star), R(4),
|
||||
@ -291,18 +211,18 @@ bytecodes: [
|
||||
/* 30 E> */ B(TestEqualStrictNoFeedback), R(11),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(20),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(20), U8(1),
|
||||
B(Star), R(16),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(16), U8(1),
|
||||
/* 25 S> */ B(LdaNamedProperty), R(4), U8(7), U8(10),
|
||||
B(Star), R(20),
|
||||
B(CallProperty0), R(20), R(4), U8(8),
|
||||
B(Star), R(16),
|
||||
B(CallProperty0), R(16), R(4), U8(8),
|
||||
B(Star), R(5),
|
||||
/* 25 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
|
||||
B(ToBooleanLogicalNot),
|
||||
B(JumpIfFalse), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
|
||||
B(LdaNamedProperty), R(5), U8(8), U8(12),
|
||||
B(JumpIfToBooleanTrue), U8(89),
|
||||
B(JumpIfToBooleanTrue), U8(79),
|
||||
B(LdaNamedProperty), R(5), U8(9), U8(14),
|
||||
B(Star), R(7),
|
||||
B(LdaSmi), I8(2),
|
||||
@ -310,59 +230,54 @@ bytecodes: [
|
||||
B(Mov), R(7), R(3),
|
||||
/* 16 E> */ B(StackCheck),
|
||||
B(Mov), R(3), R(0),
|
||||
/* 36 S> */ B(LdaFalse),
|
||||
B(Star), R(21),
|
||||
B(Mov), R(0), R(20),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(20), U8(2),
|
||||
B(Star), R(20),
|
||||
B(LdaSmi), I8(1),
|
||||
B(SuspendGenerator), R(10), R(0), U8(20), U8(0),
|
||||
B(Ldar), R(20),
|
||||
/* 36 S> */ B(LdaSmi), I8(1),
|
||||
B(Mov), R(0), R(16),
|
||||
B(SuspendGenerator), R(10), R(0), U8(16), U8(0),
|
||||
B(LdaFalse),
|
||||
B(Star), R(18),
|
||||
B(Mov), R(16), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
|
||||
/* 44 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(20),
|
||||
B(RestoreGeneratorRegisters), R(10), R(0), U8(16),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
|
||||
B(Star), R(20),
|
||||
B(Star), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
|
||||
B(Ldar), R(20),
|
||||
B(Ldar), R(16),
|
||||
/* 36 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(22),
|
||||
B(Mov), R(20), R(21),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(21), U8(2),
|
||||
B(Star), R(17),
|
||||
B(LdaZero),
|
||||
B(Star), R(16),
|
||||
B(Star), R(12),
|
||||
B(Mov), R(16), R(13),
|
||||
B(Jump), U8(56),
|
||||
B(LdaZero),
|
||||
B(Star), R(6),
|
||||
B(JumpLoop), U8(135), I8(0),
|
||||
B(JumpLoop), U8(125), I8(0),
|
||||
B(Jump), U8(36),
|
||||
B(Star), R(20),
|
||||
B(Star), R(16),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(20), U8(12), U8(13),
|
||||
B(PushContext), R(20),
|
||||
B(Star), R(19),
|
||||
B(CreateCatchContext), R(16), U8(12), U8(13),
|
||||
B(PushContext), R(16),
|
||||
B(Star), R(15),
|
||||
B(LdaSmi), I8(2),
|
||||
B(TestEqualStrict), R(6), U8(16),
|
||||
B(JumpIfFalse), U8(6),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(6),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(21),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(21), U8(1),
|
||||
B(PopContext), R(20),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(16),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(17),
|
||||
B(CallRuntime), U16(Runtime::kReThrow), R(17), U8(1),
|
||||
B(PopContext), R(16),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(12),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(13),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(16),
|
||||
B(Star), R(12),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(18),
|
||||
B(Star), R(14),
|
||||
B(LdaZero),
|
||||
B(TestEqualStrict), R(6), U8(17),
|
||||
B(JumpIfTrue), U8(104),
|
||||
@ -379,90 +294,62 @@ bytecodes: [
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(18),
|
||||
B(Wide), B(LdaSmi), I16(130),
|
||||
B(Star), R(19),
|
||||
B(Star), R(15),
|
||||
B(LdaConstant), U8(15),
|
||||
B(Star), R(20),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(19), U8(2),
|
||||
B(Star), R(16),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(15), U8(2),
|
||||
B(Throw),
|
||||
B(Mov), R(context), R(19),
|
||||
B(Mov), R(8), R(20),
|
||||
B(Mov), R(4), R(21),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
|
||||
B(Mov), R(context), R(15),
|
||||
B(Mov), R(8), R(16),
|
||||
B(Mov), R(4), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
|
||||
B(Jump), U8(20),
|
||||
B(Star), R(20),
|
||||
B(Star), R(16),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(20), U8(12), U8(16),
|
||||
B(Star), R(19),
|
||||
B(CreateCatchContext), R(16), U8(12), U8(16),
|
||||
B(Star), R(15),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(19),
|
||||
B(PushContext), R(20),
|
||||
B(PopContext), R(20),
|
||||
B(Ldar), R(15),
|
||||
B(PushContext), R(16),
|
||||
B(PopContext), R(16),
|
||||
B(Jump), U8(27),
|
||||
B(Mov), R(8), R(19),
|
||||
B(Mov), R(4), R(20),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(19), U8(2),
|
||||
B(Mov), R(8), R(15),
|
||||
B(Mov), R(4), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
|
||||
B(Star), R(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
|
||||
B(Ldar), R(18),
|
||||
B(Ldar), R(14),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(16),
|
||||
B(Ldar), R(12),
|
||||
B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
|
||||
B(Jump), U8(19),
|
||||
B(LdaZero),
|
||||
B(Star), R(13),
|
||||
B(Mov), R(17), R(14),
|
||||
B(Jump), U8(40),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(13),
|
||||
B(Mov), R(17), R(14),
|
||||
B(Jump), U8(31),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(16),
|
||||
B(LdaTrue),
|
||||
B(Star), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
|
||||
B(Star), R(14),
|
||||
B(LdaZero),
|
||||
B(Star), R(13),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(13),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(14),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(13),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(15),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
|
||||
B(Ldar), R(15),
|
||||
B(SetPendingMessage),
|
||||
B(Jump), U8(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(13),
|
||||
B(SwitchOnSmiNoFeedback), U8(20), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(14),
|
||||
/* 44 S> */ B(Return),
|
||||
B(Ldar), R(14),
|
||||
B(Ldar), R(13),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
|
||||
B(Ldar), R(12),
|
||||
/* 44 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [47],
|
||||
Smi [123],
|
||||
Smi [24],
|
||||
Smi [45],
|
||||
Smi [111],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
TUPLE2_TYPE,
|
||||
SYMBOL_TYPE,
|
||||
Smi [88],
|
||||
Smi [87],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
||||
Smi [24],
|
||||
Smi [15],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
||||
FIXED_ARRAY_TYPE,
|
||||
@ -470,16 +357,12 @@ constant pool: [
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
||||
FIXED_ARRAY_TYPE,
|
||||
Smi [6],
|
||||
Smi [14],
|
||||
Smi [391],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
Smi [13],
|
||||
]
|
||||
handlers: [
|
||||
[52, 483, 489],
|
||||
[112, 314, 320],
|
||||
[115, 278, 280],
|
||||
[381, 391, 393],
|
||||
[100, 292, 298],
|
||||
[103, 256, 258],
|
||||
[359, 369, 371],
|
||||
]
|
||||
|
||||
---
|
||||
@ -488,9 +371,9 @@ snippet: "
|
||||
function* f() { yield* g() }
|
||||
f();
|
||||
"
|
||||
frame size: 19
|
||||
frame size: 15
|
||||
parameter count: 1
|
||||
bytecode array length: 575
|
||||
bytecode array length: 500
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(9),
|
||||
B(Ldar), R(new_target),
|
||||
@ -501,39 +384,33 @@ bytecodes: [
|
||||
B(Star), R(10),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(12),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
|
||||
B(Star), R(11),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(11), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(10),
|
||||
B(Mov), R(closure), R(12),
|
||||
B(Mov), R(this), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
|
||||
B(Mov), R(closure), R(11),
|
||||
B(Mov), R(this), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(11), U8(2),
|
||||
B(Star), R(0),
|
||||
/* 38 E> */ B(StackCheck),
|
||||
B(Star), R(9),
|
||||
B(Mov), R(context), R(14),
|
||||
B(LdaZero),
|
||||
B(Mov), R(0), R(15),
|
||||
/* 38 E> */ B(SuspendGenerator), R(9), R(0), U8(15), U8(0),
|
||||
B(Ldar), R(15),
|
||||
B(Mov), R(0), R(9),
|
||||
B(Mov), R(0), R(11),
|
||||
/* 38 E> */ B(SuspendGenerator), R(9), R(0), U8(11), U8(0),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(9), R(0), U8(15),
|
||||
B(RestoreGeneratorRegisters), R(9), R(0), U8(11),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(10),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
|
||||
B(Star), R(15),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(15),
|
||||
B(Ldar), R(11),
|
||||
/* 38 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(17),
|
||||
B(Mov), R(15), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
|
||||
B(Star), R(13),
|
||||
B(LdaZero),
|
||||
B(Star), R(12),
|
||||
B(JumpConstant), U8(15),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
/* 43 S> */ B(LdaUndefined),
|
||||
B(Star), R(1),
|
||||
B(LdaZero),
|
||||
@ -541,12 +418,12 @@ bytecodes: [
|
||||
B(LdaUndefined),
|
||||
B(Star), R(3),
|
||||
B(LdaGlobal), U8(4), U8(5),
|
||||
B(Star), R(17),
|
||||
/* 50 E> */ B(CallUndefinedReceiver0), R(17), U8(3),
|
||||
B(Star), R(15),
|
||||
B(LdaNamedProperty), R(15), U8(5), U8(7),
|
||||
B(Star), R(16),
|
||||
B(CallProperty0), R(16), R(15), U8(9),
|
||||
B(Star), R(13),
|
||||
/* 50 E> */ B(CallUndefinedReceiver0), R(13), U8(3),
|
||||
B(Star), R(11),
|
||||
B(LdaNamedProperty), R(11), U8(5), U8(7),
|
||||
B(Star), R(12),
|
||||
B(CallProperty0), R(12), R(11), U8(9),
|
||||
B(JumpIfJSReceiver), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
||||
B(Star), R(4),
|
||||
@ -556,45 +433,40 @@ bytecodes: [
|
||||
B(TestEqualStrictNoFeedback), R(10),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(15),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(15), U8(1),
|
||||
B(Star), R(11),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(11), U8(1),
|
||||
B(StackCheck),
|
||||
B(LdaZero),
|
||||
B(TestEqualStrict), R(2), U8(15),
|
||||
B(Mov), R(2), R(15),
|
||||
B(Mov), R(2), R(11),
|
||||
B(JumpIfTrue), U8(18),
|
||||
B(LdaSmi), I8(1),
|
||||
B(TestEqualStrict), R(15), U8(19),
|
||||
B(TestEqualStrict), R(11), U8(19),
|
||||
B(JumpIfTrue), U8(39),
|
||||
B(LdaSmi), I8(2),
|
||||
B(TestEqualStrict), R(15), U8(28),
|
||||
B(JumpIfTrue), U8(88),
|
||||
B(Jump), U8(246),
|
||||
B(TestEqualStrict), R(11), U8(28),
|
||||
B(JumpIfTrue), U8(78),
|
||||
B(Jump), U8(236),
|
||||
B(LdaNamedProperty), R(4), U8(7), U8(13),
|
||||
B(Star), R(16),
|
||||
B(CallProperty1), R(16), R(4), R(1), U8(11),
|
||||
B(Star), R(12),
|
||||
B(CallProperty1), R(12), R(4), R(1), U8(11),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
|
||||
B(Jump), U8(218),
|
||||
B(Jump), U8(208),
|
||||
B(LdaNamedProperty), R(4), U8(8), U8(16),
|
||||
B(Star), R(3),
|
||||
B(TestUndetectable),
|
||||
B(JumpIfFalse), U8(19),
|
||||
B(LdaTrue),
|
||||
B(Star), R(17),
|
||||
B(Mov), R(1), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
|
||||
B(Star), R(13),
|
||||
B(LdaZero),
|
||||
B(Star), R(12),
|
||||
B(JumpConstant), U8(16),
|
||||
B(Mov), R(3), R(16),
|
||||
B(Mov), R(4), R(17),
|
||||
B(Mov), R(1), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(3),
|
||||
B(JumpIfFalse), U8(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(Ldar), R(1),
|
||||
/* 54 S> */ B(Return),
|
||||
B(Mov), R(3), R(12),
|
||||
B(Mov), R(4), R(13),
|
||||
B(Mov), R(1), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(3),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
@ -611,53 +483,53 @@ bytecodes: [
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(96),
|
||||
B(LdaZero),
|
||||
B(Star), R(16),
|
||||
B(Star), R(12),
|
||||
B(LdaSmi), I8(1),
|
||||
B(TestEqualStrict), R(16), U8(26),
|
||||
B(TestEqualStrict), R(12), U8(26),
|
||||
B(JumpIfFalse), U8(61),
|
||||
B(Ldar), R(6),
|
||||
B(TestTypeOf), U8(5),
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(18),
|
||||
B(Wide), B(LdaSmi), I16(130),
|
||||
B(Star), R(16),
|
||||
B(Star), R(12),
|
||||
B(LdaConstant), U8(10),
|
||||
B(Star), R(17),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(16), U8(2),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
|
||||
B(Throw),
|
||||
B(Mov), R(context), R(16),
|
||||
B(Mov), R(6), R(17),
|
||||
B(Mov), R(4), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
|
||||
B(Mov), R(context), R(12),
|
||||
B(Mov), R(6), R(13),
|
||||
B(Mov), R(4), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
|
||||
B(Jump), U8(20),
|
||||
B(Star), R(17),
|
||||
B(Star), R(13),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(17), U8(11), U8(12),
|
||||
B(Star), R(16),
|
||||
B(CreateCatchContext), R(13), U8(11), U8(12),
|
||||
B(Star), R(12),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(16),
|
||||
B(PushContext), R(17),
|
||||
B(PopContext), R(17),
|
||||
B(Ldar), R(12),
|
||||
B(PushContext), R(13),
|
||||
B(PopContext), R(13),
|
||||
B(Jump), U8(27),
|
||||
B(Mov), R(6), R(16),
|
||||
B(Mov), R(4), R(17),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
|
||||
B(Mov), R(6), R(12),
|
||||
B(Mov), R(4), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
|
||||
B(Star), R(7),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(7),
|
||||
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
|
||||
B(Wide), B(LdaSmi), I16(144),
|
||||
B(Star), R(16),
|
||||
B(Star), R(12),
|
||||
B(LdaConstant), U8(10),
|
||||
B(Star), R(17),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(16), U8(2),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
|
||||
B(Throw),
|
||||
B(Mov), R(5), R(16),
|
||||
B(Mov), R(4), R(17),
|
||||
B(Mov), R(1), R(18),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(3),
|
||||
B(Mov), R(5), R(12),
|
||||
B(Mov), R(4), R(13),
|
||||
B(Mov), R(1), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(3),
|
||||
B(Star), R(3),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
@ -668,11 +540,11 @@ bytecodes: [
|
||||
B(JumpIfToBooleanFalse), U8(4),
|
||||
B(Jump), U8(45),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Mov), R(3), R(15),
|
||||
B(SuspendGenerator), R(9), R(0), U8(15), U8(1),
|
||||
B(Ldar), R(15),
|
||||
B(Mov), R(3), R(11),
|
||||
B(SuspendGenerator), R(9), R(0), U8(11), U8(1),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(9), R(0), U8(15),
|
||||
B(RestoreGeneratorRegisters), R(9), R(0), U8(11),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(10),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
|
||||
@ -680,60 +552,31 @@ bytecodes: [
|
||||
B(Star), R(1),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
||||
B(Star), R(2),
|
||||
B(Wide), B(JumpLoop), U16(337), I16(0),
|
||||
B(Wide), B(JumpLoop), U16(327), I16(0),
|
||||
B(LdaSmi), I8(1),
|
||||
B(TestEqualStrict), R(2), U8(31),
|
||||
B(JumpIfFalse), U8(22),
|
||||
B(JumpIfFalse), U8(15),
|
||||
B(LdaNamedProperty), R(3), U8(14), U8(32),
|
||||
B(Star), R(15),
|
||||
B(LdaTrue),
|
||||
B(Star), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
|
||||
B(Star), R(13),
|
||||
B(LdaZero),
|
||||
B(Star), R(12),
|
||||
B(Jump), U8(37),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
B(LdaNamedProperty), R(3), U8(14), U8(34),
|
||||
B(Star), R(8),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(15),
|
||||
B(LdaTrue),
|
||||
B(Star), R(16),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
|
||||
B(Star), R(13),
|
||||
B(LdaZero),
|
||||
B(Star), R(12),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(12),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(13),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(12),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
||||
B(Ldar), R(14),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(12),
|
||||
B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(13),
|
||||
/* 54 S> */ B(Return),
|
||||
B(Ldar), R(13),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(9), U8(1),
|
||||
B(Ldar), R(11),
|
||||
/* 54 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [47],
|
||||
Smi [127],
|
||||
Smi [24],
|
||||
Smi [45],
|
||||
Smi [115],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
|
||||
SYMBOL_TYPE,
|
||||
Smi [310],
|
||||
Smi [300],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
|
||||
@ -742,13 +585,8 @@ constant pool: [
|
||||
FIXED_ARRAY_TYPE,
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
||||
Smi [444],
|
||||
Smi [305],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[52, 536, 542],
|
||||
[332, 342, 344],
|
||||
[310, 320, 322],
|
||||
]
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -271,9 +271,9 @@ snippet: "
|
||||
}
|
||||
f();
|
||||
"
|
||||
frame size: 16
|
||||
frame size: 11
|
||||
parameter count: 1
|
||||
bytecode array length: 242
|
||||
bytecode array length: 184
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(7),
|
||||
B(Ldar), R(new_target),
|
||||
@ -284,39 +284,33 @@ bytecodes: [
|
||||
B(Star), R(8),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(10),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(10), U8(1),
|
||||
B(Star), R(9),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(8),
|
||||
B(Mov), R(closure), R(10),
|
||||
B(Mov), R(this), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(10), U8(2),
|
||||
B(Mov), R(closure), R(9),
|
||||
B(Mov), R(this), R(10),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
|
||||
B(Star), R(3),
|
||||
/* 11 E> */ B(StackCheck),
|
||||
B(Star), R(7),
|
||||
B(Mov), R(context), R(12),
|
||||
B(LdaZero),
|
||||
B(Mov), R(3), R(13),
|
||||
/* 11 E> */ B(SuspendGenerator), R(7), R(0), U8(13), U8(0),
|
||||
B(Ldar), R(13),
|
||||
B(Mov), R(3), R(7),
|
||||
B(Mov), R(3), R(9),
|
||||
/* 11 E> */ B(SuspendGenerator), R(7), R(0), U8(9), U8(0),
|
||||
B(Ldar), R(9),
|
||||
/* 62 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(7), R(0), U8(13),
|
||||
B(RestoreGeneratorRegisters), R(7), R(0), U8(9),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
|
||||
B(Star), R(13),
|
||||
B(Star), R(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
|
||||
B(Ldar), R(13),
|
||||
B(Ldar), R(9),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(15),
|
||||
B(Mov), R(13), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(14), U8(2),
|
||||
B(Star), R(11),
|
||||
B(LdaZero),
|
||||
B(Star), R(10),
|
||||
B(Jump), U8(111),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
|
||||
B(Ldar), R(9),
|
||||
/* 62 S> */ B(Return),
|
||||
/* 31 S> */ B(LdaZero),
|
||||
B(Star), R(2),
|
||||
B(Star), R(4),
|
||||
@ -356,45 +350,17 @@ bytecodes: [
|
||||
B(Jump), U8(5),
|
||||
B(JumpLoop), U8(68), I8(0),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(13),
|
||||
B(LdaTrue),
|
||||
B(Star), R(14),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
|
||||
B(Star), R(11),
|
||||
B(LdaZero),
|
||||
B(Star), R(10),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(10),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(11),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(10),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(3), U8(1),
|
||||
B(Ldar), R(12),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(10),
|
||||
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(11),
|
||||
/* 62 S> */ B(Return),
|
||||
B(Ldar), R(11),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
|
||||
B(Ldar), R(9),
|
||||
/* 62 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [47],
|
||||
Smi [24],
|
||||
Smi [45],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[52, 203, 209],
|
||||
]
|
||||
|
||||
---
|
||||
@ -404,9 +370,9 @@ snippet: "
|
||||
}
|
||||
f();
|
||||
"
|
||||
frame size: 15
|
||||
frame size: 11
|
||||
parameter count: 1
|
||||
bytecode array length: 345
|
||||
bytecode array length: 276
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(6),
|
||||
B(Ldar), R(new_target),
|
||||
@ -417,39 +383,33 @@ bytecodes: [
|
||||
B(Star), R(7),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(9),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
|
||||
B(Star), R(8),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(7),
|
||||
B(Mov), R(closure), R(9),
|
||||
B(Mov), R(this), R(10),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
|
||||
B(Mov), R(closure), R(8),
|
||||
B(Mov), R(this), R(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(8), U8(2),
|
||||
B(Star), R(2),
|
||||
/* 11 E> */ B(StackCheck),
|
||||
B(Star), R(6),
|
||||
B(Mov), R(context), R(11),
|
||||
B(LdaZero),
|
||||
B(Mov), R(2), R(12),
|
||||
/* 11 E> */ B(SuspendGenerator), R(6), R(0), U8(12), U8(0),
|
||||
B(Ldar), R(12),
|
||||
B(Mov), R(2), R(6),
|
||||
B(Mov), R(2), R(8),
|
||||
/* 11 E> */ B(SuspendGenerator), R(6), R(0), U8(8), U8(0),
|
||||
B(Ldar), R(8),
|
||||
/* 56 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(6), R(0), U8(12),
|
||||
B(RestoreGeneratorRegisters), R(6), R(0), U8(8),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(7),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
|
||||
B(Star), R(12),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
||||
B(Ldar), R(12),
|
||||
B(Ldar), R(8),
|
||||
/* 11 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(12), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
|
||||
B(Star), R(10),
|
||||
B(LdaZero),
|
||||
B(Star), R(9),
|
||||
B(Jump), U8(214),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
|
||||
B(Ldar), R(8),
|
||||
/* 56 S> */ B(Return),
|
||||
/* 31 S> */ B(LdaZero),
|
||||
B(Star), R(1),
|
||||
B(Star), R(3),
|
||||
@ -461,8 +421,8 @@ bytecodes: [
|
||||
/* 54 E> */ B(TestEqualStrictNoFeedback), R(7),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(12),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
|
||||
B(Star), R(8),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
|
||||
B(StackCheck),
|
||||
B(Mov), R(3), R(0),
|
||||
B(LdaSmi), I8(1),
|
||||
@ -480,100 +440,66 @@ bytecodes: [
|
||||
/* 36 E> */ B(TestLessThan), R(0), U8(5),
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(4),
|
||||
B(Jump), U8(118),
|
||||
B(Jump), U8(107),
|
||||
B(Ldar), R(7),
|
||||
B(SwitchOnSmiNoFeedback), U8(5), U8(1), I8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(TestEqualStrictNoFeedback), R(7),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(12),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
|
||||
B(Star), R(8),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
|
||||
B(LdaSmi), I8(1),
|
||||
B(TestEqual), R(5), U8(6),
|
||||
B(JumpIfFalse), U8(78),
|
||||
B(JumpIfFalse), U8(67),
|
||||
/* 18 E> */ B(StackCheck),
|
||||
/* 47 S> */ B(LdaFalse),
|
||||
B(Star), R(13),
|
||||
B(Mov), R(0), R(12),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
|
||||
B(Star), R(12),
|
||||
B(LdaSmi), I8(1),
|
||||
B(SuspendGenerator), R(6), R(0), U8(12), U8(0),
|
||||
B(Ldar), R(12),
|
||||
/* 47 S> */ B(LdaSmi), I8(1),
|
||||
B(Mov), R(0), R(8),
|
||||
B(SuspendGenerator), R(6), R(0), U8(8), U8(0),
|
||||
B(LdaFalse),
|
||||
B(Star), R(10),
|
||||
B(Mov), R(8), R(9),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
|
||||
/* 56 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(6), R(0), U8(12),
|
||||
B(RestoreGeneratorRegisters), R(6), R(0), U8(8),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(7),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
|
||||
B(Star), R(12),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(0),
|
||||
B(Ldar), R(12),
|
||||
B(Ldar), R(8),
|
||||
/* 47 E> */ B(Throw),
|
||||
B(LdaTrue),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(12), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
|
||||
B(Star), R(10),
|
||||
B(LdaZero),
|
||||
B(Star), R(9),
|
||||
B(Jump), U8(54),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
|
||||
B(Ldar), R(8),
|
||||
/* 56 S> */ B(Return),
|
||||
B(LdaZero),
|
||||
B(Star), R(5),
|
||||
B(Mov), R(0), R(3),
|
||||
B(Ldar), R(0),
|
||||
B(JumpLoop), U8(101), I8(1),
|
||||
B(JumpLoop), U8(90), I8(1),
|
||||
B(LdaSmi), I8(1),
|
||||
/* 54 E> */ B(TestEqual), R(5), U8(7),
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(5),
|
||||
B(JumpLoop), U8(171), I8(0),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(12),
|
||||
B(LdaTrue),
|
||||
B(Star), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
|
||||
B(Star), R(10),
|
||||
B(LdaZero),
|
||||
B(Star), R(9),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(9),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(10),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(9),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
|
||||
B(Ldar), R(11),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(9),
|
||||
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(10),
|
||||
/* 56 S> */ B(Return),
|
||||
B(Ldar), R(10),
|
||||
B(ReThrow),
|
||||
B(JumpLoop), U8(160), I8(0),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
|
||||
B(Ldar), R(8),
|
||||
/* 56 S> */ B(Return),
|
||||
]
|
||||
constant pool: [
|
||||
Smi [47],
|
||||
Smi [98],
|
||||
Smi [24],
|
||||
Smi [45],
|
||||
Smi [86],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
Smi [56],
|
||||
Smi [49],
|
||||
Smi [24],
|
||||
Smi [48],
|
||||
Smi [14],
|
||||
Smi [7],
|
||||
Smi [6],
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[52, 306, 312],
|
||||
]
|
||||
|
||||
---
|
||||
@ -707,9 +633,9 @@ snippet: "
|
||||
}
|
||||
f();
|
||||
"
|
||||
frame size: 19
|
||||
frame size: 18
|
||||
parameter count: 1
|
||||
bytecode array length: 365
|
||||
bytecode array length: 356
|
||||
bytecodes: [
|
||||
B(Mov), R(new_target), R(7),
|
||||
B(Ldar), R(new_target),
|
||||
@ -720,22 +646,22 @@ bytecodes: [
|
||||
B(Star), R(8),
|
||||
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(10),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(10), U8(1),
|
||||
B(Star), R(9),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(8),
|
||||
B(Mov), R(closure), R(10),
|
||||
B(Mov), R(this), R(11),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(10), U8(2),
|
||||
B(Mov), R(closure), R(9),
|
||||
B(Mov), R(this), R(10),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
|
||||
B(Star), R(2),
|
||||
/* 16 E> */ B(StackCheck),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(10),
|
||||
B(CallJSRuntime), U8(%async_function_promise_create), R(10), U8(1),
|
||||
B(Star), R(9),
|
||||
B(CallJSRuntime), U8(%async_function_promise_create), R(9), U8(1),
|
||||
B(Star), R(3),
|
||||
B(Mov), R(context), R(12),
|
||||
B(Mov), R(context), R(11),
|
||||
B(Mov), R(2), R(7),
|
||||
B(Mov), R(context), R(13),
|
||||
B(Mov), R(context), R(12),
|
||||
/* 36 S> */ B(LdaZero),
|
||||
B(Star), R(1),
|
||||
B(Star), R(4),
|
||||
@ -747,8 +673,8 @@ bytecodes: [
|
||||
/* 59 E> */ B(TestEqualStrictNoFeedback), R(8),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(14),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(14), U8(1),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
|
||||
B(StackCheck),
|
||||
B(Mov), R(4), R(0),
|
||||
B(LdaSmi), I8(1),
|
||||
@ -766,110 +692,106 @@ bytecodes: [
|
||||
/* 41 E> */ B(TestLessThan), R(0), U8(5),
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(4),
|
||||
B(Jump), U8(124),
|
||||
B(Jump), U8(115),
|
||||
B(Ldar), R(8),
|
||||
B(SwitchOnSmiNoFeedback), U8(2), U8(1), I8(0),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(TestEqualStrictNoFeedback), R(8),
|
||||
B(JumpIfTrue), U8(11),
|
||||
B(LdaSmi), I8(79),
|
||||
B(Star), R(14),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(14), U8(1),
|
||||
B(Star), R(13),
|
||||
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
|
||||
B(LdaSmi), I8(1),
|
||||
B(TestEqual), R(6), U8(6),
|
||||
B(JumpIfFalse), U8(84),
|
||||
B(JumpIfFalse), U8(75),
|
||||
/* 23 E> */ B(StackCheck),
|
||||
/* 52 S> */ B(LdaUndefined),
|
||||
B(Star), R(14),
|
||||
B(Mov), R(2), R(15),
|
||||
B(Mov), R(0), R(16),
|
||||
B(Mov), R(3), R(17),
|
||||
/* 58 E> */ B(CallJSRuntime), U8(%async_function_await_uncaught), R(14), U8(4),
|
||||
B(Star), R(13),
|
||||
B(Mov), R(2), R(14),
|
||||
B(Mov), R(0), R(15),
|
||||
B(Mov), R(3), R(16),
|
||||
/* 58 E> */ B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
|
||||
B(LdaZero),
|
||||
B(Mov), R(3), R(14),
|
||||
B(SuspendGenerator), R(7), R(0), U8(14), U8(2),
|
||||
B(Ldar), R(14),
|
||||
B(Mov), R(3), R(13),
|
||||
B(SuspendGenerator), R(7), R(0), U8(13), U8(2),
|
||||
B(Ldar), R(13),
|
||||
/* 61 S> */ B(Return),
|
||||
B(RestoreGeneratorRegisters), R(7), R(0), U8(14),
|
||||
B(RestoreGeneratorRegisters), R(7), R(0), U8(13),
|
||||
B(LdaSmi), I8(-2),
|
||||
B(Star), R(8),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
|
||||
B(Star), R(14),
|
||||
B(Star), R(13),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
|
||||
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
||||
B(Ldar), R(14),
|
||||
B(Ldar), R(13),
|
||||
/* 52 E> */ B(ReThrow),
|
||||
B(LdaTrue),
|
||||
B(Star), R(16),
|
||||
B(Mov), R(14), R(15),
|
||||
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
|
||||
B(Star), R(11),
|
||||
B(LdaZero),
|
||||
B(Star), R(10),
|
||||
B(Star), R(9),
|
||||
B(Mov), R(13), R(10),
|
||||
B(Jump), U8(103),
|
||||
B(LdaZero),
|
||||
B(Star), R(6),
|
||||
B(Mov), R(0), R(4),
|
||||
B(Ldar), R(0),
|
||||
B(JumpLoop), U8(107), I8(1),
|
||||
B(JumpLoop), U8(98), I8(1),
|
||||
B(LdaSmi), I8(1),
|
||||
/* 59 E> */ B(TestEqual), R(6), U8(7),
|
||||
B(JumpIfFalse), U8(4),
|
||||
B(Jump), U8(5),
|
||||
B(JumpLoop), U8(177), I8(0),
|
||||
B(JumpLoop), U8(168), I8(0),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(14),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(16),
|
||||
B(Mov), R(3), R(15),
|
||||
B(CallJSRuntime), U8(%promise_resolve), R(14), U8(3),
|
||||
B(LdaZero),
|
||||
B(Star), R(10),
|
||||
B(Mov), R(3), R(11),
|
||||
B(Jump), U8(59),
|
||||
B(Jump), U8(45),
|
||||
B(Star), R(14),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(14), U8(5), U8(6),
|
||||
B(Star), R(13),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(13),
|
||||
B(PushContext), R(14),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(15),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(17),
|
||||
B(LdaFalse),
|
||||
B(Star), R(18),
|
||||
B(Mov), R(3), R(16),
|
||||
B(CallJSRuntime), U8(%promise_internal_reject), R(15), U8(4),
|
||||
B(PopContext), R(14),
|
||||
B(Mov), R(3), R(14),
|
||||
B(CallJSRuntime), U8(%promise_resolve), R(13), U8(3),
|
||||
B(LdaZero),
|
||||
B(Star), R(10),
|
||||
B(Mov), R(3), R(11),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(10),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(11),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(10),
|
||||
B(Star), R(9),
|
||||
B(Mov), R(3), R(10),
|
||||
B(Jump), U8(59),
|
||||
B(Jump), U8(45),
|
||||
B(Star), R(13),
|
||||
B(Ldar), R(closure),
|
||||
B(CreateCatchContext), R(13), U8(5), U8(6),
|
||||
B(Star), R(12),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Star), R(12),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(13),
|
||||
B(Mov), R(3), R(14),
|
||||
B(CallJSRuntime), U8(%async_function_promise_release), R(13), U8(2),
|
||||
B(Ldar), R(12),
|
||||
B(PushContext), R(13),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(14),
|
||||
B(LdaImmutableCurrentContextSlot), U8(4),
|
||||
B(Star), R(16),
|
||||
B(LdaFalse),
|
||||
B(Star), R(17),
|
||||
B(Mov), R(3), R(15),
|
||||
B(CallJSRuntime), U8(%promise_internal_reject), R(14), U8(4),
|
||||
B(PopContext), R(13),
|
||||
B(LdaZero),
|
||||
B(Star), R(9),
|
||||
B(Mov), R(3), R(10),
|
||||
B(Jump), U8(14),
|
||||
B(LdaSmi), I8(-1),
|
||||
B(Star), R(9),
|
||||
B(Jump), U8(8),
|
||||
B(Star), R(10),
|
||||
B(LdaSmi), I8(1),
|
||||
B(Star), R(9),
|
||||
B(LdaTheHole),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(10),
|
||||
B(Star), R(11),
|
||||
B(LdaUndefined),
|
||||
B(Star), R(12),
|
||||
B(Mov), R(3), R(13),
|
||||
B(CallJSRuntime), U8(%async_function_promise_release), R(12), U8(2),
|
||||
B(Ldar), R(11),
|
||||
B(SetPendingMessage),
|
||||
B(Ldar), R(9),
|
||||
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
|
||||
B(Jump), U8(8),
|
||||
B(Ldar), R(11),
|
||||
B(Ldar), R(10),
|
||||
/* 61 S> */ B(Return),
|
||||
B(Ldar), R(11),
|
||||
B(Ldar), R(10),
|
||||
B(ReThrow),
|
||||
B(LdaUndefined),
|
||||
/* 61 S> */ B(Return),
|
||||
@ -878,7 +800,7 @@ constant pool: [
|
||||
Smi [57],
|
||||
Smi [56],
|
||||
Smi [55],
|
||||
Smi [24],
|
||||
Smi [15],
|
||||
Smi [7],
|
||||
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
||||
FIXED_ARRAY_TYPE,
|
||||
@ -886,7 +808,7 @@ constant pool: [
|
||||
Smi [9],
|
||||
]
|
||||
handlers: [
|
||||
[62, 320, 326],
|
||||
[65, 275, 277],
|
||||
[62, 311, 317],
|
||||
[65, 266, 268],
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user