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

Unified Diff: test/cctest/interpreter/bytecode_expectations/BreakableBlocks.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/BreakableBlocks.golden
diff --git a/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden b/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
new file mode 100644
index 0000000000000000000000000000000000000000..ca35f3c8e12986db0cf0a4ccf538f73512faa85e
--- /dev/null
+++ b/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
@@ -0,0 +1,232 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: yes
+
+---
+snippet: "
+ var x = 0;
+ label: {
+ x = x + 1;
+ break label;
+ x = x + 1;
+ }
+ return x;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 17
+bytecodes: [
+ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaSmi8), U8(1),
+ B(Add), R(1),
+ B(Star), R(0),
+ B(Jump), U8(2),
+ B(Ldar), R(0),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var sum = 0;
+ outer: {
+ for (var x = 0; x < 10; ++x) {
+ for (var y = 0; y < 3; ++y) {
+ ++sum;
+ if (x + y == 12) { break outer; }
+ }
+ }
+ }
+ return sum;
+"
+frame size: 5
+parameter count: 1
+bytecode array length: 75
+bytecodes: [
+ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(0),
+ B(LdaZero),
+ B(Star), R(1),
+ B(Ldar), R(1),
+ B(Star), R(3),
+ B(LdaSmi8), U8(10),
+ B(TestLessThan), R(3),
+ B(JumpIfFalse), U8(57),
+ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(2),
+ B(Ldar), R(2),
+ B(Star), R(3),
+ B(LdaSmi8), U8(3),
+ B(TestLessThan), R(3),
+ B(JumpIfFalse), U8(35),
+ B(StackCheck),
+ B(Ldar), R(0),
+ B(ToNumber),
+ B(Inc),
+ B(Star), R(0),
+ B(Ldar), R(1),
+ B(Star), R(3),
+ B(Ldar), R(2),
+ B(Add), R(3),
+ B(Star), R(4),
+ B(LdaSmi8), U8(12),
+ B(TestEqual), R(4),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Ldar), R(2),
+ B(ToNumber),
+ B(Inc),
+ B(Star), R(2),
+ B(Jump), U8(-41),
+ B(Ldar), R(1),
+ B(ToNumber),
+ B(Inc),
+ B(Star), R(1),
+ B(Jump), U8(-63),
+ B(Ldar), R(0),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ outer: {
+ let y = 10;
+ function f() { return y; }
+ break outer;
+ }
+"
+frame size: 5
+parameter count: 1
+bytecode array length: 51
+bytecodes: [
+ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(3),
+ B(Ldar), R(closure),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(1), U8(0),
+ B(Star), R(0),
+ B(LdaSmi8), U8(10),
+ B(StaContextSlot), R(context), U8(4),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
+ B(Star), R(1),
+ B(Jump), U8(2),
+ B(PopContext), R(2),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ let x = 1;
+ outer: {
+ inner: {
+ let y = 2;
+ function f() { return x + y; }
+ if (y) break outer;
+ y = 3;
+ }
+ }
+ x = 4;
+"
+frame size: 6
+parameter count: 1
+bytecode array length: 131
+bytecodes: [
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(2),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaConstant), U8(0),
+ B(Star), R(4),
+ B(Ldar), R(closure),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
+ B(PushContext), R(3),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(1), U8(0),
+ B(Star), R(0),
+ B(LdaSmi8), U8(2),
+ B(StaContextSlot), R(context), U8(4),
+ B(Ldar), R(0),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(2),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(Star), R(1),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(3),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(JumpIfToBooleanFalse), U8(6),
+ B(PopContext), R(3),
+ B(Jump), U8(27),
+ B(LdaSmi8), U8(3),
+ B(Star), R(4),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(3),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
+ B(Ldar), R(4),
+ B(StaContextSlot), R(context), U8(4),
+ B(PopContext), R(3),
+ B(LdaSmi8), U8(4),
+ B(Star), R(4),
+ B(LdaContextSlot), R(context), U8(4),
+ B(JumpIfNotHole), U8(11),
+ B(LdaConstant), U8(4),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
+ B(Ldar), R(4),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+

Powered by Google App Engine
This is Rietveld 408576698