Commit 769d3326 authored by oth's avatar oth Committed by Commit bot

[interpreter] Filter expression positions at source.

With this change the bytecode array builder only emits expression
positions for bytecodes that can throw. This allows more peephole
optimization opportunities and results in smaller code.

BUG=v8:4280,chromium:615979
LOG=N

Review-Url: https://codereview.chromium.org/2038323002
Cr-Commit-Position: refs/heads/master@{#36863}
parent 77af83ba
...@@ -307,6 +307,8 @@ DEFINE_BOOL(ignition_generators, false, ...@@ -307,6 +307,8 @@ DEFINE_BOOL(ignition_generators, false,
DEFINE_STRING(ignition_filter, "*", "filter for ignition interpreter") DEFINE_STRING(ignition_filter, "*", "filter for ignition interpreter")
DEFINE_BOOL(ignition_peephole, true, "use ignition peephole optimizer") DEFINE_BOOL(ignition_peephole, true, "use ignition peephole optimizer")
DEFINE_BOOL(ignition_reo, true, "use ignition register equivalence optimizer") DEFINE_BOOL(ignition_reo, true, "use ignition register equivalence optimizer")
DEFINE_BOOL(ignition_filter_expression_positions, true,
"filter expression positions before the bytecode pipeline")
DEFINE_BOOL(print_bytecode, false, DEFINE_BOOL(print_bytecode, false,
"print bytecode generated by ignition interpreter") "print bytecode generated by ignition interpreter")
DEFINE_BOOL(trace_ignition, false, DEFINE_BOOL(trace_ignition, false,
......
...@@ -79,10 +79,29 @@ Handle<BytecodeArray> BytecodeArrayBuilder::ToBytecodeArray() { ...@@ -79,10 +79,29 @@ Handle<BytecodeArray> BytecodeArrayBuilder::ToBytecodeArray() {
handler_table); handler_table);
} }
namespace {
static bool ExpressionPositionIsNeeded(Bytecode bytecode) {
// An expression position is always needed if filtering is turned
// off. Otherwise an expression is only needed if the bytecode has
// external side effects.
return !FLAG_ignition_filter_expression_positions ||
!Bytecodes::IsWithoutExternalSideEffects(bytecode);
}
} // namespace
void BytecodeArrayBuilder::AttachSourceInfo(BytecodeNode* node) { void BytecodeArrayBuilder::AttachSourceInfo(BytecodeNode* node) {
if (latest_source_info_.is_valid()) { if (latest_source_info_.is_valid()) {
node->source_info().Update(latest_source_info_); // Statement positions need to be emitted immediately. Expression
latest_source_info_.set_invalid(); // positions can be pushed back until a bytecode is found that can
// throw. Hence we only invalidate the existing source position
// information if it is used.
if (latest_source_info_.is_statement() ||
ExpressionPositionIsNeeded(node->bytecode())) {
node->source_info() = latest_source_info_;
latest_source_info_.set_invalid();
}
} }
} }
...@@ -500,7 +519,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StackCheck(int position) { ...@@ -500,7 +519,7 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StackCheck(int position) {
if (position != RelocInfo::kNoPosition) { if (position != RelocInfo::kNoPosition) {
// We need to attach a non-breakable source position to a stack check, // We need to attach a non-breakable source position to a stack check,
// so we simply add it as expression position. // so we simply add it as expression position.
latest_source_info_.Update({position, false}); latest_source_info_ = {position, false};
} }
Output(Bytecode::kStackCheck); Output(Bytecode::kStackCheck);
return *this; return *this;
...@@ -722,6 +741,15 @@ void BytecodeArrayBuilder::SetStatementPosition(Statement* stmt) { ...@@ -722,6 +741,15 @@ void BytecodeArrayBuilder::SetStatementPosition(Statement* stmt) {
void BytecodeArrayBuilder::SetExpressionPosition(Expression* expr) { void BytecodeArrayBuilder::SetExpressionPosition(Expression* expr) {
if (expr->position() == RelocInfo::kNoPosition) return; if (expr->position() == RelocInfo::kNoPosition) return;
if (latest_source_info_.is_expression()) {
// Ensure the current expression position is overwritten with the
// latest value.
//
// TODO(oth): Clean-up BytecodeSourceInfo to have three states and
// simplify the update logic, taking care to ensure position
// information is not lost.
latest_source_info_.set_invalid();
}
latest_source_info_.Update({expr->position(), false}); latest_source_info_.Update({expr->position(), false});
} }
......
...@@ -96,7 +96,7 @@ bool BytecodePeepholeOptimizer::LastBytecodePutsNameInAccumulator() const { ...@@ -96,7 +96,7 @@ bool BytecodePeepholeOptimizer::LastBytecodePutsNameInAccumulator() const {
void BytecodePeepholeOptimizer::TryToRemoveLastExpressionPosition( void BytecodePeepholeOptimizer::TryToRemoveLastExpressionPosition(
const BytecodeNode* const current) { const BytecodeNode* const current) {
if (current->source_info().is_statement() && if (current->source_info().is_valid() &&
last_.source_info().is_expression() && last_.source_info().is_expression() &&
Bytecodes::IsWithoutExternalSideEffects(last_.bytecode())) { Bytecodes::IsWithoutExternalSideEffects(last_.bytecode())) {
// The last bytecode has been marked as expression. It has no // The last bytecode has been marked as expression. It has no
......
...@@ -84,8 +84,6 @@ class BytecodeSourceInfo final { ...@@ -84,8 +84,6 @@ class BytecodeSourceInfo final {
private: private:
int source_position_; int source_position_;
bool is_statement_; bool is_statement_;
DISALLOW_COPY_AND_ASSIGN(BytecodeSourceInfo);
}; };
// A container for a generated bytecode, it's operands, and source information. // A container for a generated bytecode, it's operands, and source information.
......
...@@ -40,12 +40,12 @@ bytecodes: [ ...@@ -40,12 +40,12 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(LdaZero), B(LdaZero),
B(Star), R(1), B(Star), R(1),
/* 54 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(StaKeyedPropertySloppy), R(2), R(1), U8(1), /* 54 E> */ B(StaKeyedPropertySloppy), R(2), R(1), U8(1),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(1), B(Star), R(1),
/* 57 E> */ B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Add), R(0), /* 57 E> */ B(Add), R(0),
B(StaKeyedPropertySloppy), R(2), R(1), U8(1), B(StaKeyedPropertySloppy), R(2), R(1), U8(1),
B(Ldar), R(2), B(Ldar), R(2),
/* 66 S> */ B(Return), /* 66 S> */ B(Return),
...@@ -93,8 +93,8 @@ bytecodes: [ ...@@ -93,8 +93,8 @@ bytecodes: [
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(3), B(Star), R(3),
/* 56 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(StaKeyedPropertySloppy), R(4), R(3), U8(1), /* 56 E> */ B(StaKeyedPropertySloppy), R(4), R(3), U8(1),
B(Ldar), R(4), B(Ldar), R(4),
B(StaKeyedPropertySloppy), R(2), R(1), U8(5), B(StaKeyedPropertySloppy), R(2), R(1), U8(5),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
...@@ -103,8 +103,8 @@ bytecodes: [ ...@@ -103,8 +103,8 @@ bytecodes: [
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(3), B(Star), R(3),
/* 66 E> */ B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Add), R(0), /* 66 E> */ B(Add), R(0),
B(StaKeyedPropertySloppy), R(4), R(3), U8(3), B(StaKeyedPropertySloppy), R(4), R(3), U8(3),
B(Ldar), R(4), B(Ldar), R(4),
B(StaKeyedPropertySloppy), R(2), R(1), U8(5), B(StaKeyedPropertySloppy), R(2), R(1), U8(5),
......
...@@ -22,11 +22,11 @@ bytecodes: [ ...@@ -22,11 +22,11 @@ bytecodes: [
/* 49 S> */ B(LdaSmi), U8(1), /* 49 S> */ B(LdaSmi), U8(1),
B(Star), R(1), B(Star), R(1),
/* 52 S> */ B(LdaSmi), U8(2), /* 52 S> */ B(LdaSmi), U8(2),
/* 62 E> */ B(Star), R(0), B(Star), R(0),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
/* 69 E> */ B(Star), R(1), B(Star), R(1),
B(LdaSmi), U8(4), B(LdaSmi), U8(4),
/* 76 E> */ B(Star), R(0), B(Star), R(0),
B(LdaSmi), U8(5), B(LdaSmi), U8(5),
B(Star), R(1), B(Star), R(1),
/* 89 S> */ B(Return), /* 89 S> */ B(Return),
...@@ -50,7 +50,7 @@ bytecodes: [ ...@@ -50,7 +50,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(55), /* 42 S> */ B(LdaSmi), U8(55),
B(Star), R(0), B(Star), R(0),
/* 57 S> */ B(LdaSmi), U8(100), /* 57 S> */ B(LdaSmi), U8(100),
/* 57 E> */ B(Star), R(0), B(Star), R(0),
B(Star), R(1), B(Star), R(1),
/* 65 S> */ B(Nop), /* 65 S> */ B(Nop),
/* 75 S> */ B(Return), /* 75 S> */ B(Return),
...@@ -75,12 +75,12 @@ bytecodes: [ ...@@ -75,12 +75,12 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(100), /* 46 S> */ B(LdaSmi), U8(100),
B(Mov), R(0), R(1), B(Mov), R(0), R(1),
/* 57 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(1), /* 57 E> */ B(Add), R(1),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(101), B(LdaSmi), U8(101),
/* 69 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(2), /* 69 E> */ B(Add), R(2),
B(Star), R(0), B(Star), R(0),
/* 77 S> */ B(Nop), /* 77 S> */ B(Nop),
/* 87 S> */ B(Return), /* 87 S> */ B(Return),
...@@ -105,12 +105,12 @@ bytecodes: [ ...@@ -105,12 +105,12 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(55), /* 42 S> */ B(LdaSmi), U8(55),
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(56), /* 46 S> */ B(LdaSmi), U8(56),
/* 53 E> */ B(Star), R(0), B(Star), R(0),
/* 61 E> */ B(Sub), R(0), /* 61 E> */ B(Sub), R(0),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(57), B(LdaSmi), U8(57),
/* 68 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(2), /* 68 E> */ B(Add), R(2),
B(Star), R(0), B(Star), R(0),
/* 75 S> */ B(ToNumber), /* 75 S> */ B(ToNumber),
B(Star), R(1), B(Star), R(1),
...@@ -139,16 +139,16 @@ bytecodes: [ ...@@ -139,16 +139,16 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 76 S> */ B(LdaSmi), U8(1), /* 76 S> */ B(LdaSmi), U8(1),
B(Mov), R(0), R(2), B(Mov), R(0), R(2),
/* 61 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(2), /* 61 E> */ B(Add), R(2),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
/* 71 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(3), /* 71 E> */ B(Add), R(3),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
/* 81 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(2), /* 81 E> */ B(Add), R(2),
B(Star), R(1), B(Star), R(1),
/* 87 S> */ B(Nop), /* 87 S> */ B(Nop),
/* 97 S> */ B(Return), /* 97 S> */ B(Return),
...@@ -173,16 +173,16 @@ bytecodes: [ ...@@ -173,16 +173,16 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 76 S> */ B(LdaSmi), U8(1), /* 76 S> */ B(LdaSmi), U8(1),
B(Mov), R(0), R(1), B(Mov), R(0), R(1),
/* 61 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(1), /* 61 E> */ B(Add), R(1),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
/* 71 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(2), /* 71 E> */ B(Add), R(2),
B(Star), R(1), B(Star), R(1),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
/* 81 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(1), /* 81 E> */ B(Add), R(1),
B(Star), R(0), B(Star), R(0),
/* 87 S> */ B(Nop), /* 87 S> */ B(Nop),
/* 97 S> */ B(Return), /* 97 S> */ B(Return),
...@@ -208,31 +208,31 @@ bytecodes: [ ...@@ -208,31 +208,31 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
/* 54 S> */ B(LdaSmi), U8(1), /* 54 S> */ B(LdaSmi), U8(1),
B(Mov), R(0), R(2), B(Mov), R(0), R(2),
/* 68 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(2), /* 68 E> */ B(Add), R(2),
B(Star), R(3), B(Star), R(3),
/* 76 E> */ B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Add), R(0), /* 76 E> */ B(Add), R(0),
B(Star), R(4), B(Star), R(4),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
/* 88 E> */ B(Star), R(1), B(Star), R(1),
B(Mul), R(4), /* 88 E> */ B(Mul), R(4),
B(Add), R(3), B(Add), R(3),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
/* 98 E> */ B(Star), R(1), B(Star), R(1),
B(Add), R(2), /* 98 E> */ B(Add), R(2),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(4), B(LdaSmi), U8(4),
/* 108 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(3), /* 108 E> */ B(Add), R(3),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(5), B(LdaSmi), U8(5),
/* 118 E> */ B(Star), R(1), B(Star), R(1),
B(Add), R(2), /* 118 E> */ B(Add), R(2),
B(Star), R(3), B(Star), R(3),
/* 125 E> */ B(Ldar), R(1), B(Ldar), R(1),
B(Add), R(3), /* 125 E> */ B(Add), R(3),
/* 128 S> */ B(Return), /* 128 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -254,21 +254,21 @@ bytecodes: [ ...@@ -254,21 +254,21 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(1), /* 46 S> */ B(LdaSmi), U8(1),
B(Star), R(1), B(Star), R(1),
/* 57 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(Add), R(1), /* 57 E> */ B(Add), R(1),
B(Star), R(2), B(Star), R(2),
B(Ldar), R(0), B(Ldar), R(0),
B(ToNumber), B(ToNumber),
B(Star), R(1), B(Star), R(1),
B(Inc), B(Inc),
/* 63 E> */ B(Star), R(0), B(Star), R(0),
B(Ldar), R(1), B(Ldar), R(1),
B(Add), R(2), /* 63 E> */ B(Add), R(2),
B(Star), R(3), B(Star), R(3),
B(Ldar), R(0), B(Ldar), R(0),
B(Inc), B(Inc),
/* 72 E> */ B(Star), R(0), B(Star), R(0),
B(Add), R(3), /* 72 E> */ B(Add), R(3),
/* 76 S> */ B(Return), /* 76 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -19,7 +19,7 @@ bytecodes: [ ...@@ -19,7 +19,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(JumpIfToBooleanTrue), U8(5), /* 45 S> */ B(JumpIfToBooleanTrue), U8(5),
/* 54 E> */ B(LdaZero), B(LdaZero),
/* 56 E> */ B(TestLessThan), R(0), /* 56 E> */ B(TestLessThan), R(0),
B(JumpIfToBooleanFalse), U8(5), B(JumpIfToBooleanFalse), U8(5),
/* 63 S> */ B(LdaSmi), U8(1), /* 63 S> */ B(LdaSmi), U8(1),
...@@ -44,7 +44,7 @@ bytecodes: [ ...@@ -44,7 +44,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(JumpIfToBooleanFalse), U8(5), /* 45 S> */ B(JumpIfToBooleanFalse), U8(5),
/* 54 E> */ B(LdaZero), B(LdaZero),
/* 56 E> */ B(TestLessThan), R(0), /* 56 E> */ B(TestLessThan), R(0),
B(JumpIfToBooleanFalse), U8(5), B(JumpIfToBooleanFalse), U8(5),
/* 63 S> */ B(LdaSmi), U8(1), /* 63 S> */ B(LdaSmi), U8(1),
...@@ -69,13 +69,13 @@ bytecodes: [ ...@@ -69,13 +69,13 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(JumpIfToBooleanTrue), U8(5), /* 45 S> */ B(JumpIfToBooleanTrue), U8(5),
/* 55 E> */ B(LdaZero), B(LdaZero),
/* 57 E> */ B(TestLessThan), R(0), /* 57 E> */ B(TestLessThan), R(0),
B(JumpIfToBooleanFalse), U8(6), B(JumpIfToBooleanFalse), U8(6),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Jump), U8(4), B(Jump), U8(4),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
/* 47 E> */ B(Star), R(0), B(Star), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 71 S> */ B(Return), /* 71 S> */ B(Return),
] ]
......
...@@ -71,7 +71,7 @@ bytecodes: [ ...@@ -71,7 +71,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 53 S> */ B(LdaSmi), U8(1), /* 53 S> */ B(LdaSmi), U8(1),
/* 53 E> */ B(Star), R(1), B(Star), R(1),
/* 65 S> */ B(LdaSmi), U8(10), /* 65 S> */ B(LdaSmi), U8(10),
/* 65 E> */ B(TestLessThan), R(0), /* 65 E> */ B(TestLessThan), R(0),
B(JumpIfFalse), U8(33), B(JumpIfFalse), U8(33),
...@@ -118,7 +118,7 @@ bytecode array length: 55 ...@@ -118,7 +118,7 @@ bytecode array length: 55
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 62 S> */ B(LdaZero), /* 62 S> */ B(LdaZero),
/* 68 E> */ B(TestLessThan), R(0), /* 68 E> */ B(TestLessThan), R(0),
...@@ -142,7 +142,7 @@ bytecodes: [ ...@@ -142,7 +142,7 @@ bytecodes: [
/* 164 S> */ B(Jump), U8(10), /* 164 S> */ B(Jump), U8(10),
/* 173 S> */ B(LdaSmi), U8(1), /* 173 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
/* 175 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-46), B(Jump), U8(-46),
/* 186 S> */ B(Ldar), R(0), /* 186 S> */ B(Ldar), R(0),
/* 196 S> */ B(Return), /* 196 S> */ B(Return),
...@@ -171,7 +171,7 @@ bytecode array length: 41 ...@@ -171,7 +171,7 @@ bytecode array length: 41
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 71 S> */ B(LdaSmi), U8(3), /* 71 S> */ B(LdaSmi), U8(3),
/* 71 E> */ B(TestLessThan), R(0), /* 71 E> */ B(TestLessThan), R(0),
...@@ -183,7 +183,7 @@ bytecodes: [ ...@@ -183,7 +183,7 @@ bytecodes: [
/* 94 S> */ B(Jump), U8(10), /* 94 S> */ B(Jump), U8(10),
/* 105 S> */ B(LdaSmi), U8(1), /* 105 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
/* 107 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-21), B(Jump), U8(-21),
/* 122 S> */ B(LdaSmi), U8(1), /* 122 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
...@@ -216,7 +216,7 @@ bytecodes: [ ...@@ -216,7 +216,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0), B(Star), R(0),
/* 54 S> */ B(LdaSmi), U8(1), /* 54 S> */ B(LdaSmi), U8(1),
/* 54 E> */ B(Star), R(1), B(Star), R(1),
/* 64 S> */ B(Ldar), R(0), /* 64 S> */ B(Ldar), R(0),
B(JumpIfToBooleanFalse), U8(17), B(JumpIfToBooleanFalse), U8(17),
/* 57 E> */ B(StackCheck), /* 57 E> */ B(StackCheck),
...@@ -225,7 +225,7 @@ bytecodes: [ ...@@ -225,7 +225,7 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
/* 85 S> */ B(LdaSmi), U8(1), /* 85 S> */ B(LdaSmi), U8(1),
B(Sub), R(0), B(Sub), R(0),
/* 87 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-17), B(Jump), U8(-17),
/* 98 S> */ B(Ldar), R(1), /* 98 S> */ B(Ldar), R(1),
/* 108 S> */ B(Return), /* 108 S> */ B(Return),
...@@ -254,7 +254,7 @@ bytecodes: [ ...@@ -254,7 +254,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 53 S> */ B(LdaSmi), U8(1), /* 53 S> */ B(LdaSmi), U8(1),
/* 53 E> */ B(Star), R(1), B(Star), R(1),
/* 56 E> */ B(StackCheck), /* 56 E> */ B(StackCheck),
/* 63 S> */ B(LdaSmi), U8(10), /* 63 S> */ B(LdaSmi), U8(10),
B(Mul), R(1), B(Mul), R(1),
...@@ -269,7 +269,7 @@ bytecodes: [ ...@@ -269,7 +269,7 @@ bytecodes: [
/* 110 S> */ B(Jump), U8(8), /* 110 S> */ B(Jump), U8(8),
/* 122 S> */ B(LdaSmi), U8(1), /* 122 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
/* 124 E> */ B(Star), R(0), B(Star), R(0),
/* 144 S> */ B(LdaSmi), U8(10), /* 144 S> */ B(LdaSmi), U8(10),
/* 144 E> */ B(TestLessThan), R(0), /* 144 E> */ B(TestLessThan), R(0),
B(JumpIfTrue), U8(-33), B(JumpIfTrue), U8(-33),
...@@ -299,14 +299,14 @@ bytecodes: [ ...@@ -299,14 +299,14 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0), B(Star), R(0),
/* 54 S> */ B(LdaSmi), U8(1), /* 54 S> */ B(LdaSmi), U8(1),
/* 54 E> */ B(Star), R(1), B(Star), R(1),
/* 57 E> */ B(StackCheck), /* 57 E> */ B(StackCheck),
/* 64 S> */ B(LdaSmi), U8(12), /* 64 S> */ B(LdaSmi), U8(12),
B(Mul), R(1), B(Mul), R(1),
B(Star), R(1), B(Star), R(1),
/* 78 S> */ B(LdaSmi), U8(1), /* 78 S> */ B(LdaSmi), U8(1),
B(Sub), R(0), B(Sub), R(0),
/* 80 E> */ B(Star), R(0), B(Star), R(0),
/* 98 S> */ B(Ldar), R(0), /* 98 S> */ B(Ldar), R(0),
B(JumpIfToBooleanTrue), U8(-15), B(JumpIfToBooleanTrue), U8(-15),
/* 102 S> */ B(Ldar), R(1), /* 102 S> */ B(Ldar), R(1),
...@@ -336,7 +336,7 @@ bytecodes: [ ...@@ -336,7 +336,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 53 S> */ B(LdaSmi), U8(1), /* 53 S> */ B(LdaSmi), U8(1),
/* 53 E> */ B(Star), R(1), B(Star), R(1),
/* 56 E> */ B(StackCheck), /* 56 E> */ B(StackCheck),
/* 63 S> */ B(LdaSmi), U8(10), /* 63 S> */ B(LdaSmi), U8(10),
B(Mul), R(1), B(Mul), R(1),
...@@ -379,7 +379,7 @@ bytecodes: [ ...@@ -379,7 +379,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 53 S> */ B(LdaSmi), U8(1), /* 53 S> */ B(LdaSmi), U8(1),
/* 53 E> */ B(Star), R(1), B(Star), R(1),
/* 56 E> */ B(StackCheck), /* 56 E> */ B(StackCheck),
/* 63 S> */ B(LdaSmi), U8(10), /* 63 S> */ B(LdaSmi), U8(10),
B(Mul), R(1), B(Mul), R(1),
...@@ -419,7 +419,7 @@ bytecode array length: 31 ...@@ -419,7 +419,7 @@ bytecode array length: 31
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 58 S> */ B(LdaSmi), U8(1), /* 58 S> */ B(LdaSmi), U8(1),
/* 64 E> */ B(TestEqual), R(0), /* 64 E> */ B(TestEqual), R(0),
...@@ -431,7 +431,7 @@ bytecodes: [ ...@@ -431,7 +431,7 @@ bytecodes: [
/* 91 S> */ B(Jump), U8(8), /* 91 S> */ B(Jump), U8(8),
/* 103 S> */ B(LdaSmi), U8(1), /* 103 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
/* 105 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-23), B(Jump), U8(-23),
B(LdaUndefined), B(LdaUndefined),
/* 116 S> */ B(Return), /* 116 S> */ B(Return),
...@@ -455,7 +455,7 @@ bytecode array length: 31 ...@@ -455,7 +455,7 @@ bytecode array length: 31
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 47 S> */ B(LdaZero), /* 47 S> */ B(LdaZero),
/* 47 E> */ B(Star), R(0), B(Star), R(0),
/* 34 E> */ B(StackCheck), /* 34 E> */ B(StackCheck),
/* 56 S> */ B(LdaSmi), U8(1), /* 56 S> */ B(LdaSmi), U8(1),
/* 62 E> */ B(TestEqual), R(0), /* 62 E> */ B(TestEqual), R(0),
...@@ -467,7 +467,7 @@ bytecodes: [ ...@@ -467,7 +467,7 @@ bytecodes: [
/* 89 S> */ B(Jump), U8(8), /* 89 S> */ B(Jump), U8(8),
/* 101 S> */ B(LdaSmi), U8(1), /* 101 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
/* 103 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-23), B(Jump), U8(-23),
B(LdaUndefined), B(LdaUndefined),
/* 114 S> */ B(Return), /* 114 S> */ B(Return),
...@@ -491,7 +491,7 @@ bytecode array length: 31 ...@@ -491,7 +491,7 @@ bytecode array length: 31
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 68 S> */ B(LdaSmi), U8(1), /* 68 S> */ B(LdaSmi), U8(1),
/* 74 E> */ B(TestEqual), R(0), /* 74 E> */ B(TestEqual), R(0),
...@@ -503,7 +503,7 @@ bytecodes: [ ...@@ -503,7 +503,7 @@ bytecodes: [
/* 101 S> */ B(Jump), U8(2), /* 101 S> */ B(Jump), U8(2),
/* 55 S> */ B(LdaSmi), U8(1), /* 55 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
/* 55 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-23), B(Jump), U8(-23),
B(LdaUndefined), B(LdaUndefined),
/* 113 S> */ B(Return), /* 113 S> */ B(Return),
...@@ -526,7 +526,7 @@ bytecode array length: 31 ...@@ -526,7 +526,7 @@ bytecode array length: 31
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 47 S> */ B(LdaZero), /* 47 S> */ B(LdaZero),
/* 47 E> */ B(Star), R(0), B(Star), R(0),
/* 34 E> */ B(StackCheck), /* 34 E> */ B(StackCheck),
/* 66 S> */ B(LdaSmi), U8(1), /* 66 S> */ B(LdaSmi), U8(1),
/* 72 E> */ B(TestEqual), R(0), /* 72 E> */ B(TestEqual), R(0),
...@@ -538,7 +538,7 @@ bytecodes: [ ...@@ -538,7 +538,7 @@ bytecodes: [
/* 99 S> */ B(Jump), U8(2), /* 99 S> */ B(Jump), U8(2),
/* 53 S> */ B(LdaSmi), U8(1), /* 53 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
/* 53 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-23), B(Jump), U8(-23),
B(LdaUndefined), B(LdaUndefined),
/* 111 S> */ B(Return), /* 111 S> */ B(Return),
...@@ -564,7 +564,7 @@ bytecodes: [ ...@@ -564,7 +564,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 58 S> */ B(LdaZero), /* 58 S> */ B(LdaZero),
/* 58 E> */ B(Star), R(1), B(Star), R(1),
/* 63 S> */ B(LdaSmi), U8(100), /* 63 S> */ B(LdaSmi), U8(100),
/* 63 E> */ B(TestLessThan), R(1), /* 63 E> */ B(TestLessThan), R(1),
B(JumpIfFalse), U8(19), B(JumpIfFalse), U8(19),
...@@ -575,7 +575,7 @@ bytecodes: [ ...@@ -575,7 +575,7 @@ bytecodes: [
/* 98 S> */ B(Jump), U8(2), /* 98 S> */ B(Jump), U8(2),
/* 72 S> */ B(LdaSmi), U8(1), /* 72 S> */ B(LdaSmi), U8(1),
B(Add), R(1), B(Add), R(1),
/* 72 E> */ B(Star), R(1), B(Star), R(1),
B(Jump), U8(-21), B(Jump), U8(-21),
B(LdaUndefined), B(LdaUndefined),
/* 110 S> */ B(Return), /* 110 S> */ B(Return),
...@@ -601,16 +601,16 @@ bytecodes: [ ...@@ -601,16 +601,16 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0), B(Star), R(0),
/* 58 S> */ B(LdaSmi), U8(10), /* 58 S> */ B(LdaSmi), U8(10),
/* 58 E> */ B(Star), R(1), B(Star), R(1),
/* 62 S> */ B(Ldar), R(1), /* 62 S> */ B(Ldar), R(1),
B(JumpIfToBooleanFalse), U8(16), B(JumpIfToBooleanFalse), U8(16),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 74 S> */ B(LdaSmi), U8(12), /* 74 S> */ B(LdaSmi), U8(12),
B(Mul), R(0), B(Mul), R(0),
/* 76 E> */ B(Star), R(0), B(Star), R(0),
/* 67 S> */ B(Ldar), R(1), /* 67 S> */ B(Ldar), R(1),
B(Dec), B(Dec),
/* 67 E> */ B(Star), R(1), B(Star), R(1),
B(Jump), U8(-16), B(Jump), U8(-16),
/* 88 S> */ B(Ldar), R(0), /* 88 S> */ B(Ldar), R(0),
/* 98 S> */ B(Return), /* 98 S> */ B(Return),
...@@ -662,7 +662,7 @@ bytecodes: [ ...@@ -662,7 +662,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 58 S> */ B(LdaZero), /* 58 S> */ B(LdaZero),
/* 58 E> */ B(Star), R(1), B(Star), R(1),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 76 S> */ B(LdaSmi), U8(1), /* 76 S> */ B(LdaSmi), U8(1),
B(Add), R(0), B(Add), R(0),
...@@ -673,7 +673,7 @@ bytecodes: [ ...@@ -673,7 +673,7 @@ bytecodes: [
/* 102 S> */ B(Jump), U8(9), /* 102 S> */ B(Jump), U8(9),
/* 69 S> */ B(Ldar), R(1), /* 69 S> */ B(Ldar), R(1),
B(Inc), B(Inc),
/* 69 E> */ B(Star), R(1), B(Star), R(1),
B(Jump), U8(-20), B(Jump), U8(-20),
/* 112 S> */ B(Ldar), R(0), /* 112 S> */ B(Ldar), R(0),
/* 122 S> */ B(Return), /* 122 S> */ B(Return),
...@@ -701,7 +701,7 @@ bytecode array length: 119 ...@@ -701,7 +701,7 @@ bytecode array length: 119
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
/* 52 S> */ B(Ldar), R(1), /* 52 S> */ B(Ldar), R(1),
B(JumpIfToBooleanFalse), U8(111), B(JumpIfToBooleanFalse), U8(111),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
...@@ -739,8 +739,8 @@ bytecodes: [ ...@@ -739,8 +739,8 @@ bytecodes: [
B(ToNumber), B(ToNumber),
B(Star), R(4), B(Star), R(4),
B(Inc), B(Inc),
/* 127 E> */ B(Star), R(5), B(Star), R(5),
B(LdaContextSlot), R(context), U8(4), /* 127 E> */ B(LdaContextSlot), R(context), U8(4),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(3), B(LdaConstant), U8(3),
B(Star), R(6), B(Star), R(6),
......
...@@ -51,29 +51,28 @@ snippet: " ...@@ -51,29 +51,28 @@ snippet: "
" "
frame size: 5 frame size: 5
parameter count: 1 parameter count: 1
bytecode array length: 61 bytecode array length: 60
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaZero), /* 44 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 71 S> */ B(LdaZero), /* 71 S> */ B(LdaZero),
/* 71 E> */ B(Star), R(1), B(Star), R(1),
/* 76 S> */ B(LdaSmi), U8(10), /* 76 S> */ B(LdaSmi), U8(10),
/* 76 E> */ B(TestLessThan), R(1), /* 76 E> */ B(TestLessThan), R(1),
B(JumpIfFalse), U8(47), B(JumpIfFalse), U8(46),
/* 58 E> */ B(StackCheck), /* 58 E> */ B(StackCheck),
/* 106 S> */ B(LdaZero), /* 106 S> */ B(LdaZero),
/* 106 E> */ B(Star), R(2), B(Star), R(2),
/* 111 S> */ B(LdaSmi), U8(3), /* 111 S> */ B(LdaSmi), U8(3),
/* 111 E> */ B(TestLessThan), R(2), /* 111 E> */ B(TestLessThan), R(2),
B(JumpIfFalse), U8(30), B(JumpIfFalse), U8(29),
/* 93 E> */ B(StackCheck), /* 93 E> */ B(StackCheck),
/* 129 S> */ B(Ldar), R(0), /* 129 S> */ B(Ldar), R(0),
B(Inc), B(Inc),
B(Star), R(0), B(Star), R(0),
/* 142 S> */ B(Nop), /* 142 S> */ B(Ldar), R(2),
/* 150 E> */ B(Ldar), R(2), /* 150 E> */ B(Add), R(1),
B(Add), R(1),
B(Star), R(4), B(Star), R(4),
B(LdaSmi), U8(12), B(LdaSmi), U8(12),
/* 152 E> */ B(TestEqual), R(4), /* 152 E> */ B(TestEqual), R(4),
...@@ -81,12 +80,12 @@ bytecodes: [ ...@@ -81,12 +80,12 @@ bytecodes: [
/* 161 S> */ B(Jump), U8(16), /* 161 S> */ B(Jump), U8(16),
/* 118 S> */ B(Ldar), R(2), /* 118 S> */ B(Ldar), R(2),
B(Inc), B(Inc),
/* 118 E> */ B(Star), R(2), B(Star), R(2),
B(Jump), U8(-32), B(Jump), U8(-31),
/* 84 S> */ B(Ldar), R(1), /* 84 S> */ B(Ldar), R(1),
B(Inc), B(Inc),
/* 84 E> */ B(Star), R(1), B(Star), R(1),
B(Jump), U8(-49), B(Jump), U8(-48),
/* 188 S> */ B(Ldar), R(0), /* 188 S> */ B(Ldar), R(0),
/* 200 S> */ B(Return), /* 200 S> */ B(Return),
] ]
...@@ -188,8 +187,8 @@ bytecodes: [ ...@@ -188,8 +187,8 @@ bytecodes: [
/* 125 S> */ B(PopContext), R(3), /* 125 S> */ B(PopContext), R(3),
B(Jump), U8(27), B(Jump), U8(27),
/* 142 S> */ B(LdaSmi), U8(3), /* 142 S> */ B(LdaSmi), U8(3),
/* 144 E> */ B(Star), R(4), B(Star), R(4),
B(LdaContextSlot), R(context), U8(4), /* 144 E> */ B(LdaContextSlot), R(context), U8(4),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(3), B(LdaConstant), U8(3),
B(Star), R(5), B(Star), R(5),
...@@ -198,8 +197,8 @@ bytecodes: [ ...@@ -198,8 +197,8 @@ bytecodes: [
B(StaContextSlot), R(context), U8(4), B(StaContextSlot), R(context), U8(4),
B(PopContext), R(3), B(PopContext), R(3),
/* 155 S> */ B(LdaSmi), U8(4), /* 155 S> */ B(LdaSmi), U8(4),
/* 157 E> */ B(Star), R(4), B(Star), R(4),
B(LdaContextSlot), R(context), U8(4), /* 157 E> */ B(LdaContextSlot), R(context), U8(4),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(4), B(LdaConstant), U8(4),
B(Star), R(5), B(Star), R(5),
......
...@@ -44,8 +44,8 @@ bytecodes: [ ...@@ -44,8 +44,8 @@ bytecodes: [
/* 63 S> */ B(LdrGlobal), U8(0), U8(3), R(0), /* 63 S> */ B(LdrGlobal), U8(0), U8(3), R(0),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
B(Star), R(1), B(Star), R(1),
/* 70 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(New), R(0), R(1), U8(1), /* 70 E> */ B(New), R(0), R(1), U8(1),
/* 82 S> */ B(Return), /* 82 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -77,8 +77,8 @@ bytecodes: [ ...@@ -77,8 +77,8 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(5), B(LdaSmi), U8(5),
B(Star), R(3), B(Star), R(3),
/* 112 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(New), R(0), R(1), U8(3), /* 112 E> */ B(New), R(0), R(1), U8(3),
/* 130 S> */ B(Return), /* 130 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -24,20 +24,19 @@ snippet: " ...@@ -24,20 +24,19 @@ snippet: "
" "
frame size: 7 frame size: 7
parameter count: 1 parameter count: 1
bytecode array length: 55 bytecode array length: 54
bytecodes: [ bytecodes: [
B(Mov), R(closure), R(0), B(Mov), R(closure), R(0),
/* 99 E> */ B(StackCheck), /* 99 E> */ B(StackCheck),
/* 104 S> */ B(Nop), /* 104 S> */ B(Mov), R(this), R(3),
/* 111 E> */ B(Mov), R(this), R(3),
B(Ldar), R(closure), B(Ldar), R(closure),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(6), B(Star), R(6),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1), /* 111 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
B(Star), R(6), B(Star), R(6),
/* 111 E> */ B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(LdrKeyedProperty), R(6), U8(3), R(4), /* 111 E> */ B(LdrKeyedProperty), R(6), U8(3), R(4),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(5), B(Star), R(5),
B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3), B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3),
...@@ -74,35 +73,33 @@ snippet: " ...@@ -74,35 +73,33 @@ snippet: "
" "
frame size: 6 frame size: 6
parameter count: 1 parameter count: 1
bytecode array length: 77 bytecode array length: 75
bytecodes: [ bytecodes: [
B(Mov), R(closure), R(0), B(Mov), R(closure), R(0),
/* 125 E> */ B(StackCheck), /* 125 E> */ B(StackCheck),
/* 130 S> */ B(Nop), /* 130 S> */ B(Mov), R(this), R(1),
/* 130 E> */ B(Mov), R(this), R(1),
B(Ldar), R(closure), B(Ldar), R(closure),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(5), B(Star), R(5),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), /* 130 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
B(Star), R(5), B(Star), R(5),
/* 130 E> */ B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(LdrKeyedProperty), R(5), U8(1), R(2), /* 130 E> */ B(LdrKeyedProperty), R(5), U8(1), R(2),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
/* 138 E> */ B(Star), R(4), B(Star), R(4),
B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4), /* 138 E> */ B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4),
/* 143 S> */ B(Nop), /* 143 S> */ B(Mov), R(this), R(1),
/* 150 E> */ B(Mov), R(this), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(4), B(Star), R(4),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), /* 150 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
B(Star), R(4), B(Star), R(4),
/* 150 E> */ B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(LdrKeyedProperty), R(4), U8(3), R(2), /* 150 E> */ B(LdrKeyedProperty), R(4), U8(3), R(2),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(3), B(Star), R(3),
B(CallRuntime), U16(Runtime::kLoadFromSuper), R(1), U8(3), B(CallRuntime), U16(Runtime::kLoadFromSuper), R(1), U8(3),
...@@ -146,19 +143,19 @@ bytecodes: [ ...@@ -146,19 +143,19 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(3), B(Star), R(3),
/* 118 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(4), B(Star), R(4),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), /* 118 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
/* 118 E> */ B(New), R(2), R(3), U8(1), /* 118 E> */ B(New), R(2), R(3), U8(1),
/* 118 E> */ B(Star), R(2), B(Star), R(2),
B(Ldar), R(this), B(Ldar), R(this),
B(JumpIfNotHole), U8(4), B(JumpIfNotHole), U8(4),
B(Jump), U8(11), B(Jump), U8(11),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(3), B(Star), R(3),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), /* 118 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
B(Mov), R(2), R(this), B(Mov), R(2), R(this),
/* 128 S> */ B(Ldar), R(this), /* 128 S> */ B(Ldar), R(this),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
...@@ -212,19 +209,19 @@ bytecodes: [ ...@@ -212,19 +209,19 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1), B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
B(Star), R(2), B(Star), R(2),
/* 117 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(3), B(Star), R(3),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), /* 117 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
/* 117 E> */ B(New), R(2), R(0), U8(0), /* 117 E> */ B(New), R(2), R(0), U8(0),
/* 117 E> */ B(Star), R(2), B(Star), R(2),
B(Ldar), R(this), B(Ldar), R(this),
B(JumpIfNotHole), U8(4), B(JumpIfNotHole), U8(4),
B(Jump), U8(11), B(Jump), U8(11),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(3), B(Star), R(3),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), /* 117 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
B(Mov), R(2), R(this), B(Mov), R(2), R(this),
/* 126 S> */ B(Ldar), R(this), /* 126 S> */ B(Ldar), R(this),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
......
...@@ -46,7 +46,7 @@ bytecodes: [ ...@@ -46,7 +46,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5), B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0), B(Star), R(0),
/* 34 E> */ B(Star), R(1), B(Star), R(1),
B(LdaUndefined), B(LdaUndefined),
/* 149 S> */ B(Return), /* 149 S> */ B(Return),
] ]
...@@ -98,7 +98,7 @@ bytecodes: [ ...@@ -98,7 +98,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5), B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0), B(Star), R(0),
/* 34 E> */ B(Star), R(1), B(Star), R(1),
B(LdaUndefined), B(LdaUndefined),
/* 149 S> */ B(Return), /* 149 S> */ B(Return),
] ]
...@@ -172,7 +172,7 @@ bytecodes: [ ...@@ -172,7 +172,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5), B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5),
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
B(Star), R(0), B(Star), R(0),
/* 62 E> */ B(Star), R(1), B(Star), R(1),
B(LdaUndefined), B(LdaUndefined),
/* 129 S> */ B(Return), /* 129 S> */ B(Return),
] ]
......
...@@ -21,7 +21,7 @@ bytecodes: [ ...@@ -21,7 +21,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), U8(2), /* 45 S> */ B(LdaSmi), U8(2),
B(Add), R(0), B(Add), R(0),
B(Mov), R(0), R(1), B(Mov), R(0), R(1),
/* 47 E> */ B(Star), R(0), B(Star), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 53 S> */ B(Return), /* 53 S> */ B(Return),
] ]
...@@ -44,7 +44,7 @@ bytecodes: [ ...@@ -44,7 +44,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), U8(2), /* 45 S> */ B(LdaSmi), U8(2),
B(Div), R(0), B(Div), R(0),
B(Mov), R(0), R(1), B(Mov), R(0), R(1),
/* 47 E> */ B(Star), R(0), B(Star), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 53 S> */ B(Return), /* 53 S> */ B(Return),
] ]
......
...@@ -19,7 +19,7 @@ bytecodes: [ ...@@ -19,7 +19,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), U8(10), /* 44 S> */ B(LdaSmi), U8(10),
/* 44 E> */ B(Star), R(0), B(Star), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 48 S> */ B(Return), /* 48 S> */ B(Return),
] ]
...@@ -65,12 +65,12 @@ bytecodes: [ ...@@ -65,12 +65,12 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 48 S> */ B(LdaSmi), U8(20), /* 48 S> */ B(LdaSmi), U8(20),
/* 48 E> */ B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), /* 48 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
B(Mov), R(1), R(0), B(Mov), R(1), R(0),
B(Ldar), R(0), B(Ldar), R(0),
...@@ -97,12 +97,12 @@ bytecodes: [ ...@@ -97,12 +97,12 @@ bytecodes: [
/* 44 S> */ B(LdaSmi), U8(10), /* 44 S> */ B(LdaSmi), U8(10),
B(Star), R(0), B(Star), R(0),
/* 48 S> */ B(LdaSmi), U8(20), /* 48 S> */ B(LdaSmi), U8(20),
/* 50 E> */ B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), /* 50 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0), B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
B(Mov), R(1), R(0), B(Mov), R(1), R(0),
B(LdaUndefined), B(LdaUndefined),
......
...@@ -80,8 +80,8 @@ bytecodes: [ ...@@ -80,8 +80,8 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 47 S> */ B(LdaSmi), U8(20), /* 47 S> */ B(LdaSmi), U8(20),
/* 47 E> */ B(Star), R(2), B(Star), R(2),
B(LdaContextSlot), R(context), U8(4), /* 47 E> */ B(LdaContextSlot), R(context), U8(4),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(3), B(Star), R(3),
...@@ -118,8 +118,8 @@ bytecodes: [ ...@@ -118,8 +118,8 @@ bytecodes: [
/* 44 S> */ B(LdaSmi), U8(10), /* 44 S> */ B(LdaSmi), U8(10),
/* 44 E> */ B(StaContextSlot), R(context), U8(4), /* 44 E> */ B(StaContextSlot), R(context), U8(4),
/* 48 S> */ B(LdaSmi), U8(20), /* 48 S> */ B(LdaSmi), U8(20),
/* 50 E> */ B(Star), R(2), B(Star), R(2),
B(LdaContextSlot), R(context), U8(4), /* 50 E> */ B(LdaContextSlot), R(context), U8(4),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(3), B(Star), R(3),
......
...@@ -41,7 +41,7 @@ bytecodes: [ ...@@ -41,7 +41,7 @@ bytecodes: [
/* 45 S> */ B(ToNumber), /* 45 S> */ B(ToNumber),
B(Star), R(1), B(Star), R(1),
B(Inc), B(Inc),
/* 53 E> */ B(Star), R(0), B(Star), R(0),
B(Ldar), R(1), B(Ldar), R(1),
/* 57 S> */ B(Return), /* 57 S> */ B(Return),
] ]
...@@ -84,7 +84,7 @@ bytecodes: [ ...@@ -84,7 +84,7 @@ bytecodes: [
/* 45 S> */ B(ToNumber), /* 45 S> */ B(ToNumber),
B(Star), R(1), B(Star), R(1),
B(Dec), B(Dec),
/* 53 E> */ B(Star), R(0), B(Star), R(0),
B(Ldar), R(1), B(Ldar), R(1),
/* 57 S> */ B(Return), /* 57 S> */ B(Return),
] ]
...@@ -150,7 +150,7 @@ snippet: " ...@@ -150,7 +150,7 @@ snippet: "
" "
frame size: 5 frame size: 5
parameter count: 1 parameter count: 1
bytecode array length: 30 bytecode array length: 29
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaConstant), U8(0), /* 45 S> */ B(LdaConstant), U8(0),
...@@ -158,9 +158,8 @@ bytecodes: [ ...@@ -158,9 +158,8 @@ bytecodes: [
/* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1), /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
B(Star), R(2), B(Star), R(2),
B(Star), R(1), B(Star), R(1),
/* 72 S> */ B(Nop), /* 72 S> */ B(Ldar), R(0),
/* 81 E> */ B(Ldar), R(0), /* 81 E> */ B(LdaKeyedProperty), R(1), U8(1),
B(LdaKeyedProperty), R(1), U8(1),
B(ToNumber), B(ToNumber),
B(Star), R(4), B(Star), R(4),
B(Dec), B(Dec),
...@@ -181,7 +180,7 @@ snippet: " ...@@ -181,7 +180,7 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 25 bytecode array length: 24
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaConstant), U8(0), /* 45 S> */ B(LdaConstant), U8(0),
...@@ -189,9 +188,8 @@ bytecodes: [ ...@@ -189,9 +188,8 @@ bytecodes: [
/* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1), /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
B(Star), R(2), B(Star), R(2),
B(Star), R(1), B(Star), R(1),
/* 72 S> */ B(Nop), /* 72 S> */ B(Ldar), R(0),
/* 83 E> */ B(Ldar), R(0), /* 83 E> */ B(LdaKeyedProperty), R(1), U8(1),
B(LdaKeyedProperty), R(1), U8(1),
B(Inc), B(Inc),
/* 87 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(3), /* 87 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(3),
/* 90 S> */ B(Return), /* 90 S> */ B(Return),
...@@ -275,7 +273,7 @@ bytecodes: [ ...@@ -275,7 +273,7 @@ bytecodes: [
B(ToNumber), B(ToNumber),
B(Star), R(3), B(Star), R(3),
B(Inc), B(Inc),
/* 75 E> */ B(Star), R(0), B(Star), R(0),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
/* 79 E> */ B(StaKeyedPropertySloppy), R(1), R(3), U8(1), /* 79 E> */ B(StaKeyedPropertySloppy), R(1), R(3), U8(1),
/* 84 S> */ B(Return), /* 84 S> */ B(Return),
......
...@@ -35,14 +35,13 @@ snippet: " ...@@ -35,14 +35,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 10 bytecode array length: 9
bytecodes: [ bytecodes: [
B(CreateMappedArguments), B(CreateMappedArguments),
B(Star), R(0), B(Star), R(0),
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 15 S> */ B(Nop), /* 15 S> */ B(LdaZero),
/* 31 E> */ B(LdaZero), /* 31 E> */ B(LdaKeyedProperty), R(0), U8(1),
B(LdaKeyedProperty), R(0), U8(1),
/* 36 S> */ B(Return), /* 36 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -77,7 +76,7 @@ snippet: " ...@@ -77,7 +76,7 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 2 parameter count: 2
bytecode array length: 22 bytecode array length: 21
bytecodes: [ bytecodes: [
B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
B(PushContext), R(1), B(PushContext), R(1),
...@@ -86,9 +85,8 @@ bytecodes: [ ...@@ -86,9 +85,8 @@ bytecodes: [
B(CreateMappedArguments), B(CreateMappedArguments),
B(Star), R(0), B(Star), R(0),
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 16 S> */ B(Nop), /* 16 S> */ B(LdaZero),
/* 32 E> */ B(LdaZero), /* 32 E> */ B(LdaKeyedProperty), R(0), U8(1),
B(LdaKeyedProperty), R(0), U8(1),
/* 37 S> */ B(Return), /* 37 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -58,7 +58,7 @@ snippet: " ...@@ -58,7 +58,7 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 2 parameter count: 2
bytecode array length: 16 bytecode array length: 15
bytecodes: [ bytecodes: [
B(CreateRestParameter), B(CreateRestParameter),
B(Star), R(0), B(Star), R(0),
...@@ -66,9 +66,8 @@ bytecodes: [ ...@@ -66,9 +66,8 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(1), B(Mov), R(arg0), R(1),
/* 29 S> */ B(Nop), /* 29 S> */ B(LdaZero),
/* 44 E> */ B(LdaZero), /* 44 E> */ B(LdaKeyedProperty), R(0), U8(1),
B(LdaKeyedProperty), R(0), U8(1),
/* 49 S> */ B(Return), /* 49 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -83,7 +82,7 @@ snippet: " ...@@ -83,7 +82,7 @@ snippet: "
" "
frame size: 5 frame size: 5
parameter count: 2 parameter count: 2
bytecode array length: 29 bytecode array length: 25
bytecodes: [ bytecodes: [
B(CreateUnmappedArguments), B(CreateUnmappedArguments),
B(Star), R(0), B(Star), R(0),
...@@ -93,13 +92,10 @@ bytecodes: [ ...@@ -93,13 +92,10 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(2), B(Mov), R(arg0), R(2),
/* 29 S> */ B(Nop), /* 29 S> */ B(LdaZero),
/* 44 E> */ B(LdaZero), /* 44 E> */ B(LdrKeyedProperty), R(1), U8(1), R(4),
B(LdrKeyedProperty), R(1), U8(1), R(4), B(LdaZero),
B(Ldar), R(4), /* 59 E> */ B(LdaKeyedProperty), R(0), U8(3),
/* 50 E> */ B(Nop),
/* 59 E> */ B(LdaZero),
B(LdaKeyedProperty), R(0), U8(3),
B(Add), R(4), B(Add), R(4),
/* 64 S> */ B(Return), /* 64 S> */ B(Return),
] ]
......
...@@ -34,7 +34,7 @@ bytecode array length: 7 ...@@ -34,7 +34,7 @@ bytecode array length: 7
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 66 S> */ B(LdaSmi), U8(1), /* 66 S> */ B(LdaSmi), U8(1),
/* 66 E> */ B(Star), R(0), B(Star), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 69 S> */ B(Return), /* 69 S> */ B(Return),
] ]
......
...@@ -14,11 +14,10 @@ snippet: " ...@@ -14,11 +14,10 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 1 parameter count: 1
bytecode array length: 8 bytecode array length: 7
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(Nop), /* 42 S> */ B(Mov), R(0), R(1),
B(Mov), R(0), R(1),
/* 50 S> */ B(Ldar), R(1), /* 50 S> */ B(Ldar), R(1),
/* 60 S> */ B(Return), /* 60 S> */ B(Return),
] ]
...@@ -33,14 +32,13 @@ snippet: " ...@@ -33,14 +32,13 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 14 bytecode array length: 13
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 55 S> */ B(LdaSmi), U8(100), /* 55 S> */ B(LdaSmi), U8(100),
B(Star), R(1), B(Star), R(1),
/* 42 S> */ B(LdrUndefined), R(0), /* 42 S> */ B(LdrUndefined), R(0),
B(Ldar), R(0), B(Ldar), R(0),
/* 42 E> */ B(Nop),
B(Star), R(2), B(Star), R(2),
/* 63 S> */ B(Nop), /* 63 S> */ B(Nop),
/* 73 S> */ B(Return), /* 73 S> */ B(Return),
...@@ -56,21 +54,20 @@ snippet: " ...@@ -56,21 +54,20 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 1 parameter count: 1
bytecode array length: 25 bytecode array length: 24
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 34 E> */ B(StackCheck), /* 34 E> */ B(StackCheck),
/* 56 S> */ B(LdaSmi), U8(10), /* 56 S> */ B(LdaSmi), U8(10),
B(Star), R(1), B(Star), R(1),
/* 69 S> */ B(Inc), /* 69 S> */ B(Inc),
/* 71 E> */ B(Star), R(1), B(Star), R(1),
B(Star), R(0), B(Star), R(0),
/* 74 S> */ B(Jump), U8(12), /* 74 S> */ B(Jump), U8(11),
/* 64 E> */ B(Nop),
B(Mov), R(0), R(1), B(Mov), R(0), R(1),
/* 84 S> */ B(LdaSmi), U8(20), /* 84 S> */ B(LdaSmi), U8(20),
/* 86 E> */ B(Star), R(1), B(Star), R(1),
B(Jump), U8(-20), B(Jump), U8(-19),
B(LdaUndefined), B(LdaUndefined),
/* 94 S> */ B(Return), /* 94 S> */ B(Return),
] ]
......
...@@ -105,34 +105,33 @@ snippet: " ...@@ -105,34 +105,33 @@ snippet: "
" "
frame size: 9 frame size: 9
parameter count: 1 parameter count: 1
bytecode array length: 55 bytecode array length: 54
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(1), B(Star), R(1),
/* 59 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), /* 59 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
B(JumpIfUndefined), U8(45), B(JumpIfUndefined), U8(44),
B(JumpIfNull), U8(43), B(JumpIfNull), U8(42),
B(ToObject), B(ToObject),
B(ForInPrepare), R(4), B(ForInPrepare), R(4),
B(Star), R(3), B(Star), R(3),
B(LdaZero), B(LdaZero),
B(Star), R(7), B(Star), R(7),
/* 54 S> */ B(ForInDone), R(7), R(6), /* 54 S> */ B(ForInDone), R(7), R(6),
B(JumpIfTrue), U8(30), B(JumpIfTrue), U8(29),
B(ForInNext), R(3), R(7), R(4), U8(1), B(ForInNext), R(3), R(7), R(4), U8(1),
B(JumpIfUndefined), U8(17), B(JumpIfUndefined), U8(16),
B(Star), R(0), B(Star), R(0),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
B(Star), R(2), B(Star), R(2),
/* 70 S> */ B(Nop), /* 70 S> */ B(Ldar), R(0),
/* 75 E> */ B(Ldar), R(0), /* 75 E> */ B(Add), R(1),
B(Add), R(1),
B(Mov), R(1), R(8), B(Mov), R(1), R(8),
/* 72 E> */ B(Star), R(1), B(Star), R(1),
B(ForInStep), R(7), /* 72 E> */ B(ForInStep), R(7),
B(Star), R(7), B(Star), R(7),
B(Jump), U8(-31), B(Jump), U8(-30),
B(LdaUndefined), B(LdaUndefined),
/* 80 S> */ B(Return), /* 80 S> */ B(Return),
] ]
...@@ -152,27 +151,26 @@ snippet: " ...@@ -152,27 +151,26 @@ snippet: "
" "
frame size: 8 frame size: 8
parameter count: 1 parameter count: 1
bytecode array length: 82 bytecode array length: 80
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
B(Star), R(1), B(Star), R(1),
B(Star), R(0), B(Star), R(0),
/* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3), /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
B(JumpIfUndefined), U8(67), B(JumpIfUndefined), U8(65),
B(JumpIfNull), U8(65), B(JumpIfNull), U8(63),
B(ToObject), B(ToObject),
B(ForInPrepare), R(2), B(ForInPrepare), R(2),
B(Star), R(1), B(Star), R(1),
B(LdaZero), B(LdaZero),
B(Star), R(5), B(Star), R(5),
/* 68 S> */ B(ForInDone), R(5), R(4), /* 68 S> */ B(ForInDone), R(5), R(4),
B(JumpIfTrue), U8(52), B(JumpIfTrue), U8(50),
B(ForInNext), R(1), R(5), R(2), U8(9), B(ForInNext), R(1), R(5), R(2), U8(9),
B(JumpIfUndefined), U8(39), B(JumpIfUndefined), U8(37),
B(Star), R(6), B(Star), R(6),
/* 67 E> */ B(Ldar), R(6), /* 67 E> */ B(StaNamedPropertySloppy), R(0), U8(2), U8(7),
B(StaNamedPropertySloppy), R(0), U8(2), U8(7),
/* 62 E> */ B(StackCheck), /* 62 E> */ B(StackCheck),
/* 95 S> */ B(Nop), /* 95 S> */ B(Nop),
/* 100 E> */ B(LdrNamedProperty), R(0), U8(2), U8(3), R(7), /* 100 E> */ B(LdrNamedProperty), R(0), U8(2), U8(3), R(7),
...@@ -188,7 +186,7 @@ bytecodes: [ ...@@ -188,7 +186,7 @@ bytecodes: [
/* 143 S> */ B(Jump), U8(8), /* 143 S> */ B(Jump), U8(8),
B(ForInStep), R(5), B(ForInStep), R(5),
B(Star), R(5), B(Star), R(5),
B(Jump), U8(-53), B(Jump), U8(-51),
B(LdaUndefined), B(LdaUndefined),
/* 152 S> */ B(Return), /* 152 S> */ B(Return),
] ]
...@@ -207,36 +205,35 @@ snippet: " ...@@ -207,36 +205,35 @@ snippet: "
" "
frame size: 9 frame size: 9
parameter count: 1 parameter count: 1
bytecode array length: 62 bytecode array length: 61
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
B(Star), R(0), B(Star), R(0),
/* 72 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3), /* 72 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
B(JumpIfUndefined), U8(49), B(JumpIfUndefined), U8(48),
B(JumpIfNull), U8(47), B(JumpIfNull), U8(46),
B(ToObject), B(ToObject),
B(ForInPrepare), R(2), B(ForInPrepare), R(2),
B(Star), R(1), B(Star), R(1),
B(LdaZero), B(LdaZero),
B(Star), R(5), B(Star), R(5),
/* 65 S> */ B(ForInDone), R(5), R(4), /* 65 S> */ B(ForInDone), R(5), R(4),
B(JumpIfTrue), U8(34), B(JumpIfTrue), U8(33),
B(ForInNext), R(1), R(5), R(2), U8(7), B(ForInNext), R(1), R(5), R(2), U8(7),
B(JumpIfUndefined), U8(21), B(JumpIfUndefined), U8(20),
B(Star), R(6), B(Star), R(6),
/* 64 E> */ B(LdaZero), B(LdaZero),
B(Star), R(8), B(Star), R(8),
B(Ldar), R(6), B(Ldar), R(6),
B(StaKeyedPropertySloppy), R(0), R(8), U8(5), /* 64 E> */ B(StaKeyedPropertySloppy), R(0), R(8), U8(5),
/* 59 E> */ B(StackCheck), /* 59 E> */ B(StackCheck),
/* 83 S> */ B(Nop), /* 83 S> */ B(LdaSmi), U8(3),
/* 91 E> */ B(LdaSmi), U8(3), /* 91 E> */ B(LdaKeyedProperty), R(0), U8(3),
B(LdaKeyedProperty), R(0), U8(3),
/* 98 S> */ B(Return), /* 98 S> */ B(Return),
B(ForInStep), R(5), B(ForInStep), R(5),
B(Star), R(5), B(Star), R(5),
B(Jump), U8(-35), B(Jump), U8(-34),
B(LdaUndefined), B(LdaUndefined),
/* 98 S> */ B(Return), /* 98 S> */ B(Return),
] ]
......
...@@ -23,14 +23,14 @@ bytecodes: [ ...@@ -23,14 +23,14 @@ bytecodes: [
B(Mov), R(context), R(12), B(Mov), R(context), R(12),
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
B(Star), R(14), B(Star), R(14),
/* 48 E> */ B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(LdrKeyedProperty), R(14), U8(3), R(13), /* 48 E> */ B(LdrKeyedProperty), R(14), U8(3), R(13),
/* 48 E> */ B(Call), R(13), R(14), U8(1), U8(1), /* 48 E> */ B(Call), R(13), R(14), U8(1), U8(1),
/* 48 E> */ B(Star), R(1), B(Star), R(1),
/* 45 S> */ B(LdrNamedProperty), R(1), U8(2), U8(7), R(14), /* 45 S> */ B(LdrNamedProperty), R(1), U8(2), U8(7), R(14),
/* 45 E> */ B(Call), R(14), R(1), U8(1), U8(5), /* 45 E> */ B(Call), R(14), R(1), U8(1), U8(5),
/* 45 E> */ B(Star), R(2), B(Star), R(2),
B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(2), U8(1), /* 45 E> */ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(2), U8(1),
B(ToBooleanLogicalNot), B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7), B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
...@@ -155,25 +155,24 @@ snippet: " ...@@ -155,25 +155,24 @@ snippet: "
" "
frame size: 17 frame size: 17
parameter count: 1 parameter count: 1
bytecode array length: 302 bytecode array length: 301
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaConstant), U8(0), /* 42 S> */ B(LdaConstant), U8(0),
/* 42 E> */ B(Star), R(7), B(Star), R(7),
B(LdrUndefined), R(4), B(LdrUndefined), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(3), B(Star), R(3),
B(Mov), R(context), R(12), B(Mov), R(context), R(12),
B(Mov), R(context), R(13), B(Mov), R(context), R(13),
/* 68 S> */ B(Nop), /* 68 S> */ B(LdaConstant), U8(1),
/* 68 E> */ B(LdaConstant), U8(1), /* 68 E> */ B(LdrKeyedProperty), R(7), U8(3), R(14),
B(LdrKeyedProperty), R(7), U8(3), R(14),
/* 68 E> */ B(Call), R(14), R(7), U8(1), U8(1), /* 68 E> */ B(Call), R(14), R(7), U8(1), U8(1),
/* 68 E> */ B(Star), R(1), B(Star), R(1),
/* 65 S> */ B(LdrNamedProperty), R(1), U8(2), U8(7), R(15), /* 65 S> */ B(LdrNamedProperty), R(1), U8(2), U8(7), R(15),
/* 65 E> */ B(Call), R(15), R(1), U8(1), U8(5), /* 65 E> */ B(Call), R(15), R(1), U8(1), U8(5),
/* 65 E> */ B(Star), R(2), B(Star), R(2),
B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(2), U8(1), /* 65 E> */ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(2), U8(1),
B(ToBooleanLogicalNot), B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7), B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
...@@ -293,9 +292,9 @@ constant pool: [ ...@@ -293,9 +292,9 @@ constant pool: [
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
] ]
handlers: [ handlers: [
[13, 127, 133], [13, 126, 132],
[16, 86, 88], [16, 85, 87],
[207, 218, 220], [206, 217, 219],
] ]
--- ---
...@@ -317,14 +316,14 @@ bytecodes: [ ...@@ -317,14 +316,14 @@ bytecodes: [
B(Mov), R(context), R(12), B(Mov), R(context), R(12),
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
B(Star), R(14), B(Star), R(14),
/* 48 E> */ B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(LdrKeyedProperty), R(14), U8(3), R(13), /* 48 E> */ B(LdrKeyedProperty), R(14), U8(3), R(13),
/* 48 E> */ B(Call), R(13), R(14), U8(1), U8(1), /* 48 E> */ B(Call), R(13), R(14), U8(1), U8(1),
/* 48 E> */ B(Star), R(1), B(Star), R(1),
/* 45 S> */ B(LdrNamedProperty), R(1), U8(2), U8(7), R(14), /* 45 S> */ B(LdrNamedProperty), R(1), U8(2), U8(7), R(14),
/* 45 E> */ B(Call), R(14), R(1), U8(1), U8(5), /* 45 E> */ B(Call), R(14), R(1), U8(1), U8(5),
/* 45 E> */ B(Star), R(2), B(Star), R(2),
B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(2), U8(1), /* 45 E> */ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(2), U8(1),
B(ToBooleanLogicalNot), B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7), B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
...@@ -462,7 +461,7 @@ bytecodes: [ ...@@ -462,7 +461,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
B(Star), R(8), B(Star), R(8),
/* 42 E> */ B(Star), R(6), B(Star), R(6),
B(LdrUndefined), R(3), B(LdrUndefined), R(3),
B(LdaZero), B(LdaZero),
B(Star), R(2), B(Star), R(2),
...@@ -470,14 +469,14 @@ bytecodes: [ ...@@ -470,14 +469,14 @@ bytecodes: [
B(Mov), R(context), R(11), B(Mov), R(context), R(11),
/* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3), /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(3),
B(Star), R(13), B(Star), R(13),
/* 77 E> */ B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(LdrKeyedProperty), R(13), U8(3), R(12), /* 77 E> */ B(LdrKeyedProperty), R(13), U8(3), R(12),
/* 77 E> */ B(Call), R(12), R(13), U8(1), U8(1), /* 77 E> */ B(Call), R(12), R(13), U8(1), U8(1),
/* 77 E> */ B(Star), R(0), B(Star), R(0),
/* 74 S> */ B(LdrNamedProperty), R(0), U8(3), U8(7), R(13), /* 74 S> */ B(LdrNamedProperty), R(0), U8(3), U8(7), R(13),
/* 74 E> */ B(Call), R(13), R(0), U8(1), U8(5), /* 74 E> */ B(Call), R(13), R(0), U8(1), U8(5),
/* 74 E> */ B(Star), R(1), B(Star), R(1),
B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(1), U8(1), /* 74 E> */ B(InvokeIntrinsic), U16(Runtime::k_IsJSReceiver), R(1), U8(1),
B(ToBooleanLogicalNot), B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7), B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(1), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(1), U8(1),
......
...@@ -335,8 +335,8 @@ bytecodes: [ ...@@ -335,8 +335,8 @@ bytecodes: [
B(Mov), R(context), R(10), B(Mov), R(context), R(10),
/* 30 S> */ B(CreateArrayLiteral), U8(1), U8(0), U8(3), /* 30 S> */ B(CreateArrayLiteral), U8(1), U8(0), U8(3),
B(Star), R(12), B(Star), R(12),
/* 30 E> */ B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(LdrKeyedProperty), R(12), U8(3), R(11), /* 30 E> */ B(LdrKeyedProperty), R(12), U8(3), R(11),
/* 30 E> */ B(Call), R(11), R(12), U8(1), U8(1), /* 30 E> */ B(Call), R(11), R(12), U8(1), U8(1),
/* 30 E> */ B(StaContextSlot), R(1), U8(7), /* 30 E> */ B(StaContextSlot), R(1), U8(7),
B(LdaSmi), U8(-2), B(LdaSmi), U8(-2),
......
...@@ -845,7 +845,7 @@ bytecodes: [ ...@@ -845,7 +845,7 @@ bytecodes: [
/* 2846 S> */ B(LdaConstant), U8(255), /* 2846 S> */ B(LdaConstant), U8(255),
B(Star), R(0), B(Star), R(0),
/* 2857 S> */ B(Wide), B(LdaConstant), U16(256), /* 2857 S> */ B(Wide), B(LdaConstant), U16(256),
/* 2859 E> */ B(Star), R(0), B(Star), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 2867 S> */ B(Return), /* 2867 S> */ B(Return),
] ]
......
...@@ -957,7 +957,7 @@ bytecodes: [ ...@@ -957,7 +957,7 @@ bytecodes: [
/* 4085 S> */ B(Wide), B(LdaConstant), U16(311), /* 4085 S> */ B(Wide), B(LdaConstant), U16(311),
B(Star), R(0), B(Star), R(0),
/* 4103 S> */ B(LdaZero), /* 4103 S> */ B(LdaZero),
/* 4103 E> */ B(Star), R(1), B(Star), R(1),
/* 4108 S> */ B(LdaSmi), U8(3), /* 4108 S> */ B(LdaSmi), U8(3),
/* 4108 E> */ B(TestLessThan), R(1), /* 4108 E> */ B(TestLessThan), R(1),
B(Wide), B(JumpIfFalse), U16(38), B(Wide), B(JumpIfFalse), U16(38),
...@@ -974,7 +974,7 @@ bytecodes: [ ...@@ -974,7 +974,7 @@ bytecodes: [
B(ToNumber), B(ToNumber),
B(Star), R(2), B(Star), R(2),
B(Inc), B(Inc),
/* 4114 E> */ B(Star), R(1), B(Star), R(1),
B(Jump), U8(-41), B(Jump), U8(-41),
/* 4167 S> */ B(LdaSmi), U8(3), /* 4167 S> */ B(LdaSmi), U8(3),
/* 4177 S> */ B(Return), /* 4177 S> */ B(Return),
......
...@@ -19,7 +19,7 @@ bytecodes: [ ...@@ -19,7 +19,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 46 S> */ B(Return), /* 46 S> */ B(Return),
] ]
...@@ -65,12 +65,12 @@ bytecodes: [ ...@@ -65,12 +65,12 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaSmi), U8(20), /* 45 S> */ B(LdaSmi), U8(20),
/* 45 E> */ B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), /* 45 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
B(Mov), R(1), R(0), B(Mov), R(1), R(0),
B(Ldar), R(0), B(Ldar), R(0),
B(LdaUndefined), B(LdaUndefined),
...@@ -96,12 +96,12 @@ bytecodes: [ ...@@ -96,12 +96,12 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(20), /* 46 S> */ B(LdaSmi), U8(20),
/* 48 E> */ B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), /* 48 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
B(Mov), R(1), R(0), B(Mov), R(1), R(0),
B(LdaUndefined), B(LdaUndefined),
/* 54 S> */ B(Return), /* 54 S> */ B(Return),
......
...@@ -80,8 +80,8 @@ bytecodes: [ ...@@ -80,8 +80,8 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaSmi), U8(20), /* 45 S> */ B(LdaSmi), U8(20),
/* 45 E> */ B(Star), R(2), B(Star), R(2),
B(LdaContextSlot), R(context), U8(4), /* 45 E> */ B(LdaContextSlot), R(context), U8(4),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(3), B(Star), R(3),
...@@ -117,8 +117,8 @@ bytecodes: [ ...@@ -117,8 +117,8 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
/* 42 E> */ B(StaContextSlot), R(context), U8(4), /* 42 E> */ B(StaContextSlot), R(context), U8(4),
/* 46 S> */ B(LdaSmi), U8(20), /* 46 S> */ B(LdaSmi), U8(20),
/* 48 E> */ B(Star), R(2), B(Star), R(2),
B(LdaContextSlot), R(context), U8(4), /* 48 E> */ B(LdaContextSlot), R(context), U8(4),
B(JumpIfNotHole), U8(11), B(JumpIfNotHole), U8(11),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(3), B(Star), R(3),
......
...@@ -58,8 +58,8 @@ bytecodes: [ ...@@ -58,8 +58,8 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
B(Star), R(1), B(Star), R(1),
/* 75 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(StaNamedPropertySloppy), R(1), U8(1), U8(1), /* 75 E> */ B(StaNamedPropertySloppy), R(1), U8(1), U8(1),
B(Ldar), R(1), B(Ldar), R(1),
/* 80 S> */ B(Return), /* 80 S> */ B(Return),
] ]
...@@ -76,16 +76,15 @@ snippet: " ...@@ -76,16 +76,15 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 1 parameter count: 1
bytecode array length: 23 bytecode array length: 22
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
B(Star), R(1), B(Star), R(1),
/* 59 E> */ B(Nop), B(LdaSmi), U8(1),
/* 67 E> */ B(LdaSmi), U8(1), /* 67 E> */ B(Add), R(0),
B(Add), R(0),
B(StaNamedPropertySloppy), R(1), U8(1), U8(1), B(StaNamedPropertySloppy), R(1), U8(1), U8(1),
B(Ldar), R(1), B(Ldar), R(1),
/* 76 S> */ B(Return), /* 76 S> */ B(Return),
...@@ -257,11 +256,11 @@ bytecodes: [ ...@@ -257,11 +256,11 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(3), B(Star), R(3),
/* 57 E> */ B(LdaZero), B(LdaZero),
B(Star), R(5), B(Star), R(5),
B(Mov), R(1), R(2), B(Mov), R(1), R(2),
B(Mov), R(0), R(4), B(Mov), R(0), R(4),
B(CallRuntime), U16(Runtime::kSetProperty), R(2), U8(4), /* 57 E> */ B(CallRuntime), U16(Runtime::kSetProperty), R(2), U8(4),
B(Ldar), R(1), B(Ldar), R(1),
/* 62 S> */ B(Return), /* 62 S> */ B(Return),
] ]
...@@ -308,8 +307,8 @@ bytecodes: [ ...@@ -308,8 +307,8 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(35), /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(35),
B(Star), R(1), B(Star), R(1),
/* 60 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(ToName), /* 60 E> */ B(ToName),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(4), B(Star), R(4),
...@@ -342,8 +341,8 @@ bytecodes: [ ...@@ -342,8 +341,8 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1), /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
B(Star), R(1), B(Star), R(1),
/* 64 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(StaNamedPropertySloppy), R(1), U8(2), U8(1), /* 64 E> */ B(StaNamedPropertySloppy), R(1), U8(2), U8(1),
/* 68 E> */ B(ToName), /* 68 E> */ B(ToName),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
...@@ -378,8 +377,8 @@ bytecodes: [ ...@@ -378,8 +377,8 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 50 S> */ B(CreateObjectLiteral), U8(1), U8(1), U8(35), /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(1), U8(35),
B(Star), R(1), B(Star), R(1),
/* 60 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(ToName), /* 60 E> */ B(ToName),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(4), B(Star), R(4),
...@@ -417,8 +416,8 @@ bytecodes: [ ...@@ -417,8 +416,8 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(35), /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(35),
B(Star), R(1), B(Star), R(1),
/* 60 E> */ B(Ldar), R(0), B(Ldar), R(0),
B(ToName), /* 60 E> */ B(ToName),
B(Star), R(3), B(Star), R(3),
B(LdaConstant), U8(2), B(LdaConstant), U8(2),
B(Star), R(4), B(Star), R(4),
......
...@@ -50,12 +50,11 @@ snippet: " ...@@ -50,12 +50,11 @@ snippet: "
" "
frame size: 2 frame size: 2
parameter count: 1 parameter count: 1
bytecode array length: 17 bytecode array length: 16
bytecodes: [ bytecodes: [
/* 97 E> */ B(StackCheck), /* 97 E> */ B(StackCheck),
/* 102 S> */ B(LdaContextSlot), R(context), U8(4), /* 102 S> */ B(LdrContextSlot), R(context), U8(4), R(0),
/* 111 E> */ B(Star), R(0), /* 111 E> */ B(LdrContextSlot), R(context), U8(1), R(1),
B(LdrContextSlot), R(context), U8(1), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(StaContextSlot), R(1), U8(4), B(StaContextSlot), R(1), U8(4),
B(LdaUndefined), B(LdaUndefined),
......
...@@ -109,7 +109,7 @@ bytecode array length: 7 ...@@ -109,7 +109,7 @@ bytecode array length: 7
bytecodes: [ bytecodes: [
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 19 S> */ B(LdaSmi), U8(1), /* 19 S> */ B(LdaSmi), U8(1),
/* 24 E> */ B(Star), R(arg0), B(Star), R(arg0),
B(LdaUndefined), B(LdaUndefined),
/* 29 S> */ B(Return), /* 29 S> */ B(Return),
] ]
...@@ -129,7 +129,7 @@ bytecode array length: 7 ...@@ -129,7 +129,7 @@ bytecode array length: 7
bytecodes: [ bytecodes: [
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 37 S> */ B(LdaSmi), U8(1), /* 37 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(arg1), B(Star), R(arg1),
B(LdaUndefined), B(LdaUndefined),
/* 47 S> */ B(Return), /* 47 S> */ B(Return),
] ]
......
...@@ -36,14 +36,13 @@ snippet: " ...@@ -36,14 +36,13 @@ snippet: "
" "
frame size: 4 frame size: 4
parameter count: 4 parameter count: 4
bytecode array length: 25 bytecode array length: 24
bytecodes: [ bytecodes: [
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 22 S> */ B(Nop), /* 22 S> */ B(Nop),
/* 30 E> */ B(LdrNamedProperty), R(arg0), U8(0), U8(3), R(0), /* 30 E> */ B(LdrNamedProperty), R(arg0), U8(0), U8(3), R(0),
B(Ldar), R(0), B(Ldar), R(0),
/* 36 E> */ B(Nop), B(Mov), R(arg0), R(1),
/* 39 E> */ B(Mov), R(arg0), R(1),
B(Mov), R(arg1), R(2), B(Mov), R(arg1), R(2),
B(Mov), R(arg2), R(3), B(Mov), R(arg2), R(3),
/* 31 E> */ B(Call), R(0), R(1), U8(3), U8(1), /* 31 E> */ B(Call), R(0), R(1), U8(3), U8(1),
...@@ -62,17 +61,15 @@ snippet: " ...@@ -62,17 +61,15 @@ snippet: "
" "
frame size: 4 frame size: 4
parameter count: 3 parameter count: 3
bytecode array length: 28 bytecode array length: 25
bytecodes: [ bytecodes: [
/* 10 E> */ B(StackCheck), /* 10 E> */ B(StackCheck),
/* 19 S> */ B(Nop), /* 19 S> */ B(Nop),
/* 27 E> */ B(LdrNamedProperty), R(arg0), U8(0), U8(3), R(0), /* 27 E> */ B(LdrNamedProperty), R(arg0), U8(0), U8(3), R(0),
B(Ldar), R(0), B(Ldar), R(arg1),
/* 33 E> */ B(Nop), /* 37 E> */ B(Add), R(arg1),
/* 37 E> */ B(Ldar), R(arg1),
B(Add), R(arg1),
B(Star), R(2), B(Star), R(2),
/* 40 E> */ B(Mov), R(arg0), R(1), B(Mov), R(arg0), R(1),
B(Mov), R(arg1), R(3), B(Mov), R(arg1), R(3),
/* 28 E> */ B(Call), R(0), R(1), U8(3), U8(1), /* 28 E> */ B(Call), R(0), R(1), U8(3), U8(1),
/* 44 S> */ B(Return), /* 44 S> */ B(Return),
......
...@@ -18,21 +18,20 @@ snippet: " ...@@ -18,21 +18,20 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 26 bytecode array length: 25
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
/* 45 E> */ B(Star), R(0), B(Star), R(0),
/* 48 E> */ B(StackCheck), /* 48 E> */ B(StackCheck),
/* 64 S> */ B(Nop), /* 64 S> */ B(Ldar), R(0),
/* 78 E> */ B(Ldar), R(0), /* 78 E> */ B(Add), R(0),
B(Add), R(0),
B(Star), R(0), B(Star), R(0),
/* 86 S> */ B(LdaSmi), U8(10), /* 86 S> */ B(LdaSmi), U8(10),
/* 95 E> */ B(TestGreaterThan), R(0), /* 95 E> */ B(TestGreaterThan), R(0),
B(JumpIfFalse), U8(4), B(JumpIfFalse), U8(4),
/* 101 S> */ B(Jump), U8(4), /* 101 S> */ B(Jump), U8(4),
B(Jump), U8(-16), B(Jump), U8(-15),
/* 110 S> */ B(Ldar), R(0), /* 110 S> */ B(Ldar), R(0),
/* 123 S> */ B(Return), /* 123 S> */ B(Return),
] ]
...@@ -52,15 +51,14 @@ snippet: " ...@@ -52,15 +51,14 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 24 bytecode array length: 23
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
/* 45 E> */ B(Star), R(0), B(Star), R(0),
/* 48 E> */ B(StackCheck), /* 48 E> */ B(StackCheck),
/* 55 S> */ B(Nop), /* 55 S> */ B(Ldar), R(0),
/* 69 E> */ B(Ldar), R(0), /* 69 E> */ B(Add), R(0),
B(Add), R(0),
B(Star), R(0), B(Star), R(0),
/* 77 S> */ B(LdaSmi), U8(10), /* 77 S> */ B(LdaSmi), U8(10),
/* 86 E> */ B(TestGreaterThan), R(0), /* 86 E> */ B(TestGreaterThan), R(0),
......
...@@ -17,12 +17,11 @@ snippet: " ...@@ -17,12 +17,11 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 33 bytecode array length: 32
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -54,12 +53,11 @@ snippet: " ...@@ -54,12 +53,11 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 39 bytecode array length: 38
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -93,12 +91,11 @@ snippet: " ...@@ -93,12 +91,11 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 36
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -109,7 +106,7 @@ bytecodes: [ ...@@ -109,7 +106,7 @@ bytecodes: [
B(JumpIfTrue), U8(8), B(JumpIfTrue), U8(8),
B(Jump), U8(12), B(Jump), U8(12),
/* 66 S> */ B(LdaSmi), U8(2), /* 66 S> */ B(LdaSmi), U8(2),
/* 68 E> */ B(Star), R(1), B(Star), R(1),
/* 98 S> */ B(LdaSmi), U8(3), /* 98 S> */ B(LdaSmi), U8(3),
B(Star), R(1), B(Star), R(1),
/* 105 S> */ B(Jump), U8(2), /* 105 S> */ B(Jump), U8(2),
...@@ -132,12 +129,11 @@ snippet: " ...@@ -132,12 +129,11 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 36
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(2), /* 45 S> */ B(LdaSmi), U8(2),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -175,8 +171,8 @@ bytecode array length: 45 ...@@ -175,8 +171,8 @@ bytecode array length: 45
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
B(TypeOf), /* 42 E> */ B(TypeOf),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(2), /* 45 S> */ B(LdaSmi), U8(2),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -213,12 +209,11 @@ snippet: " ...@@ -213,12 +209,11 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 32 bytecode array length: 31
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(TypeOf), /* 45 S> */ B(TypeOf),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -316,12 +311,11 @@ snippet: " ...@@ -316,12 +311,11 @@ snippet: "
" "
frame size: 3 frame size: 3
parameter count: 1 parameter count: 1
bytecode array length: 291 bytecode array length: 290
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1), B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -487,12 +481,11 @@ snippet: " ...@@ -487,12 +481,11 @@ snippet: "
" "
frame size: 5 frame size: 5
parameter count: 1 parameter count: 1
bytecode array length: 60 bytecode array length: 59
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(2), B(Star), R(2),
/* 52 E> */ B(Nop),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
B(TestEqualStrict), R(0), B(TestEqualStrict), R(0),
...@@ -502,8 +495,8 @@ bytecodes: [ ...@@ -502,8 +495,8 @@ bytecodes: [
B(TestEqualStrict), R(3), B(TestEqualStrict), R(3),
B(JumpIfTrue), U8(33), B(JumpIfTrue), U8(33),
B(Jump), U8(35), B(Jump), U8(35),
/* 77 E> */ B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Add), R(2), /* 77 E> */ B(Add), R(2),
B(Star), R(1), B(Star), R(1),
/* 70 S> */ B(LdaSmi), U8(2), /* 70 S> */ B(LdaSmi), U8(2),
B(TestEqualStrict), R(1), B(TestEqualStrict), R(1),
...@@ -517,7 +510,7 @@ bytecodes: [ ...@@ -517,7 +510,7 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
/* 138 S> */ B(Jump), U8(2), /* 138 S> */ B(Jump), U8(2),
/* 176 S> */ B(LdaSmi), U8(3), /* 176 S> */ B(LdaSmi), U8(3),
/* 178 E> */ B(Star), R(2), B(Star), R(2),
B(LdaUndefined), B(LdaUndefined),
/* 185 S> */ B(Return), /* 185 S> */ B(Return),
] ]
......
...@@ -56,13 +56,13 @@ bytecodes: [ ...@@ -56,13 +56,13 @@ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
B(Mov), R(context), R(2), B(Mov), R(context), R(2),
/* 47 S> */ B(LdaSmi), U8(1), /* 47 S> */ B(LdaSmi), U8(1),
/* 49 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(29), B(Jump), U8(29),
B(Star), R(4), B(Star), R(4),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(3), B(Star), R(3),
B(Mov), R(closure), R(5), B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3), /* 49 E> */ B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Ldar), R(2), B(Ldar), R(2),
...@@ -70,19 +70,19 @@ bytecodes: [ ...@@ -70,19 +70,19 @@ bytecodes: [
B(PopContext), R(1), B(PopContext), R(1),
B(Mov), R(context), R(2), B(Mov), R(context), R(2),
/* 75 S> */ B(LdaSmi), U8(2), /* 75 S> */ B(LdaSmi), U8(2),
/* 77 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(33), B(Jump), U8(33),
B(Star), R(4), B(Star), R(4),
B(LdaConstant), U8(1), B(LdaConstant), U8(1),
B(Star), R(3), B(Star), R(3),
B(Mov), R(closure), R(5), B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3), /* 77 E> */ B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Ldar), R(2), B(Ldar), R(2),
B(PushContext), R(1), B(PushContext), R(1),
/* 95 S> */ B(LdaSmi), U8(3), /* 95 S> */ B(LdaSmi), U8(3),
/* 97 E> */ B(Star), R(0), B(Star), R(0),
B(PopContext), R(1), B(PopContext), R(1),
B(LdaUndefined), B(LdaUndefined),
/* 103 S> */ B(Return), /* 103 S> */ B(Return),
......
...@@ -18,21 +18,21 @@ bytecode array length: 51 ...@@ -18,21 +18,21 @@ bytecode array length: 51
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
B(Mov), R(context), R(3), B(Mov), R(context), R(3),
/* 51 S> */ B(LdaSmi), U8(2), /* 51 S> */ B(LdaSmi), U8(2),
/* 53 E> */ B(Star), R(0), B(Star), R(0),
B(LdaSmi), U8(-1), B(LdaSmi), U8(-1),
B(Star), R(1), B(Star), R(1),
B(Jump), U8(7), B(Jump), U8(7),
B(Star), R(2), B(Star), R(2),
B(LdaZero), B(LdaZero),
B(Star), R(1), B(Star), R(1),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), /* 53 E> */ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Star), R(3), B(Star), R(3),
/* 70 S> */ B(LdaSmi), U8(3), /* 70 S> */ B(LdaSmi), U8(3),
/* 72 E> */ B(Star), R(0), B(Star), R(0),
B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(3), U8(1), /* 72 E> */ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(3), U8(1),
B(LdaZero), B(LdaZero),
B(TestEqualStrict), R(1), B(TestEqualStrict), R(1),
B(JumpIfTrue), U8(4), B(JumpIfTrue), U8(4),
...@@ -59,23 +59,23 @@ bytecode array length: 87 ...@@ -59,23 +59,23 @@ bytecode array length: 87
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1), /* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
B(Mov), R(context), R(4), B(Mov), R(context), R(4),
B(Mov), R(context), R(5), B(Mov), R(context), R(5),
/* 51 S> */ B(LdaSmi), U8(2), /* 51 S> */ B(LdaSmi), U8(2),
/* 53 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(33), B(Jump), U8(33),
B(Star), R(7), B(Star), R(7),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(6), B(Star), R(6),
B(Mov), R(closure), R(8), B(Mov), R(closure), R(8),
B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3), /* 53 E> */ B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3),
B(Star), R(5), B(Star), R(5),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Ldar), R(5), B(Ldar), R(5),
B(PushContext), R(1), B(PushContext), R(1),
/* 71 S> */ B(LdaSmi), U8(20), /* 71 S> */ B(LdaSmi), U8(20),
/* 73 E> */ B(Star), R(0), B(Star), R(0),
B(PopContext), R(1), B(PopContext), R(1),
B(LdaSmi), U8(-1), B(LdaSmi), U8(-1),
B(Star), R(2), B(Star), R(2),
...@@ -83,11 +83,11 @@ bytecodes: [ ...@@ -83,11 +83,11 @@ bytecodes: [
B(Star), R(3), B(Star), R(3),
B(LdaZero), B(LdaZero),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), /* 73 E> */ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Star), R(4), B(Star), R(4),
/* 90 S> */ B(LdaSmi), U8(3), /* 90 S> */ B(LdaSmi), U8(3),
/* 92 E> */ B(Star), R(0), B(Star), R(0),
B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1), /* 92 E> */ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
B(LdaZero), B(LdaZero),
B(TestEqualStrict), R(2), B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(4), B(JumpIfTrue), U8(4),
...@@ -120,32 +120,32 @@ bytecodes: [ ...@@ -120,32 +120,32 @@ bytecodes: [
B(Mov), R(context), R(5), B(Mov), R(context), R(5),
B(Mov), R(context), R(6), B(Mov), R(context), R(6),
/* 55 S> */ B(LdaSmi), U8(1), /* 55 S> */ B(LdaSmi), U8(1),
/* 57 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(33), B(Jump), U8(33),
B(Star), R(8), B(Star), R(8),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(7), B(Star), R(7),
B(Mov), R(closure), R(9), B(Mov), R(closure), R(9),
B(CallRuntime), U16(Runtime::kPushCatchContext), R(7), U8(3), /* 57 E> */ B(CallRuntime), U16(Runtime::kPushCatchContext), R(7), U8(3),
B(Star), R(6), B(Star), R(6),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Ldar), R(6), B(Ldar), R(6),
B(PushContext), R(1), B(PushContext), R(1),
/* 74 S> */ B(LdaSmi), U8(2), /* 74 S> */ B(LdaSmi), U8(2),
/* 76 E> */ B(Star), R(0), B(Star), R(0),
B(PopContext), R(1), B(PopContext), R(1),
B(Jump), U8(33), B(Jump), U8(33),
B(Star), R(7), B(Star), R(7),
B(LdaConstant), U8(0), B(LdaConstant), U8(0),
B(Star), R(6), B(Star), R(6),
B(Mov), R(closure), R(8), B(Mov), R(closure), R(8),
B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3), /* 76 E> */ B(CallRuntime), U16(Runtime::kPushCatchContext), R(6), U8(3),
B(Star), R(5), B(Star), R(5),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Ldar), R(5), B(Ldar), R(5),
B(PushContext), R(1), B(PushContext), R(1),
/* 95 S> */ B(LdaSmi), U8(20), /* 95 S> */ B(LdaSmi), U8(20),
/* 97 E> */ B(Star), R(0), B(Star), R(0),
B(PopContext), R(1), B(PopContext), R(1),
B(LdaSmi), U8(-1), B(LdaSmi), U8(-1),
B(Star), R(2), B(Star), R(2),
...@@ -153,11 +153,11 @@ bytecodes: [ ...@@ -153,11 +153,11 @@ bytecodes: [
B(Star), R(3), B(Star), R(3),
B(LdaZero), B(LdaZero),
B(Star), R(2), B(Star), R(2),
B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0), /* 97 E> */ B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
B(Star), R(4), B(Star), R(4),
/* 114 S> */ B(LdaSmi), U8(3), /* 114 S> */ B(LdaSmi), U8(3),
/* 116 E> */ B(Star), R(0), B(Star), R(0),
B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1), /* 116 E> */ B(CallRuntime), U16(Runtime::kInterpreterSetPendingMessage), R(4), U8(1),
B(LdaZero), B(LdaZero),
B(TestEqualStrict), R(2), B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(4), B(JumpIfTrue), U8(4),
......
...@@ -21,7 +21,7 @@ bytecode array length: 23 ...@@ -21,7 +21,7 @@ bytecode array length: 23
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
/* 54 S> */ B(LdaSmi), U8(10), /* 54 S> */ B(LdaSmi), U8(10),
/* 54 E> */ B(TestEqual), R(0), /* 54 E> */ B(TestEqual), R(0),
B(LogicalNot), B(LogicalNot),
...@@ -29,7 +29,7 @@ bytecodes: [ ...@@ -29,7 +29,7 @@ bytecodes: [
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 65 S> */ B(LdaSmi), U8(10), /* 65 S> */ B(LdaSmi), U8(10),
B(Add), R(0), B(Add), R(0),
/* 67 E> */ B(Star), R(0), B(Star), R(0),
B(Jump), U8(-14), B(Jump), U8(-14),
/* 79 S> */ B(Ldar), R(0), /* 79 S> */ B(Ldar), R(0),
/* 89 S> */ B(Return), /* 89 S> */ B(Return),
...@@ -53,11 +53,11 @@ bytecode array length: 18 ...@@ -53,11 +53,11 @@ bytecode array length: 18
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaFalse), /* 42 S> */ B(LdaFalse),
/* 42 E> */ B(Star), R(0), B(Star), R(0),
/* 49 E> */ B(StackCheck), /* 49 E> */ B(StackCheck),
/* 56 S> */ B(Ldar), R(0), /* 56 S> */ B(Ldar), R(0),
B(ToBooleanLogicalNot), B(ToBooleanLogicalNot),
/* 58 E> */ B(Star), R(0), B(Star), R(0),
/* 74 S> */ B(LdaFalse), /* 74 S> */ B(LdaFalse),
/* 74 E> */ B(TestEqual), R(0), /* 74 E> */ B(TestEqual), R(0),
B(JumpIfTrue), U8(-9), B(JumpIfTrue), U8(-9),
......
...@@ -171,11 +171,10 @@ snippet: " ...@@ -171,11 +171,10 @@ snippet: "
" "
frame size: 157 frame size: 157
parameter count: 1 parameter count: 1
bytecode array length: 11 bytecode array length: 10
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 1494 S> */ B(Nop), /* 1494 S> */ B(Wide), B(Mov), R16(127), R16(0),
B(Wide), B(Mov), R16(127), R16(0),
/* 1505 S> */ B(Ldar), R(0), /* 1505 S> */ B(Ldar), R(0),
/* 1516 S> */ B(Return), /* 1516 S> */ B(Return),
] ]
...@@ -348,11 +347,10 @@ snippet: " ...@@ -348,11 +347,10 @@ snippet: "
" "
frame size: 157 frame size: 157
parameter count: 1 parameter count: 1
bytecode array length: 13 bytecode array length: 12
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 1494 S> */ B(Nop), /* 1494 S> */ B(Wide), B(Mov), R16(126), R16(127),
B(Wide), B(Mov), R16(126), R16(127),
/* 1507 S> */ B(Wide), B(Ldar), R16(127), /* 1507 S> */ B(Wide), B(Ldar), R16(127),
/* 1520 S> */ B(Return), /* 1520 S> */ B(Return),
] ]
...@@ -707,16 +705,15 @@ snippet: " ...@@ -707,16 +705,15 @@ snippet: "
" "
frame size: 157 frame size: 157
parameter count: 1 parameter count: 1
bytecode array length: 37 bytecode array length: 36
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 1503 S> */ B(LdaZero), /* 1503 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 1506 S> */ B(LdaSmi), U8(3), /* 1506 S> */ B(LdaSmi), U8(3),
/* 1515 E> */ B(Wide), B(TestEqual), R16(129), /* 1515 E> */ B(Wide), B(TestEqual), R16(129),
B(JumpIfFalse), U8(11), B(JumpIfFalse), U8(10),
/* 1534 S> */ B(Nop), /* 1534 S> */ B(Wide), B(Mov), R16(0), R16(129),
/* 1534 E> */ B(Wide), B(Mov), R16(0), R16(129),
B(Ldar), R(0), B(Ldar), R(0),
/* 1540 S> */ B(LdaSmi), U8(3), /* 1540 S> */ B(LdaSmi), U8(3),
/* 1547 E> */ B(Wide), B(TestGreaterThan), R16(2), /* 1547 E> */ B(Wide), B(TestGreaterThan), R16(2),
...@@ -896,7 +893,7 @@ snippet: " ...@@ -896,7 +893,7 @@ snippet: "
" "
frame size: 158 frame size: 158
parameter count: 1 parameter count: 1
bytecode array length: 59 bytecode array length: 58
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 1503 S> */ B(LdaZero), /* 1503 S> */ B(LdaZero),
...@@ -904,22 +901,21 @@ bytecodes: [ ...@@ -904,22 +901,21 @@ bytecodes: [
/* 1515 S> */ B(LdaZero), /* 1515 S> */ B(LdaZero),
B(Star), R(1), B(Star), R(1),
/* 1523 S> */ B(LdaZero), /* 1523 S> */ B(LdaZero),
/* 1528 E> */ B(Wide), B(Star), R16(128), B(Wide), B(Star), R16(128),
/* 1538 S> */ B(LdaSmi), U8(64), /* 1538 S> */ B(LdaSmi), U8(64),
/* 1538 E> */ B(Wide), B(TestLessThan), R16(128), /* 1538 E> */ B(Wide), B(TestLessThan), R16(128),
B(JumpIfFalse), U8(36), B(JumpIfFalse), U8(35),
/* 1518 E> */ B(StackCheck), /* 1518 E> */ B(StackCheck),
/* 1555 S> */ B(Nop), /* 1555 S> */ B(Wide), B(Ldar), R16(128),
/* 1561 E> */ B(Wide), B(Ldar), R16(128), /* 1561 E> */ B(Wide), B(Add), R16(1),
B(Wide), B(Add), R16(1),
B(Wide), B(Mov), R16(1), R16(157), B(Wide), B(Mov), R16(1), R16(157),
/* 1558 E> */ B(Star), R(1), B(Star), R(1),
/* 1548 S> */ B(Wide), B(Ldar), R16(128), /* 1548 S> */ B(Wide), B(Ldar), R16(128),
B(ToNumber), B(ToNumber),
B(Wide), B(Star), R16(157), B(Wide), B(Star), R16(157),
B(Inc), B(Inc),
/* 1548 E> */ B(Wide), B(Star), R16(128), B(Wide), B(Star), R16(128),
B(Jump), U8(-40), B(Jump), U8(-39),
/* 1567 S> */ B(Wide), B(Ldar), R16(128), /* 1567 S> */ B(Wide), B(Ldar), R16(128),
/* 1580 S> */ B(Return), /* 1580 S> */ B(Return),
] ]
...@@ -1093,7 +1089,7 @@ snippet: " ...@@ -1093,7 +1089,7 @@ snippet: "
" "
frame size: 163 frame size: 163
parameter count: 1 parameter count: 1
bytecode array length: 85 bytecode array length: 84
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 1503 S> */ B(Wide), B(LdaSmi), U16(1234), /* 1503 S> */ B(Wide), B(LdaSmi), U16(1234),
...@@ -1101,27 +1097,26 @@ bytecodes: [ ...@@ -1101,27 +1097,26 @@ bytecodes: [
/* 1518 S> */ B(LdaZero), /* 1518 S> */ B(LdaZero),
B(Star), R(1), B(Star), R(1),
/* 1534 S> */ B(Ldar), R(0), /* 1534 S> */ B(Ldar), R(0),
B(JumpIfUndefined), U8(70), B(JumpIfUndefined), U8(69),
B(JumpIfNull), U8(68), B(JumpIfNull), U8(67),
B(ToObject), B(ToObject),
B(Wide), B(ForInPrepare), R16(158), B(Wide), B(ForInPrepare), R16(158),
B(Wide), B(Star), R16(157), B(Wide), B(Star), R16(157),
B(LdaZero), B(LdaZero),
B(Wide), B(Star), R16(161), B(Wide), B(Star), R16(161),
/* 1526 S> */ B(Wide), B(ForInDone), R16(161), R16(160), /* 1526 S> */ B(Wide), B(ForInDone), R16(161), R16(160),
B(JumpIfTrue), U8(46), B(JumpIfTrue), U8(45),
B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(1), B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(1),
B(JumpIfUndefined), U8(24), B(JumpIfUndefined), U8(23),
B(Wide), B(Star), R16(128), B(Wide), B(Star), R16(128),
/* 1521 E> */ B(StackCheck), /* 1521 E> */ B(StackCheck),
/* 1541 S> */ B(Nop), /* 1541 S> */ B(Wide), B(Ldar), R16(128),
/* 1547 E> */ B(Wide), B(Ldar), R16(128), /* 1547 E> */ B(Wide), B(Add), R16(1),
B(Wide), B(Add), R16(1),
B(Wide), B(Mov), R16(1), R16(162), B(Wide), B(Mov), R16(1), R16(162),
/* 1544 E> */ B(Star), R(1), B(Star), R(1),
B(Wide), B(ForInStep), R16(161), /* 1544 E> */ B(Wide), B(ForInStep), R16(161),
B(Wide), B(Star), R16(161), B(Wide), B(Star), R16(161),
B(Jump), U8(-50), B(Jump), U8(-49),
/* 1553 S> */ B(Ldar), R(1), /* 1553 S> */ B(Ldar), R(1),
/* 1564 S> */ B(Return), /* 1564 S> */ B(Return),
] ]
...@@ -1296,18 +1291,16 @@ snippet: " ...@@ -1296,18 +1291,16 @@ snippet: "
" "
frame size: 159 frame size: 159
parameter count: 1 parameter count: 1
bytecode array length: 55 bytecode array length: 53
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 1494 S> */ B(Nop), /* 1494 S> */ B(Wide), B(Mov), R16(64), R16(157),
/* 1509 E> */ B(Wide), B(Mov), R16(64), R16(157),
B(Wide), B(Mov), R16(63), R16(158), B(Wide), B(Mov), R16(63), R16(158),
B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2), /* 1509 E> */ B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2),
B(Star), R(0), B(Star), R(0),
/* 1515 S> */ B(Nop), /* 1515 S> */ B(Wide), B(Mov), R16(27), R16(157),
/* 1530 E> */ B(Wide), B(Mov), R16(27), R16(157),
B(Wide), B(Mov), R16(143), R16(158), B(Wide), B(Mov), R16(143), R16(158),
B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2), /* 1530 E> */ B(Wide), B(CallRuntime), U16(Runtime::kAdd), R16(157), U16(2),
B(Star), R(1), B(Star), R(1),
/* 1537 S> */ B(CallRuntime), U16(Runtime::kTheHole), R(0), U8(0), /* 1537 S> */ B(CallRuntime), U16(Runtime::kTheHole), R(0), U8(0),
/* 1549 S> */ B(Ldar), R(1), /* 1549 S> */ B(Ldar), R(1),
......
...@@ -19,9 +19,11 @@ namespace interpreter { ...@@ -19,9 +19,11 @@ namespace interpreter {
// Flags enabling optimizations that change generated bytecode array. // Flags enabling optimizations that change generated bytecode array.
// Format is <command-line flag> <flag name> <bit index> // Format is <command-line flag> <flag name> <bit index>
#define OPTIMIZATION_FLAGS(V) \ #define OPTIMIZATION_FLAGS(V) \
V(FLAG_ignition_reo, kUseReo, 0) \ V(FLAG_ignition_reo, kUseReo, 0) \
V(FLAG_ignition_peephole, kUsePeephole, 1) V(FLAG_ignition_peephole, kUsePeephole, 1) \
V(FLAG_ignition_filter_expression_positions, \
kUseUseFilterExpressionPositions, 2)
#define DECLARE_BIT(_, Name, BitIndex) static const int Name = 1 << BitIndex; #define DECLARE_BIT(_, Name, BitIndex) static const int Name = 1 << BitIndex;
OPTIMIZATION_FLAGS(DECLARE_BIT) OPTIMIZATION_FLAGS(DECLARE_BIT)
...@@ -30,73 +32,89 @@ OPTIMIZATION_FLAGS(DECLARE_BIT) ...@@ -30,73 +32,89 @@ OPTIMIZATION_FLAGS(DECLARE_BIT)
// Test cases source positions are checked for. Please ensure all // Test cases source positions are checked for. Please ensure all
// combinations of flags are present here. This is done manually // combinations of flags are present here. This is done manually
// because it provides easier to comprehend failure case for humans. // because it provides easier to comprehend failure case for humans.
#define TEST_CASES(V) \ #define TEST_CASES(V) \
V(UsingReo, kUseReo) \ V(UsingReo, kUseReo) \
V(UsingReoAndPeephole, kUseReo | kUsePeephole) \ V(UsingPeephole, kUsePeephole) \
V(UsingPeephole, kUsePeephole) V(UsingReoAndPeephole, kUseReo | kUsePeephole) \
V(UsingUseFilterExpressionPositions, kUseUseFilterExpressionPositions) \
static const char* kTestScripts[] = { V(UsingReoAndUseFilterExpressionPositions, \
"var x = (y = 3) + (x = y); return x + y;", kUseReo | kUseUseFilterExpressionPositions) \
V(UsingPeepholeAndUseFilterExpressionPositions, \
"var x = 55;\n" kUsePeephole | kUseUseFilterExpressionPositions) \
"var y = x + (x = 1) + (x = 2) + (x = 3);\n" V(UsingAllOptimizations, \
"return y;", kUseReo | kUsePeephole | kUseUseFilterExpressionPositions)
"var x = 10; return x >>> 3;", struct TestCaseData {
TestCaseData(const char* const script,
"var x = 0; return x || (1, 2, 3);", const char* const declaration_parameters = "",
const char* const arguments = "")
"return a || (a, b, a, b, c = 5, 3); ", : script_(script),
declaration_parameters_(declaration_parameters),
"var a = 3; var b = 4; a = b; b = a; a = b; return a;", arguments_(arguments) {}
"var a = 1; return [[a, 2], [a + 2]];", const char* const script() const { return script_; }
const char* const declaration_parameters() const {
"var a = 1; if (a || a < 0) { return 1; }", return declaration_parameters_;
}
"var b;" const char* const arguments() const { return arguments_; }
"b = a.name;"
"b = a.name;" private:
"a.name = a;" TestCaseData();
"b = a.name;"
"a.name = a;" const char* const script_;
"return b;", const char* const declaration_parameters_;
const char* const arguments_;
"var sum = 0;\n" };
"outer: {\n"
" for (var x = 0; x < 10; ++x) {\n" static const TestCaseData kTestCaseData[] = {
" for (var y = 0; y < 3; ++y) {\n" {"var x = (y = 3) + (x = y); return x + y;"},
" ++sum;\n" {"var x = 55;\n"
" if (x + y == 12) { break outer; }\n" "var y = x + (x = 1) + (x = 2) + (x = 3);\n"
" }\n" "return y;"},
" }\n" {"var x = 10; return x >>> 3;\n"},
"}\n" {"var x = 0; return x || (1, 2, 3);\n"},
"return sum;\n", {"return a || (a, b, a, b, c = 5, 3);\n"},
{"var a = 3; var b = 4; a = b; b = a; a = b; return a;\n"},
"var a = 1;" {"var a = 1; return [[a, 2], [a + 2]];\n"},
"switch (a) {" {"var a = 1; if (a || a < 0) { return 1; }\n"},
" case 1: return a * a + 1;" {"var b;"
" case 1: break;" "b = a.name;"
" case 2: return (a = 3) * a + (a = 4);" "b = a.name;"
" case 3:" "a.name = a;"
"}" "b = a.name;"
"return a;", "a.name = a;"
"return b;"},
"for (var p of [0, 1, 2]) {}", {"var sum = 0;\n"
"outer: {\n"
"var x = { 'a': 1, 'b': 2 };" " for (var x = 0; x < 10; ++x) {\n"
"for (x['a'] of [1,2,3]) { return x['a']; }", " for (var y = 0; y < 3; ++y) {\n"
" ++sum;\n"
"while (x == 4) {\n" " if (x + y == 12) { break outer; }\n"
" var y = x + 1;\n" " }\n"
" if (y == 2) break;\n" " }\n"
" for (z['a'] of [0]) {\n" "}\n"
" x += (x *= 3) + y;" "return sum;\n"},
" }\n" {"var a = 1;"
"}\n", "switch (a) {"
" case 1: return a * a + 1;"
"function g(a, b) { return a.func(b + b, b); }\n" " case 1: break;"
"g(new (function Obj() { this.func = function() { return; }})(), 1)\n"}; " case 2: return (a = 3) * a + (a = 4);"
" case 3:"
"}"
"return a;"},
{"for (var p of [0, 1, 2]) {}"},
{"var x = { 'a': 1, 'b': 2 };"
"for (x['a'] of [1,2,3]) { return x['a']; }"},
{"while (x == 4) {\n"
" var y = x + 1;\n"
" if (y == 2) break;\n"
" for (z['a'] of [0]) {\n"
" x += (x *= 3) + y;"
" }\n"
"}\n"},
{"function g(a, b) { return a.func(b + b, b); }\n"
"g(new (function Obj() { this.func = function() { return; }})(), 1)\n"},
{"return some_global[name];", "name", "'a'"}};
class OptimizedBytecodeSourcePositionTester final { class OptimizedBytecodeSourcePositionTester final {
public: public:
...@@ -116,8 +134,8 @@ class OptimizedBytecodeSourcePositionTester final { ...@@ -116,8 +134,8 @@ class OptimizedBytecodeSourcePositionTester final {
} }
bool SourcePositionsMatch(int optimization_bitmap, const char* function_body, bool SourcePositionsMatch(int optimization_bitmap, const char* function_body,
const char* function_decl_params = "", const char* function_decl_params,
const char* function_args = ""); const char* function_args);
private: private:
Handle<BytecodeArray> MakeBytecode(int optimization_bitmap, Handle<BytecodeArray> MakeBytecode(int optimization_bitmap,
...@@ -220,8 +238,10 @@ void TestSourcePositionsEquivalent(int optimization_bitmap) { ...@@ -220,8 +238,10 @@ void TestSourcePositionsEquivalent(int optimization_bitmap) {
handles.main_isolate()->interpreter()->Initialize(); handles.main_isolate()->interpreter()->Initialize();
OptimizedBytecodeSourcePositionTester tester(handles.main_isolate()); OptimizedBytecodeSourcePositionTester tester(handles.main_isolate());
for (auto test_script : kTestScripts) { for (auto test_case_data : kTestCaseData) {
CHECK(tester.SourcePositionsMatch(optimization_bitmap, test_script)); CHECK(tester.SourcePositionsMatch(
optimization_bitmap, test_case_data.script(),
test_case_data.declaration_parameters(), test_case_data.arguments()));
} }
} }
......
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