v8/test/cctest/interpreter/bytecode_expectations/Conditional.golden
klaasb 935340a4c5 [interpreter] VisitForTest for bytecode generator
Adds TestResultScope and uses it to directly jump/fall through to the
correct branch in expressions used as branch conditions.
Should enable nicer TurboFan-graphs for easier control-flow
transformations in the future.

BUG=v8:4280
LOG=n

Review-Url: https://codereview.chromium.org/2242463002
Cr-Commit-Position: refs/heads/master@{#38634}
2016-08-15 13:10:59 +00:00

91 lines
1.4 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
pool type: number
execute: yes
wrap: yes
---
snippet: "
return 1 ? 2 : 3;
"
frame size: 0
parameter count: 1
bytecode array length: 4
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaSmi), U8(2),
/* 52 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
return 1 ? 2 ? 3 : 4 : 5;
"
frame size: 0
parameter count: 1
bytecode array length: 4
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaSmi), U8(3),
/* 60 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
return 0 < 1 ? 2 : 3;
"
frame size: 1
parameter count: 1
bytecode array length: 17
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaZero),
B(Star), R(0),
B(LdaSmi), U8(1),
/* 43 E> */ B(TestLessThan), R(0),
B(JumpIfFalse), U8(6),
B(LdaSmi), U8(2),
B(Jump), U8(4),
B(LdaSmi), U8(3),
/* 56 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var x = 0;
return x ? 2 : 3;
"
frame size: 1
parameter count: 1
bytecode array length: 13
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(JumpIfToBooleanFalse), U8(6),
B(LdaSmi), U8(2),
B(Jump), U8(4),
B(LdaSmi), U8(3),
/* 63 S> */ B(Return),
]
constant pool: [
]
handlers: [
]