Commit bfc53f6e authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Interpreter] Add expression positions to BinaryOps.

BUG=v8:5723

Review-Url: https://codereview.chromium.org/2555263002
Cr-Commit-Position: refs/heads/master@{#41583}
parent fcb75915
...@@ -2844,6 +2844,7 @@ void BytecodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) { ...@@ -2844,6 +2844,7 @@ void BytecodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) {
Register lhs = VisitForRegisterValue(expr->left()); Register lhs = VisitForRegisterValue(expr->left());
VisitForAccumulatorValue(expr->right()); VisitForAccumulatorValue(expr->right());
FeedbackVectorSlot slot = expr->BinaryOperationFeedbackSlot(); FeedbackVectorSlot slot = expr->BinaryOperationFeedbackSlot();
builder()->SetExpressionPosition(expr);
builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot));
} }
......
...@@ -42,7 +42,7 @@ bytecodes: [ ...@@ -42,7 +42,7 @@ bytecodes: [
/* 54 E> */ B(StaKeyedPropertySloppy), R(2), R(1), U8(3), /* 54 E> */ B(StaKeyedPropertySloppy), R(2), R(1), U8(3),
B(LdaSmi), U8(1), B(LdaSmi), U8(1),
B(Star), R(1), B(Star), R(1),
/* 57 E> */ B(AddSmi), U8(1), R(0), U8(2), /* 59 E> */ B(AddSmi), U8(1), R(0), U8(2),
B(StaKeyedPropertySloppy), R(2), R(1), U8(3), B(StaKeyedPropertySloppy), R(2), R(1), U8(3),
B(Ldar), R(2), B(Ldar), R(2),
/* 66 S> */ B(Return), /* 66 S> */ B(Return),
...@@ -100,7 +100,7 @@ bytecodes: [ ...@@ -100,7 +100,7 @@ bytecodes: [
B(Star), R(4), B(Star), R(4),
B(LdaZero), B(LdaZero),
B(Star), R(3), B(Star), R(3),
/* 66 E> */ B(AddSmi), U8(2), R(0), U8(4), /* 68 E> */ B(AddSmi), U8(2), R(0), U8(4),
B(StaKeyedPropertySloppy), R(4), R(3), U8(5), B(StaKeyedPropertySloppy), R(4), R(3), U8(5),
B(Ldar), R(4), B(Ldar), R(4),
B(StaKeyedPropertySloppy), R(2), R(1), U8(7), B(StaKeyedPropertySloppy), R(2), R(1), U8(7),
......
...@@ -74,11 +74,11 @@ bytecodes: [ ...@@ -74,11 +74,11 @@ bytecodes: [
/* 46 S> */ B(LdaSmi), U8(100), /* 46 S> */ B(LdaSmi), U8(100),
B(Mov), R(0), R(1), B(Mov), R(0), R(1),
B(Star), R(0), B(Star), R(0),
/* 57 E> */ B(Add), R(1), U8(2), /* 52 E> */ B(Add), R(1), U8(2),
B(Star), R(1), B(Star), R(1),
B(LdaSmi), U8(101), B(LdaSmi), U8(101),
B(Star), R(0), B(Star), R(0),
/* 69 E> */ B(Add), R(1), U8(3), /* 64 E> */ B(Add), R(1), U8(3),
B(Star), R(0), B(Star), R(0),
/* 77 S> */ B(Nop), /* 77 S> */ B(Nop),
/* 87 S> */ B(Return), /* 87 S> */ B(Return),
...@@ -104,11 +104,11 @@ bytecodes: [ ...@@ -104,11 +104,11 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(56), /* 46 S> */ B(LdaSmi), U8(56),
B(Star), R(0), B(Star), R(0),
/* 61 E> */ B(Sub), R(0), U8(2), /* 59 E> */ B(Sub), R(0), U8(2),
B(Star), R(1), B(Star), R(1),
B(LdaSmi), U8(57), B(LdaSmi), U8(57),
B(Star), R(0), B(Star), R(0),
/* 68 E> */ B(Add), R(1), U8(3), /* 63 E> */ B(Add), R(1), U8(3),
B(Star), R(0), B(Star), R(0),
/* 75 S> */ B(Inc), U8(4), /* 75 S> */ B(Inc), U8(4),
B(Star), R(0), B(Star), R(0),
...@@ -136,15 +136,15 @@ bytecodes: [ ...@@ -136,15 +136,15 @@ bytecodes: [
/* 76 S> */ B(LdaSmi), U8(1), /* 76 S> */ B(LdaSmi), U8(1),
B(Mov), R(0), R(2), B(Mov), R(0), R(2),
B(Star), R(0), B(Star), R(0),
/* 61 E> */ B(Add), R(2), U8(2), /* 56 E> */ B(Add), R(2), U8(2),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Star), R(0), B(Star), R(0),
/* 71 E> */ B(Add), R(2), U8(3), /* 66 E> */ B(Add), R(2), U8(3),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
B(Star), R(0), B(Star), R(0),
/* 81 E> */ B(Add), R(2), U8(4), /* 76 E> */ B(Add), R(2), U8(4),
B(Star), R(1), B(Star), R(1),
/* 87 S> */ B(Nop), /* 87 S> */ B(Nop),
/* 97 S> */ B(Return), /* 97 S> */ B(Return),
...@@ -170,15 +170,15 @@ bytecodes: [ ...@@ -170,15 +170,15 @@ bytecodes: [
/* 76 S> */ B(LdaSmi), U8(1), /* 76 S> */ B(LdaSmi), U8(1),
B(Mov), R(0), R(1), B(Mov), R(0), R(1),
B(Star), R(0), B(Star), R(0),
/* 61 E> */ B(Add), R(1), U8(2), /* 56 E> */ B(Add), R(1), U8(2),
B(Star), R(1), B(Star), R(1),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Star), R(0), B(Star), R(0),
/* 71 E> */ B(Add), R(1), U8(3), /* 66 E> */ B(Add), R(1), U8(3),
B(Star), R(1), B(Star), R(1),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
B(Star), R(0), B(Star), R(0),
/* 81 E> */ B(Add), R(1), U8(4), /* 76 E> */ B(Add), R(1), U8(4),
B(Star), R(0), B(Star), R(0),
/* 87 S> */ B(Nop), /* 87 S> */ B(Nop),
/* 97 S> */ B(Return), /* 97 S> */ B(Return),
...@@ -205,29 +205,29 @@ bytecodes: [ ...@@ -205,29 +205,29 @@ bytecodes: [
/* 54 S> */ B(LdaSmi), U8(1), /* 54 S> */ B(LdaSmi), U8(1),
B(Mov), R(0), R(2), B(Mov), R(0), R(2),
B(Star), R(0), B(Star), R(0),
/* 68 E> */ B(Add), R(2), U8(2), /* 63 E> */ B(Add), R(2), U8(2),
B(Star), R(2), B(Star), R(2),
/* 76 E> */ B(AddSmi), U8(1), R(0), U8(3), /* 78 E> */ B(AddSmi), U8(1), R(0), U8(3),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(2), B(LdaSmi), U8(2),
B(Star), R(1), B(Star), R(1),
/* 88 E> */ B(Mul), R(3), U8(4), /* 83 E> */ B(Mul), R(3), U8(4),
B(Add), R(2), U8(5), /* 73 E> */ B(Add), R(2), U8(5),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(3), B(LdaSmi), U8(3),
B(Star), R(1), B(Star), R(1),
/* 98 E> */ B(Add), R(2), U8(6), /* 93 E> */ B(Add), R(2), U8(6),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(4), B(LdaSmi), U8(4),
B(Star), R(0), B(Star), R(0),
/* 108 E> */ B(Add), R(2), U8(7), /* 103 E> */ B(Add), R(2), U8(7),
B(Star), R(2), B(Star), R(2),
B(LdaSmi), U8(5), B(LdaSmi), U8(5),
B(Star), R(1), B(Star), R(1),
/* 118 E> */ B(Add), R(2), U8(8), /* 113 E> */ B(Add), R(2), U8(8),
B(Star), R(2), B(Star), R(2),
B(Ldar), R(1), B(Ldar), R(1),
/* 125 E> */ B(Add), R(2), U8(9), /* 123 E> */ B(Add), R(2), U8(9),
/* 128 S> */ B(Return), /* 128 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -250,7 +250,7 @@ bytecodes: [ ...@@ -250,7 +250,7 @@ bytecodes: [
/* 46 S> */ B(LdaSmi), U8(1), /* 46 S> */ B(LdaSmi), U8(1),
B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), B(Ldar), R(0),
/* 57 E> */ B(Add), R(1), U8(2), /* 55 E> */ B(Add), R(1), U8(2),
B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(ToNumber), R(2), B(ToNumber), R(2),
...@@ -258,12 +258,12 @@ bytecodes: [ ...@@ -258,12 +258,12 @@ bytecodes: [
B(Inc), U8(3), B(Inc), U8(3),
B(Star), R(0), B(Star), R(0),
B(Ldar), R(2), B(Ldar), R(2),
/* 63 E> */ B(Add), R(1), U8(4), /* 59 E> */ B(Add), R(1), U8(4),
B(Star), R(1), B(Star), R(1),
B(Ldar), R(0), B(Ldar), R(0),
B(Inc), U8(5), B(Inc), U8(5),
B(Star), R(0), B(Star), R(0),
/* 72 E> */ B(Add), R(1), U8(6), /* 67 E> */ B(Add), R(1), U8(6),
/* 76 S> */ B(Return), /* 76 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -17,12 +17,13 @@ snippet: " ...@@ -17,12 +17,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 15 bytecode array length: 16
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 56 S> */ B(AddSmi), U8(1), R(0), U8(2), /* 56 S> */ B(LdaSmi), U8(1),
/* 62 E> */ B(Add), R(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 69 S> */ B(Jump), U8(2), /* 69 S> */ B(Jump), U8(2),
/* 97 S> */ B(Ldar), R(0), /* 97 S> */ B(Ldar), R(0),
...@@ -69,7 +70,7 @@ bytecodes: [ ...@@ -69,7 +70,7 @@ bytecodes: [
B(Inc), U8(6), B(Inc), U8(6),
B(Star), R(0), B(Star), R(0),
/* 142 S> */ B(Ldar), R(2), /* 142 S> */ B(Ldar), R(2),
/* 150 E> */ B(Add), R(1), U8(7), /* 148 E> */ B(Add), R(1), U8(7),
B(Star), R(3), B(Star), R(3),
B(LdaSmi), U8(12), B(LdaSmi), U8(12),
/* 152 E> */ B(TestEqual), R(3), U8(8), /* 152 E> */ B(TestEqual), R(3), U8(8),
......
...@@ -36,7 +36,7 @@ bytecodes: [ ...@@ -36,7 +36,7 @@ bytecodes: [
B(Star), R(1), B(Star), R(1),
/* 117 E> */ B(Call), R(1), R(this), U8(1), U8(2), /* 117 E> */ B(Call), R(1), R(this), U8(1), U8(2),
B(Star), R(1), B(Star), R(1),
B(AddSmi), U8(1), R(1), U8(8), /* 126 E> */ B(AddSmi), U8(1), R(1), U8(8),
/* 131 S> */ B(Return), /* 131 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -95,7 +95,7 @@ bytecodes: [ ...@@ -95,7 +95,7 @@ bytecodes: [
B(Star), R(3), B(Star), R(3),
B(LdaZero), B(LdaZero),
/* 59 E> */ B(LdaKeyedProperty), R(2), U8(4), /* 59 E> */ B(LdaKeyedProperty), R(2), U8(4),
B(Add), R(3), U8(6), /* 48 E> */ B(Add), R(3), U8(6),
/* 64 S> */ B(Return), /* 64 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -78,7 +78,7 @@ bytecodes: [ ...@@ -78,7 +78,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(CreateObjectLiteral), U8(0), U8(0), U8(1), R(1), /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), R(1),
/* 67 E> */ B(AddSmi), U8(1), R(0), U8(2), /* 69 E> */ B(AddSmi), U8(1), R(0), U8(2),
B(StaNamedPropertySloppy), R(1), U8(1), U8(3), B(StaNamedPropertySloppy), R(1), U8(1), U8(3),
B(Ldar), R(1), B(Ldar), R(1),
/* 76 S> */ B(Return), /* 76 S> */ B(Return),
......
...@@ -26,7 +26,7 @@ bytecodes: [ ...@@ -26,7 +26,7 @@ bytecodes: [
/* 102 S> */ B(LdaContextSlot), R(context), U8(4), U8(1), /* 102 S> */ B(LdaContextSlot), R(context), U8(4), U8(1),
B(Star), R(0), B(Star), R(0),
B(LdaCurrentContextSlot), U8(4), B(LdaCurrentContextSlot), U8(4),
/* 120 E> */ B(Mul), R(0), U8(2), /* 118 E> */ B(Mul), R(0), U8(2),
/* 130 S> */ B(Return), /* 130 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -30,12 +30,13 @@ snippet: " ...@@ -30,12 +30,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 9 bytecode array length: 10
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(AddSmi), U8(3), R(0), U8(2), /* 45 S> */ B(LdaSmi), U8(3),
/* 54 E> */ B(Add), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -49,12 +50,13 @@ snippet: " ...@@ -49,12 +50,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 9 bytecode array length: 10
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(SubSmi), U8(3), R(0), U8(2), /* 45 S> */ B(LdaSmi), U8(3),
/* 54 E> */ B(Sub), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -74,7 +76,7 @@ bytecodes: [ ...@@ -74,7 +76,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(4), /* 42 S> */ B(LdaSmi), U8(4),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(3), /* 45 S> */ B(LdaSmi), U8(3),
B(Mul), R(0), U8(2), /* 54 E> */ B(Mul), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -94,7 +96,7 @@ bytecodes: [ ...@@ -94,7 +96,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(4), /* 42 S> */ B(LdaSmi), U8(4),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(3), /* 45 S> */ B(LdaSmi), U8(3),
B(Div), R(0), U8(2), /* 54 E> */ B(Div), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -114,7 +116,7 @@ bytecodes: [ ...@@ -114,7 +116,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(4), /* 42 S> */ B(LdaSmi), U8(4),
B(Star), R(0), B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(3), /* 45 S> */ B(LdaSmi), U8(3),
B(Mod), R(0), U8(2), /* 54 E> */ B(Mod), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -128,12 +130,13 @@ snippet: " ...@@ -128,12 +130,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 10 bytecode array length: 11
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(BitwiseOrSmi), U8(2), R(0), U8(2), /* 45 S> */ B(LdaSmi), U8(2),
/* 54 E> */ B(BitwiseOr), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -153,7 +156,7 @@ bytecodes: [ ...@@ -153,7 +156,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(LdaSmi), U8(2), /* 45 S> */ B(LdaSmi), U8(2),
B(BitwiseXor), R(0), U8(2), /* 54 E> */ B(BitwiseXor), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -167,12 +170,13 @@ snippet: " ...@@ -167,12 +170,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 10 bytecode array length: 11
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(BitwiseAndSmi), U8(2), R(0), U8(2), /* 45 S> */ B(LdaSmi), U8(2),
/* 54 E> */ B(BitwiseAnd), R(0), U8(2),
/* 59 S> */ B(Return), /* 59 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -186,12 +190,13 @@ snippet: " ...@@ -186,12 +190,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 10 bytecode array length: 11
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(ShiftLeftSmi), U8(3), R(0), U8(2), /* 46 S> */ B(LdaSmi), U8(3),
/* 55 E> */ B(ShiftLeft), R(0), U8(2),
/* 61 S> */ B(Return), /* 61 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -205,12 +210,13 @@ snippet: " ...@@ -205,12 +210,13 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 10 bytecode array length: 11
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10), /* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(ShiftRightSmi), U8(3), R(0), U8(2), /* 46 S> */ B(LdaSmi), U8(3),
/* 55 E> */ B(ShiftRight), R(0), U8(2),
/* 61 S> */ B(Return), /* 61 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -230,7 +236,7 @@ bytecodes: [ ...@@ -230,7 +236,7 @@ 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(3), /* 46 S> */ B(LdaSmi), U8(3),
B(ShiftRightLogical), R(0), U8(2), /* 55 E> */ B(ShiftRightLogical), R(0), U8(2),
/* 62 S> */ B(Return), /* 62 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
...@@ -67,7 +67,7 @@ bytecodes: [ ...@@ -67,7 +67,7 @@ bytecodes: [
/* 27 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4), /* 27 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
B(Star), R(0), B(Star), R(0),
B(Ldar), R(arg1), B(Ldar), R(arg1),
/* 37 E> */ B(Add), R(arg1), U8(6), /* 35 E> */ B(Add), R(arg1), U8(6),
B(Star), R(2), B(Star), R(2),
B(Mov), R(arg0), R(1), B(Mov), R(arg0), R(1),
B(Mov), R(arg1), R(3), B(Mov), R(arg1), R(3),
......
...@@ -23,7 +23,7 @@ bytecodes: [ ...@@ -23,7 +23,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 48 E> */ B(StackCheck), /* 48 E> */ B(StackCheck),
/* 64 S> */ B(Ldar), R(0), /* 64 S> */ B(Ldar), R(0),
/* 78 E> */ B(Add), R(0), U8(2), /* 76 E> */ B(Add), R(0), U8(2),
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), U8(3), /* 95 E> */ B(TestGreaterThan), R(0), U8(3),
...@@ -56,7 +56,7 @@ bytecodes: [ ...@@ -56,7 +56,7 @@ bytecodes: [
B(Star), R(0), B(Star), R(0),
/* 48 E> */ B(StackCheck), /* 48 E> */ B(StackCheck),
/* 55 S> */ B(Nop), /* 55 S> */ B(Nop),
/* 69 E> */ B(Add), R(0), U8(2), /* 67 E> */ B(Add), R(0), U8(2),
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), U8(3), /* 86 E> */ B(TestGreaterThan), R(0), U8(3),
...@@ -84,7 +84,7 @@ bytecodes: [ ...@@ -84,7 +84,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), U8(1), /* 45 S> */ B(LdaSmi), U8(1),
B(Star), R(0), B(Star), R(0),
/* 50 S> */ B(Nop), /* 50 S> */ B(Nop),
/* 64 E> */ B(Add), R(0), U8(2), /* 62 E> */ B(Add), R(0), U8(2),
B(Star), R(0), B(Star), R(0),
/* 72 S> */ B(Nop), /* 72 S> */ B(Nop),
/* 85 S> */ B(Return), /* 85 S> */ B(Return),
......
...@@ -493,7 +493,7 @@ bytecodes: [ ...@@ -493,7 +493,7 @@ bytecodes: [
B(TestEqualStrict), R(3), U8(6), B(TestEqualStrict), R(3), U8(6),
B(JumpIfTrue), U8(34), B(JumpIfTrue), U8(34),
B(Jump), U8(36), B(Jump), U8(36),
/* 77 E> */ B(AddSmi), U8(1), R(0), U8(2), /* 79 E> */ B(AddSmi), U8(1), R(0), U8(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), U8(3), B(TestEqualStrict), R(1), U8(3),
......
...@@ -15,18 +15,19 @@ snippet: " ...@@ -15,18 +15,19 @@ snippet: "
" "
frame size: 1 frame size: 1
parameter count: 1 parameter count: 1
bytecode array length: 24 bytecode array length: 25
bytecodes: [ bytecodes: [
/* 30 E> */ B(StackCheck), /* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero), /* 42 S> */ B(LdaZero),
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), U8(2), /* 54 E> */ B(TestEqual), R(0), U8(2),
B(JumpIfTrue), U8(12), B(JumpIfTrue), U8(13),
/* 45 E> */ B(StackCheck), /* 45 E> */ B(StackCheck),
/* 65 S> */ B(AddSmi), U8(10), R(0), U8(3), /* 65 S> */ B(LdaSmi), U8(10),
/* 71 E> */ B(Add), R(0), U8(3),
B(Star), R(0), B(Star), R(0),
B(JumpLoop), U8(-14), U8(0), B(JumpLoop), U8(-15), U8(0),
/* 79 S> */ B(Ldar), R(0), /* 79 S> */ B(Ldar), R(0),
/* 89 S> */ B(Return), /* 89 S> */ B(Return),
] ]
...@@ -79,7 +80,7 @@ bytecodes: [ ...@@ -79,7 +80,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(101), /* 42 S> */ B(LdaSmi), U8(101),
B(Star), R(0), B(Star), R(0),
/* 47 S> */ B(LdaSmi), U8(3), /* 47 S> */ B(LdaSmi), U8(3),
B(Mul), R(0), U8(2), /* 61 E> */ B(Mul), R(0), U8(2),
B(LdaUndefined), B(LdaUndefined),
/* 67 S> */ B(Return), /* 67 S> */ B(Return),
] ]
...@@ -102,9 +103,9 @@ bytecodes: [ ...@@ -102,9 +103,9 @@ bytecodes: [
/* 42 S> */ B(Wide), B(LdaSmi), U16(1234), /* 42 S> */ B(Wide), B(LdaSmi), U16(1234),
B(Star), R(0), B(Star), R(0),
/* 56 S> */ B(Nop), /* 56 S> */ B(Nop),
/* 66 E> */ B(Mul), R(0), U8(2), /* 64 E> */ B(Mul), R(0), U8(2),
B(Star), R(2), B(Star), R(2),
B(SubSmi), U8(1), R(2), U8(3), /* 68 E> */ B(SubSmi), U8(1), R(2), U8(3),
B(LdaUndefined), B(LdaUndefined),
B(Star), R(1), B(Star), R(1),
/* 74 S> */ B(Nop), /* 74 S> */ B(Nop),
...@@ -128,7 +129,7 @@ bytecodes: [ ...@@ -128,7 +129,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(13), /* 42 S> */ B(LdaSmi), U8(13),
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(-1), /* 46 S> */ B(LdaSmi), U8(-1),
B(BitwiseXor), R(0), U8(2), /* 53 E> */ B(BitwiseXor), R(0), U8(2),
/* 57 S> */ B(Return), /* 57 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -149,7 +150,7 @@ bytecodes: [ ...@@ -149,7 +150,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(13), /* 42 S> */ B(LdaSmi), U8(13),
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(1), /* 46 S> */ B(LdaSmi), U8(1),
B(Mul), R(0), U8(2), /* 53 E> */ B(Mul), R(0), U8(2),
/* 57 S> */ B(Return), /* 57 S> */ B(Return),
] ]
constant pool: [ constant pool: [
...@@ -170,7 +171,7 @@ bytecodes: [ ...@@ -170,7 +171,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), U8(13), /* 42 S> */ B(LdaSmi), U8(13),
B(Star), R(0), B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(-1), /* 46 S> */ B(LdaSmi), U8(-1),
B(Mul), R(0), U8(2), /* 53 E> */ B(Mul), R(0), U8(2),
/* 57 S> */ B(Return), /* 57 S> */ B(Return),
] ]
constant pool: [ constant pool: [
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
//
function foo(arg) { }
foo(Symbol() | 0);
*%(basename)s:9: TypeError: Cannot convert a Symbol value to a number
foo(Symbol() | 0);
^
TypeError: Cannot convert a Symbol value to a number
at *%(basename)s:9:14
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