v8/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
oth 40511877eb [interpreter] Introduce binary op bytecodes for Smi operand.
Introduces fused bytecodes for fusing LdaSmi followed by a binary op bytecode.
The chosen bytecodes are used frequently in Octane: AddSmi, SubSmi,
BitwiseOrSmi, BitwiseAndSmi, ShiftLeftSmi, ShiftRightSmi.

There are additional code stubs for these operations that are biased towards
both the left hand and right hand operands being Smis.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2111923002
Cr-Commit-Position: refs/heads/master@{#37531}
2016-07-05 13:46:11 +00:00

262 lines
4.2 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
pool type: number
execute: yes
wrap: yes
---
snippet: "
var x = 0; return x;
"
frame size: 1
parameter count: 1
bytecode array length: 6
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(Nop),
/* 55 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 0; return x + 3;
"
frame size: 1
parameter count: 1
bytecode array length: 8
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(AddSmi), U8(3), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 0; return x - 3;
"
frame size: 1
parameter count: 1
bytecode array length: 8
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(SubSmi), U8(3), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 4; return x * 3;
"
frame size: 1
parameter count: 1
bytecode array length: 10
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(4),
B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(3),
B(Mul), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 4; return x / 3;
"
frame size: 1
parameter count: 1
bytecode array length: 10
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(4),
B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(3),
B(Div), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 4; return x % 3;
"
frame size: 1
parameter count: 1
bytecode array length: 10
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(4),
B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(3),
B(Mod), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 1; return x | 2;
"
frame size: 1
parameter count: 1
bytecode array length: 9
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0),
/* 45 S> */ B(BitwiseOrSmi), U8(2), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 1; return x ^ 2;
"
frame size: 1
parameter count: 1
bytecode array length: 10
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(2),
B(BitwiseXor), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 1; return x & 2;
"
frame size: 1
parameter count: 1
bytecode array length: 9
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
B(Star), R(0),
/* 45 S> */ B(BitwiseAndSmi), U8(2), R(0),
/* 59 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 10; return x << 3;
"
frame size: 1
parameter count: 1
bytecode array length: 9
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0),
/* 46 S> */ B(ShiftLeftSmi), U8(3), R(0),
/* 61 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 10; return x >> 3;
"
frame size: 1
parameter count: 1
bytecode array length: 9
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0),
/* 46 S> */ B(ShiftRightSmi), U8(3), R(0),
/* 61 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 10; return x >>> 3;
"
frame size: 1
parameter count: 1
bytecode array length: 10
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(10),
B(Star), R(0),
/* 46 S> */ B(LdaSmi), U8(3),
B(ShiftRightLogical), R(0),
/* 62 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 0; return (x, 3);
"
frame size: 1
parameter count: 1
bytecode array length: 7
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(LdaSmi), U8(3),
/* 60 S> */ B(Return),
]
constant pool: [
]
handlers: [
]