Commit 00a2481a authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[ignition] Move destructuring assignments to bytecode generation

Instead of de-sugaring destructuring assignment in the parser (using the
pattern rewriter), pass the Object/ArrayLiterals through to the bytecode
generator, which can desugar them in-place.

This allows us to decrease the amount of AST node creation, and improve
the generated bytecode using domain-specific knowledge. As a side effect
we partially fix an old execution ordering spec bug.

Currently only implemented for assignments, not declarations, as the
latter has some additional complexity.

Bug: v8:4951
Change-Id: I3d69d232bea2968ef20df68a74014d9e05808cfe
Reviewed-on: https://chromium-review.googlesource.com/c/1375660
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58512}
parent 74d00a9b
......@@ -1720,10 +1720,11 @@ class VariableProxy final : public Expression {
friend base::ThreadedListTraits<VariableProxy>;
};
// Left-hand side can only be a property, a global or a (parameter or local)
// slot.
enum LhsKind {
VARIABLE,
// Assignments to a property will use one of several types of property access.
// Otherwise, the assignment is to a non-property (a global, a local slot, a
// parameter slot, or a destructuring pattern).
enum AssignType {
NON_PROPERTY,
NAMED_PROPERTY,
KEYED_PROPERTY,
NAMED_SUPER_PROPERTY,
......@@ -1740,8 +1741,8 @@ class Property final : public Expression {
bool IsSuperAccess() { return obj()->IsSuperPropertyReference(); }
// Returns the properties assign type.
static LhsKind GetAssignType(Property* property) {
if (property == nullptr) return VARIABLE;
static AssignType GetAssignType(Property* property) {
if (property == nullptr) return NON_PROPERTY;
bool super_access = property->IsSuperAccess();
return (property->key()->IsPropertyName())
? (super_access ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY)
......
......@@ -1249,7 +1249,7 @@ void AstPrinter::VisitProperty(Property* node) {
IndentedScope indent(this, buf.start(), node->position());
Visit(node->obj());
LhsKind property_kind = Property::GetAssignType(node);
AssignType property_kind = Property::GetAssignType(node);
if (property_kind == NAMED_PROPERTY ||
property_kind == NAMED_SUPER_PROPERTY) {
PrintLiteralIndented("NAME", node->key()->AsLiteral(), false);
......
......@@ -407,7 +407,6 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final {
BytecodeArrayBuilder& JumpIfTrue(ToBooleanMode mode, BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfFalse(ToBooleanMode mode, BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfNotHole(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfJSReceiver(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfNotNull(BytecodeLabel* label);
......
This diff is collapsed.
......@@ -70,6 +70,79 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
enum class TestFallthrough { kThen, kElse, kNone };
enum class TypeHint { kAny, kBoolean, kString };
// An assignment has to evaluate its LHS before its RHS, but has to assign to
// the LHS after both evaluations are done. This class stores the data
// computed in the LHS evaulation that has to live across the RHS evaluation,
// and is used in the actual LHS assignment.
class AssignmentLhsData {
public:
static AssignmentLhsData NonProperty(Expression* expr);
static AssignmentLhsData NamedProperty(Expression* object_expr,
Register object,
const AstRawString* name);
static AssignmentLhsData KeyedProperty(Register object, Register key);
static AssignmentLhsData NamedSuperProperty(
RegisterList super_property_args);
static AssignmentLhsData KeyedSuperProperty(
RegisterList super_property_args);
AssignType assign_type() const { return assign_type_; }
Expression* expr() const {
DCHECK_EQ(assign_type_, NON_PROPERTY);
return expr_;
}
Expression* object_expr() const {
DCHECK_EQ(assign_type_, NAMED_PROPERTY);
return object_expr_;
}
Register object() const {
DCHECK(assign_type_ == NAMED_PROPERTY || assign_type_ == KEYED_PROPERTY);
return object_;
}
Register key() const {
DCHECK_EQ(assign_type_, KEYED_PROPERTY);
return key_;
}
const AstRawString* name() const {
DCHECK_EQ(assign_type_, NAMED_PROPERTY);
return name_;
}
RegisterList super_property_args() const {
DCHECK(assign_type_ == NAMED_SUPER_PROPERTY ||
assign_type_ == KEYED_SUPER_PROPERTY);
return super_property_args_;
}
private:
AssignmentLhsData(AssignType assign_type, Expression* expr,
RegisterList super_property_args, Register object,
Register key, Expression* object_expr,
const AstRawString* name)
: assign_type_(assign_type),
expr_(expr),
super_property_args_(super_property_args),
object_(object),
key_(key),
object_expr_(object_expr),
name_(name) {}
AssignType assign_type_;
// Different assignment types use different fields:
//
// NON_PROPERTY: expr
// NAMED_PROPERTY: object_expr, object, name
// KEYED_PROPERTY: object, key
// NAMED_SUPER_PROPERTY: super_property_args
// KEYED_SUPER_PROPERT: super_property_args
Expression* expr_;
RegisterList super_property_args_;
Register object_;
Register key_;
Expression* object_expr_;
const AstRawString* name_;
};
void GenerateBytecodeBody();
void AllocateDeferredConstants(Isolate* isolate, Handle<Script> script);
......@@ -122,9 +195,17 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void VisitPropertyLoadForRegister(Register obj, Property* expr,
Register destination);
void BuildLoadNamedProperty(Property* property, Register object,
AssignmentLhsData PrepareAssignmentLhs(Expression* lhs);
void BuildAssignment(const AssignmentLhsData& data, Token::Value op,
LookupHoistingMode lookup_hoisting_mode);
Expression* GetDestructuringDefaultValue(Expression** target);
void BuildDestructuringArrayAssignment(ArrayLiteral* pattern);
void BuildDestructuringObjectAssignment(ObjectLiteral* pattern);
void BuildLoadNamedProperty(const Expression* object_expr, Register object,
const AstRawString* name);
void BuildStoreNamedProperty(Property* property, Register object,
void BuildStoreNamedProperty(const Expression* object_expr, Register object,
const AstRawString* name);
void BuildVariableLoad(Variable* variable, HoleCheckMode hole_check_mode,
......@@ -160,19 +241,20 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void BuildAwait(Expression* await_expr);
void BuildGetIterator(Expression* iterable, IteratorType hint);
void BuildFinalizeIteration(IteratorRecord iterator, Register done,
Register iteration_continuation_token);
void BuildGetIterator(IteratorType hint);
// Create an IteratorRecord with pre-allocated registers holding the next
// method and iterator object.
IteratorRecord BuildGetIteratorRecord(Expression* iterable,
Register iterator_next,
IteratorRecord BuildGetIteratorRecord(Register iterator_next,
Register iterator_object,
IteratorType hint);
// Create an IteratorRecord allocating new registers to hold the next method
// and iterator object.
IteratorRecord BuildGetIteratorRecord(Expression* iterable,
IteratorType hint);
IteratorRecord BuildGetIteratorRecord(IteratorType hint);
void BuildIteratorNext(const IteratorRecord& iterator, Register next_result);
void BuildIteratorClose(const IteratorRecord& iterator,
Expression* expr = nullptr);
......@@ -181,9 +263,12 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
BytecodeLabel* if_called,
BytecodeLabels* if_notcalled);
void BuildArrayLiteralSpread(Spread* spread, Register array, Register index,
FeedbackSlot index_slot,
FeedbackSlot element_slot);
void BuildFillArrayWithIterator(IteratorRecord iterator, Register array,
Register index, Register value, Register done,
FeedbackSlot next_value_slot,
FeedbackSlot next_done_slot,
FeedbackSlot index_slot,
FeedbackSlot element_slot);
// Create Array literals. |expr| can be nullptr, but if provided,
// a boilerplate will be used to create an initial array for elements
// before the first spread.
......
......@@ -137,18 +137,39 @@ void Parser::DeclareAndInitializeVariables(
this, block, declaration_descriptor, declaration, names);
}
namespace {
// Lightweight visitor for the case where bytecode does the desugaring.
void MarkVariablesWritten(Expression* expr) {
if (expr->IsVariableProxy()) {
expr->AsVariableProxy()->set_is_assigned();
} else if (expr->IsObjectLiteral()) {
for (ObjectLiteralProperty* prop : *expr->AsObjectLiteral()->properties()) {
MarkVariablesWritten(prop->value());
}
} else if (expr->IsArrayLiteral()) {
for (Expression* value : *expr->AsArrayLiteral()->values()) {
MarkVariablesWritten(value);
}
} else if (expr->IsSpread()) {
MarkVariablesWritten(expr->AsSpread()->expression());
} else if (expr->IsAssignment()) {
MarkVariablesWritten(expr->AsAssignment()->target());
}
}
} // namespace
void Parser::RewriteDestructuringAssignment(RewritableExpression* to_rewrite) {
DCHECK(!to_rewrite->is_rewritten());
Assignment* assignment = to_rewrite->expression()->AsAssignment();
Expression* result =
PatternRewriter::RewriteDestructuringAssignment(this, assignment);
to_rewrite->Rewrite(result);
DCHECK_NOT_NULL(assignment);
MarkVariablesWritten(assignment->target());
}
Expression* Parser::RewriteDestructuringAssignment(Assignment* assignment) {
DCHECK_NOT_NULL(assignment);
DCHECK_EQ(Token::ASSIGN, assignment->op());
return PatternRewriter::RewriteDestructuringAssignment(this, assignment);
MarkVariablesWritten(assignment->target());
return assignment;
}
void PatternRewriter::DeclareAndInitializeVariables(
......
......@@ -143,7 +143,7 @@ snippet: "
"
frame size: 8
parameter count: 1
bytecode array length: 86
bytecode array length: 84
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
......@@ -152,28 +152,27 @@ bytecodes: [
B(Star), R(2),
B(LdaConstant), U8(2),
/* 67 S> */ B(Star), R(1),
B(LdaNamedProperty), R(0), U8(3), U8(5),
B(Star), R(7),
B(CallProperty0), R(7), R(0), U8(7),
B(Mov), R(0), R(6),
B(LdaNamedProperty), R(0), U8(3), U8(2),
B(Star), R(6),
B(CallProperty0), R(6), R(0), U8(4),
B(Mov), R(0), R(5),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(5),
B(LdaNamedProperty), R(5), U8(4), U8(9),
B(Star), R(4),
B(CallProperty0), R(4), R(5), U8(11),
B(LdaNamedProperty), R(4), U8(4), U8(6),
B(Star), R(3),
B(CallProperty0), R(3), R(4), U8(15),
B(Star), R(7),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
B(LdaNamedProperty), R(3), U8(5), U8(13),
B(JumpIfToBooleanTrue), U8(21),
B(LdaNamedProperty), R(3), U8(6), U8(15),
B(Star), R(3),
B(StaInArrayLiteral), R(2), R(1), U8(3),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
B(LdaNamedProperty), R(7), U8(5), U8(17),
B(JumpIfToBooleanTrue), U8(19),
B(LdaNamedProperty), R(7), U8(6), U8(8),
B(StaInArrayLiteral), R(2), R(1), U8(13),
B(Ldar), R(1),
B(Inc), U8(2),
B(Inc), U8(12),
B(Star), R(1),
B(JumpLoop), U8(35), I8(0),
B(JumpLoop), U8(33), I8(0),
B(Ldar), R(2),
/* 71 S> */ B(Return),
]
......
......@@ -67,7 +67,7 @@ snippet: "
"
frame size: 10
parameter count: 1
bytecode array length: 109
bytecode array length: 107
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaGlobal), U8(0), U8(0),
......@@ -78,32 +78,31 @@ bytecodes: [
B(Star), R(4),
B(LdaConstant), U8(3),
B(Star), R(3),
/* 49 S> */ B(CreateArrayLiteral), U8(4), U8(8), U8(37),
/* 49 S> */ B(CreateArrayLiteral), U8(4), U8(5), U8(37),
B(Star), R(7),
B(LdaNamedProperty), R(7), U8(5), U8(6),
B(Star), R(8),
B(LdaNamedProperty), R(8), U8(5), U8(9),
B(Star), R(9),
B(CallProperty0), R(9), R(8), U8(11),
B(CallProperty0), R(8), R(7), U8(8),
B(Mov), R(0), R(2),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(7),
B(LdaNamedProperty), R(7), U8(6), U8(13),
B(Star), R(6),
B(CallProperty0), R(6), R(7), U8(15),
B(LdaNamedProperty), R(6), U8(6), U8(10),
B(Star), R(5),
B(CallProperty0), R(5), R(6), U8(19),
B(Star), R(9),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(7), U8(17),
B(JumpIfToBooleanTrue), U8(21),
B(LdaNamedProperty), R(5), U8(8), U8(19),
B(Star), R(5),
B(StaInArrayLiteral), R(4), R(3), U8(6),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
B(LdaNamedProperty), R(9), U8(7), U8(21),
B(JumpIfToBooleanTrue), U8(19),
B(LdaNamedProperty), R(9), U8(8), U8(12),
B(StaInArrayLiteral), R(4), R(3), U8(17),
B(Ldar), R(3),
B(Inc), U8(5),
B(Inc), U8(16),
B(Star), R(3),
B(JumpLoop), U8(35), I8(0),
B(JumpLoop), U8(33), I8(0),
B(LdaSmi), I8(4),
B(StaInArrayLiteral), R(4), R(3), U8(6),
B(StaInArrayLiteral), R(4), R(3), U8(17),
B(Mov), R(4), R(3),
B(CallJSRuntime), U8(%reflect_apply), R(1), U8(3),
B(LdaUndefined),
......
......@@ -282,7 +282,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
B(LdaNamedProperty), R(6), U8(7), U8(13),
B(JumpIfToBooleanTrue), U8(27),
B(JumpIfToBooleanTrue), U8(28),
B(LdaNamedProperty), R(6), U8(8), U8(15),
B(Star), R(8),
B(LdaSmi), I8(2),
......@@ -290,10 +290,10 @@ bytecodes: [
B(Mov), R(8), R(3),
/* 23 E> */ B(StackCheck),
B(Mov), R(3), R(0),
/* 56 S> */ B(LdaZero),
/* 56 S> */ B(LdaSmi), I8(1),
B(Star), R(12),
B(Mov), R(8), R(13),
B(Jump), U8(53),
B(Jump), U8(52),
B(Jump), U8(37),
B(Star), R(16),
B(CreateCatchContext), R(16), U8(9),
......@@ -314,9 +314,9 @@ bytecodes: [
B(LdaSmi), I8(-1),
B(Star), R(13),
B(Star), R(12),
B(Jump), U8(8),
B(Jump), U8(7),
B(Star), R(13),
B(LdaSmi), I8(1),
B(LdaZero),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
......@@ -391,14 +391,14 @@ bytecodes: [
B(Ldar), R(12),
B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(0),
B(Jump), U8(19),
B(Ldar), R(13),
B(ReThrow),
B(LdaTrue),
B(Star), R(17),
B(Mov), R(2), R(15),
B(Mov), R(13), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(15), U8(3),
/* 68 S> */ B(Return),
B(Ldar), R(13),
B(ReThrow),
B(LdaUndefined),
B(Star), R(13),
B(LdaTrue),
......@@ -438,13 +438,13 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
Smi [6],
Smi [20],
Smi [9],
SCOPE_INFO_TYPE,
]
handlers: [
[20, 426, 428],
[26, 201, 209],
[29, 164, 166],
[26, 202, 210],
[29, 165, 167],
[270, 316, 318],
]
......@@ -716,7 +716,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
B(LdaNamedProperty), R(4), U8(4), U8(10),
B(JumpIfToBooleanTrue), U8(30),
B(JumpIfToBooleanTrue), U8(31),
/* 58 E> */ B(LdaNamedProperty), R(4), U8(5), U8(12),
B(Star), R(6),
B(LdaSmi), I8(2),
......@@ -726,9 +726,9 @@ bytecodes: [
/* 53 E> */ B(StackCheck),
/* 87 S> */ B(LdaNamedProperty), R(1), U8(6), U8(16),
B(Star), R(11),
B(LdaZero),
B(LdaSmi), I8(1),
B(Star), R(10),
B(Jump), U8(53),
B(Jump), U8(52),
B(Jump), U8(37),
B(Star), R(14),
B(CreateCatchContext), R(14), U8(7),
......@@ -749,9 +749,9 @@ bytecodes: [
B(LdaSmi), I8(-1),
B(Star), R(11),
B(Star), R(10),
B(Jump), U8(8),
B(Jump), U8(7),
B(Star), R(11),
B(LdaSmi), I8(1),
B(LdaZero),
B(Star), R(10),
B(LdaTheHole),
B(SetPendingMessage),
......@@ -799,14 +799,14 @@ bytecodes: [
B(Ldar), R(10),
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
B(Jump), U8(19),
B(Ldar), R(11),
B(ReThrow),
B(LdaFalse),
B(Star), R(15),
B(Mov), R(0), R(13),
B(Mov), R(11), R(14),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(13), U8(3),
/* 96 S> */ B(Return),
B(Ldar), R(11),
B(ReThrow),
B(LdaUndefined),
B(Star), R(11),
B(LdaFalse),
......@@ -844,13 +844,13 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
Smi [6],
Smi [20],
Smi [9],
SCOPE_INFO_TYPE,
]
handlers: [
[16, 305, 307],
[28, 151, 159],
[31, 114, 116],
[28, 152, 160],
[31, 115, 117],
[220, 230, 232],
]
......@@ -166,7 +166,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(3), U8(8),
B(JumpIfToBooleanTrue), U8(27),
B(JumpIfToBooleanTrue), U8(28),
B(LdaNamedProperty), R(5), U8(4), U8(10),
B(Star), R(7),
B(LdaSmi), I8(2),
......@@ -174,10 +174,10 @@ bytecodes: [
B(Mov), R(7), R(1),
/* 54 E> */ B(StackCheck),
B(Mov), R(1), R(2),
/* 73 S> */ B(LdaZero),
/* 73 S> */ B(LdaSmi), I8(1),
B(Star), R(10),
B(Mov), R(7), R(11),
B(Jump), U8(49),
B(Jump), U8(48),
B(Jump), U8(33),
B(Star), R(14),
B(CreateCatchContext), R(14), U8(5),
......@@ -195,9 +195,9 @@ bytecodes: [
B(LdaSmi), I8(-1),
B(Star), R(11),
B(Star), R(10),
B(Jump), U8(8),
B(Jump), U8(7),
B(Star), R(11),
B(LdaSmi), I8(1),
B(LdaZero),
B(Star), R(10),
B(LdaTheHole),
B(SetPendingMessage),
......@@ -246,9 +246,9 @@ bytecodes: [
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(11),
/* 85 S> */ B(Return),
B(Ldar), R(11),
B(ReThrow),
B(Ldar), R(11),
/* 85 S> */ B(Return),
B(LdaUndefined),
/* 85 S> */ B(Return),
]
......@@ -265,8 +265,8 @@ constant pool: [
Smi [9],
]
handlers: [
[11, 124, 132],
[14, 91, 93],
[11, 125, 133],
[14, 92, 94],
[193, 203, 205],
]
......@@ -443,7 +443,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
B(LdaNamedProperty), R(3), U8(4), U8(10),
B(JumpIfToBooleanTrue), U8(30),
B(JumpIfToBooleanTrue), U8(31),
/* 67 E> */ B(LdaNamedProperty), R(3), U8(5), U8(12),
B(Star), R(5),
B(LdaSmi), I8(2),
......@@ -453,9 +453,9 @@ bytecodes: [
/* 62 E> */ B(StackCheck),
/* 96 S> */ B(LdaNamedProperty), R(0), U8(6), U8(16),
B(Star), R(9),
B(LdaZero),
B(LdaSmi), I8(1),
B(Star), R(8),
B(Jump), U8(49),
B(Jump), U8(48),
B(Jump), U8(33),
B(Star), R(12),
B(CreateCatchContext), R(12), U8(7),
......@@ -473,9 +473,9 @@ bytecodes: [
B(LdaSmi), I8(-1),
B(Star), R(9),
B(Star), R(8),
B(Jump), U8(8),
B(Jump), U8(7),
B(Star), R(9),
B(LdaSmi), I8(1),
B(LdaZero),
B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
......@@ -524,9 +524,9 @@ bytecodes: [
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(9),
/* 105 S> */ B(Return),
B(Ldar), R(9),
B(ReThrow),
B(Ldar), R(9),
/* 105 S> */ B(Return),
B(LdaUndefined),
/* 105 S> */ B(Return),
]
......@@ -545,8 +545,8 @@ constant pool: [
Smi [9],
]
handlers: [
[13, 132, 140],
[16, 99, 101],
[13, 133, 141],
[16, 100, 102],
[201, 211, 213],
]
......@@ -794,7 +794,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
B(LdaNamedProperty), R(6), U8(6), U8(8),
B(JumpIfToBooleanTrue), U8(65),
B(JumpIfToBooleanTrue), U8(66),
B(LdaNamedProperty), R(6), U8(7), U8(10),
B(Star), R(8),
B(LdaSmi), I8(2),
......@@ -813,13 +813,13 @@ bytecodes: [
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
B(Ldar), R(15),
/* 40 E> */ B(Throw),
B(LdaZero),
B(LdaSmi), I8(1),
B(Star), R(11),
B(Mov), R(15), R(12),
B(Jump), U8(55),
B(Jump), U8(54),
B(LdaZero),
B(Star), R(7),
B(JumpLoop), U8(84), I8(0),
B(JumpLoop), U8(85), I8(0),
B(Jump), U8(33),
B(Star), R(15),
B(CreateCatchContext), R(15), U8(10),
......@@ -837,9 +837,9 @@ bytecodes: [
B(LdaSmi), I8(-1),
B(Star), R(12),
B(Star), R(11),
B(Jump), U8(8),
B(Jump), U8(7),
B(Star), R(12),
B(LdaSmi), I8(1),
B(LdaZero),
B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
......@@ -888,9 +888,9 @@ bytecodes: [
B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(12),
/* 49 S> */ B(Return),
B(Ldar), R(12),
B(ReThrow),
B(Ldar), R(12),
/* 49 S> */ B(Return),
B(LdaUndefined),
/* 49 S> */ B(Return),
]
......@@ -903,7 +903,7 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
Smi [15],
Smi [16],
Smi [7],
SCOPE_INFO_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
......@@ -912,8 +912,8 @@ constant pool: [
Smi [9],
]
handlers: [
[48, 199, 207],
[51, 166, 168],
[48, 200, 208],
[51, 167, 169],
[268, 278, 280],
]
......
......@@ -138,7 +138,7 @@ bytecodes: [
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
B(LdaNamedProperty), R(6), U8(7), U8(9),
B(JumpIfToBooleanTrue), U8(65),
B(JumpIfToBooleanTrue), U8(66),
B(LdaNamedProperty), R(6), U8(8), U8(11),
B(Star), R(8),
B(LdaSmi), I8(2),
......@@ -157,13 +157,13 @@ bytecodes: [
B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
B(Ldar), R(15),
/* 36 E> */ B(Throw),
B(LdaZero),
B(LdaSmi), I8(1),
B(Star), R(11),
B(Mov), R(15), R(12),
B(Jump), U8(55),
B(Jump), U8(54),
B(LdaZero),
B(Star), R(7),
B(JumpLoop), U8(84), I8(0),
B(JumpLoop), U8(85), I8(0),
B(Jump), U8(33),
B(Star), R(15),
B(CreateCatchContext), R(15), U8(11),
......@@ -181,9 +181,9 @@ bytecodes: [
B(LdaSmi), I8(-1),
B(Star), R(12),
B(Star), R(11),
B(Jump), U8(8),
B(Jump), U8(7),
B(Star), R(12),
B(LdaSmi), I8(1),
B(LdaZero),
B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
......@@ -232,9 +232,9 @@ bytecodes: [
B(SwitchOnSmiNoFeedback), U8(14), U8(2), I8(0),
B(Jump), U8(8),
B(Ldar), R(12),
/* 44 S> */ B(Return),
B(Ldar), R(12),
B(ReThrow),
B(Ldar), R(12),
/* 44 S> */ B(Return),
B(LdaUndefined),
/* 44 S> */ B(Return),
]
......@@ -248,7 +248,7 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
Smi [15],
Smi [16],
Smi [7],
SCOPE_INFO_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
......@@ -257,8 +257,8 @@ constant pool: [
Smi [9],
]
handlers: [
[48, 202, 210],
[51, 169, 171],
[48, 203, 211],
[51, 170, 172],
[271, 281, 283],
]
......@@ -288,8 +288,8 @@ bytecodes: [
B(Ldar), R(1),
/* 54 S> */ B(Return),
/* 43 S> */ B(LdaGlobal), U8(4), U8(0),
B(Star), R(8),
/* 50 E> */ B(CallUndefinedReceiver0), R(8), U8(2),
B(Star), R(5),
/* 50 E> */ B(CallUndefinedReceiver0), R(5), U8(2),
B(Star), R(6),
B(LdaNamedProperty), R(6), U8(5), U8(4),
B(Star), R(7),
......
......@@ -94,7 +94,7 @@ snippet: "
"
frame size: 10
parameter count: 1
bytecode array length: 133
bytecode array length: 131
bytecodes: [
/* 30 E> */ B(StackCheck),
B(CreateBlockContext), U8(0),
......@@ -115,32 +115,31 @@ bytecodes: [
B(Star), R(4),
B(LdaConstant), U8(4),
B(Star), R(3),
/* 101 S> */ B(CreateArrayLiteral), U8(5), U8(5), U8(37),
/* 101 S> */ B(CreateArrayLiteral), U8(5), U8(2), U8(37),
B(Star), R(7),
B(LdaNamedProperty), R(7), U8(6), U8(3),
B(Star), R(8),
B(LdaNamedProperty), R(8), U8(6), U8(6),
B(Star), R(9),
B(CallProperty0), R(9), R(8), U8(8),
B(CallProperty0), R(8), R(7), U8(5),
B(Mov), R(5), R(2),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(7),
B(LdaNamedProperty), R(7), U8(7), U8(10),
B(Star), R(6),
B(CallProperty0), R(6), R(7), U8(12),
B(LdaNamedProperty), R(6), U8(7), U8(7),
B(Star), R(5),
B(CallProperty0), R(5), R(6), U8(16),
B(Star), R(9),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(8), U8(14),
B(JumpIfToBooleanTrue), U8(21),
B(LdaNamedProperty), R(5), U8(9), U8(16),
B(Star), R(5),
B(StaInArrayLiteral), R(4), R(3), U8(3),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
B(LdaNamedProperty), R(9), U8(8), U8(18),
B(JumpIfToBooleanTrue), U8(19),
B(LdaNamedProperty), R(9), U8(9), U8(9),
B(StaInArrayLiteral), R(4), R(3), U8(14),
B(Ldar), R(3),
B(Inc), U8(2),
B(Inc), U8(13),
B(Star), R(3),
B(JumpLoop), U8(35), I8(0),
B(JumpLoop), U8(33), I8(0),
B(LdaSmi), I8(4),
B(StaInArrayLiteral), R(4), R(3), U8(3),
B(StaInArrayLiteral), R(4), R(3), U8(14),
B(Mov), R(4), R(3),
B(CallJSRuntime), U8(%reflect_construct), R(2), U8(2),
B(LdaUndefined),
......
......@@ -93,7 +93,7 @@ snippet: "
"
frame size: 13
parameter count: 1
bytecode array length: 130
bytecode array length: 128
bytecodes: [
B(CreateRestParameter),
B(Star), R(2),
......@@ -112,28 +112,27 @@ bytecodes: [
B(Inc), U8(3),
/* 152 S> */ B(Star), R(6),
B(LdaNamedProperty), R(2), U8(0), U8(4),
B(Star), R(12),
B(CallProperty0), R(12), R(2), U8(6),
B(Mov), R(2), R(11),
B(Star), R(11),
B(CallProperty0), R(11), R(2), U8(6),
B(Mov), R(2), R(10),
B(Mov), R(1), R(4),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(10),
B(LdaNamedProperty), R(10), U8(1), U8(8),
B(Star), R(9),
B(CallProperty0), R(9), R(10), U8(10),
B(LdaNamedProperty), R(9), U8(1), U8(8),
B(Star), R(8),
B(CallProperty0), R(8), R(9), U8(14),
B(Star), R(12),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
B(LdaNamedProperty), R(8), U8(2), U8(12),
B(JumpIfToBooleanTrue), U8(21),
B(LdaNamedProperty), R(8), U8(3), U8(14),
B(Star), R(8),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
B(LdaNamedProperty), R(12), U8(2), U8(16),
B(JumpIfToBooleanTrue), U8(19),
B(LdaNamedProperty), R(12), U8(3), U8(10),
B(StaInArrayLiteral), R(7), R(6), U8(1),
B(Ldar), R(6),
B(Inc), U8(3),
B(Star), R(6),
B(JumpLoop), U8(35), I8(0),
B(JumpLoop), U8(33), I8(0),
B(LdaSmi), I8(1),
B(StaInArrayLiteral), R(7), R(6), U8(1),
B(Mov), R(5), R(6),
......
This diff is collapsed.
......@@ -145,38 +145,6 @@
'language/eval-code/direct/var-env-lower-lex-catch-non-strict': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=4951
'language/expressions/assignment/dstr-array-elem-iter-rtrn-close-err': [FAIL],
'language/expressions/assignment/dstr-array-elem-iter-thrw-close': [FAIL],
'language/expressions/assignment/dstr-array-elem-iter-thrw-close-err': [FAIL],
'language/expressions/assignment/dstr-array-elem-trlg-iter-list-thrw-close': [FAIL],
'language/expressions/assignment/dstr-array-elem-trlg-iter-list-thrw-close-err': [FAIL],
'language/expressions/assignment/dstr-array-elem-trlg-iter-rest-rtrn-close': [FAIL],
'language/expressions/assignment/dstr-array-elem-trlg-iter-rest-rtrn-close-err': [FAIL],
'language/expressions/assignment/dstr-array-elem-trlg-iter-rest-rtrn-close-null': [FAIL],
'language/expressions/assignment/dstr-array-elem-trlg-iter-rest-thrw-close': [FAIL],
'language/expressions/assignment/dstr-array-elem-trlg-iter-rest-thrw-close-err': [FAIL],
'language/expressions/assignment/dstr-array-rest-iter-rtrn-close': [FAIL],
'language/expressions/assignment/dstr-array-rest-iter-rtrn-close-err': [FAIL],
'language/expressions/assignment/dstr-array-rest-iter-rtrn-close-null': [FAIL],
'language/expressions/assignment/dstr-array-rest-iter-thrw-close': [FAIL],
'language/expressions/assignment/dstr-array-rest-iter-thrw-close-err': [FAIL],
'language/expressions/assignment/dstr-array-rest-lref-err': [FAIL],
'language/statements/for-of/dstr-array-elem-iter-rtrn-close-err': [FAIL],
'language/statements/for-of/dstr-array-elem-iter-thrw-close': [FAIL],
'language/statements/for-of/dstr-array-elem-iter-thrw-close-err': [FAIL],
'language/statements/for-of/dstr-array-elem-trlg-iter-list-thrw-close': [FAIL],
'language/statements/for-of/dstr-array-elem-trlg-iter-list-thrw-close-err': [FAIL],
'language/statements/for-of/dstr-array-elem-trlg-iter-rest-rtrn-close': [FAIL],
'language/statements/for-of/dstr-array-elem-trlg-iter-rest-rtrn-close-err': [FAIL],
'language/statements/for-of/dstr-array-elem-trlg-iter-rest-rtrn-close-null': [FAIL],
'language/statements/for-of/dstr-array-elem-trlg-iter-rest-thrw-close': [FAIL],
'language/statements/for-of/dstr-array-elem-trlg-iter-rest-thrw-close-err': [FAIL],
'language/statements/for-of/dstr-array-rest-iter-rtrn-close': [FAIL],
'language/statements/for-of/dstr-array-rest-iter-rtrn-close-err': [FAIL],
'language/statements/for-of/dstr-array-rest-iter-rtrn-close-null': [FAIL],
'language/statements/for-of/dstr-array-rest-iter-thrw-close': [FAIL],
'language/statements/for-of/dstr-array-rest-iter-thrw-close-err': [FAIL],
'language/statements/for-of/dstr-array-rest-lref-err': [FAIL],
'language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order': [FAIL],
'language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order': [FAIL],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment