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

Unified Diff: test/cctest/interpreter/bytecode_expectations/CountOperators.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/CountOperators.golden
diff --git a/test/cctest/interpreter/bytecode_expectations/CountOperators.golden b/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
new file mode 100644
index 0000000000000000000000000000000000000000..72d0c3f02a656162d0316ef2008caed32157fb49
--- /dev/null
+++ b/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
@@ -0,0 +1,298 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: yes
+
+---
+snippet: "
+ var a = 1; return ++a;
+"
+frame size: 1
+parameter count: 1
+bytecode array length: 10
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(Star), R(0),
+ B(ToNumber),
+ B(Inc),
+ B(Star), R(0),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = 1; return a++;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 14
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(Star), R(0),
+ B(ToNumber),
+ B(Star), R(1),
+ B(Inc),
+ B(Star), R(0),
+ B(Ldar), R(1),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = 1; return --a;
+"
+frame size: 1
+parameter count: 1
+bytecode array length: 10
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(Star), R(0),
+ B(ToNumber),
+ B(Dec),
+ B(Star), R(0),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = 1; return a--;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 14
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(Star), R(0),
+ B(ToNumber),
+ B(Star), R(1),
+ B(Dec),
+ B(Star), R(0),
+ B(Ldar), R(1),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = { val: 1 }; return a.val++;
+"
+frame size: 3
+parameter count: 1
+bytecode array length: 26
+bytecodes: [
+ B(StackCheck),
+ B(CreateObjectLiteral), U8(0), U8(0), U8(9),
+ B(Star), R(1),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LoadIC), R(1), U8(1), U8(1),
+ B(ToNumber),
+ B(Star), R(2),
+ B(Inc),
+ B(StoreICSloppy), R(1), U8(1), U8(3),
+ B(Ldar), R(2),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = { val: 1 }; return --a.val;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 22
+bytecodes: [
+ B(StackCheck),
+ B(CreateObjectLiteral), U8(0), U8(0), U8(9),
+ B(Star), R(1),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LoadIC), R(1), U8(1), U8(1),
+ B(ToNumber),
+ B(Dec),
+ B(StoreICSloppy), R(1), U8(1), U8(3),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var name = 'var'; var a = { val: 1 }; return a[name]--;
+"
+frame size: 5
+parameter count: 1
+bytecode array length: 33
+bytecodes: [
+ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(0),
+ B(CreateObjectLiteral), U8(1), U8(0), U8(9),
+ B(Star), R(2),
+ B(Star), R(1),
+ B(Star), R(2),
+ B(Ldar), R(0),
+ B(Star), R(3),
+ B(KeyedLoadIC), R(2), U8(1),
+ B(ToNumber),
+ B(Star), R(4),
+ B(Dec),
+ B(KeyedStoreICSloppy), R(2), R(3), U8(3),
+ B(Ldar), R(4),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::FIXED_ARRAY_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var name = 'var'; var a = { val: 1 }; return ++a[name];
+"
+frame size: 4
+parameter count: 1
+bytecode array length: 29
+bytecodes: [
+ B(StackCheck),
+ B(LdaConstant), U8(0),
+ B(Star), R(0),
+ B(CreateObjectLiteral), U8(1), U8(0), U8(9),
+ B(Star), R(2),
+ B(Star), R(1),
+ B(Star), R(2),
+ B(Ldar), R(0),
+ B(Star), R(3),
+ B(KeyedLoadIC), R(2), U8(1),
+ B(ToNumber),
+ B(Inc),
+ B(KeyedStoreICSloppy), R(2), R(3), U8(3),
+ B(Return),
+]
+constant pool: [
+ InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
+ InstanceType::FIXED_ARRAY_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = 1; var b = function() { return a }; return ++a;
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 27
+bytecodes: [
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ B(LdaContextSlot), R(context), U8(4),
+ B(ToNumber),
+ B(Inc),
+ B(StaContextSlot), R(context), U8(4),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = 1; var b = function() { return a }; return a--;
+"
+frame size: 3
+parameter count: 1
+bytecode array length: 31
+bytecodes: [
+ B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
+ B(PushContext), R(1),
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(0),
+ B(LdaContextSlot), R(context), U8(4),
+ B(ToNumber),
+ B(Star), R(2),
+ B(Dec),
+ B(StaContextSlot), R(context), U8(4),
+ B(Ldar), R(2),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var idx = 1; var a = [1, 2]; return a[idx++] = 2;
+"
+frame size: 4
+parameter count: 1
+bytecode array length: 28
+bytecodes: [
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(Star), R(0),
+ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
+ B(Star), R(1),
+ B(Star), R(2),
+ B(Ldar), R(0),
+ B(ToNumber),
+ B(Star), R(3),
+ B(Inc),
+ B(Star), R(0),
+ B(LdaSmi8), U8(2),
+ B(KeyedStoreICSloppy), R(2), R(3), U8(1),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+]
+handlers: [
+]
+

Powered by Google App Engine
This is Rietveld 408576698