Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reflow REPEAT_249 macro. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
diff --git a/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden b/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
new file mode 100644
index 0000000000000000000000000000000000000000..9ba7fd9be3dddfc13c2bda86d79887581dc07d22
--- /dev/null
+++ b/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
@@ -0,0 +1,195 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+pool type: number
+execute: yes
+wrap: yes
+
+---
+snippet: "
+ var x = 0;
+ while (x != 10) {
+ x = x + 10;
+ }
+ return x;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 31
+bytecodes: [
+ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(0),
+ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi8), U8(10),
+ B(TestEqual), R(1),
+ B(LogicalNot),
+ B(JumpIfFalse), U8(15),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaSmi8), U8(10),
+ B(Add), R(1),
+ B(Star), R(0),
+ B(Jump), U8(-22),
+ B(Ldar), R(0),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = false;
+ do {
+ x = !x;
+ } while(x == false);
+ return x;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 22
+bytecodes: [
+ B(StackCheck),
+ B(LdaFalse),
+ B(Star), R(0),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(LogicalNot),
+ B(Star), R(0),
+ B(Ldar), R(0),
+ B(Star), R(1),
+ B(LdaFalse),
+ B(TestEqual), R(1),
+ B(JumpIfTrue), U8(-13),
+ B(Ldar), R(0),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 101;
+ return void(x * 3);
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 13
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(101),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaSmi8), U8(3),
+ B(Mul), R(1),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 1234;
+ var y = void (x * x - 1);
+ return y;
+"
+frame size: 4
+parameter count: 1
+bytecode array length: 21
+bytecodes: [
+ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(0),
+ B(Star), R(2),
+ B(Ldar), R(0),
+ B(Mul), R(2),
+ B(Star), R(3),
+ B(LdaSmi8), U8(1),
+ B(Sub), R(3),
+ B(LdaUndefined),
+ B(Star), R(1),
+ B(Return),
+]
+constant pool: [
+ 1234,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 13;
+ return ~x;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 12
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(13),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaSmi8), U8(-1),
+ B(BitwiseXor), R(1),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 13;
+ return +x;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 12
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(13),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaSmi8), U8(1),
+ B(Mul), R(1),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var x = 13;
+ return -x;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 12
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(13),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaSmi8), U8(-1),
+ B(Mul), R(1),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+

Powered by Google App Engine
This is Rietveld 408576698