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

Unified Diff: test/cctest/interpreter/ContextVariables.golden

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: std::vector instead of initializer_list, golden path as constant. 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/ContextVariables.golden
diff --git a/test/cctest/interpreter/ContextVariables.golden b/test/cctest/interpreter/ContextVariables.golden
new file mode 100644
index 0000000000000000000000000000000000000000..d1112561324bdad07b5cc181ade1f8d7638ba568
--- /dev/null
+++ b/test/cctest/interpreter/ContextVariables.golden
@@ -0,0 +1,147 @@
+#
+# Autogenerated by generate-bytecode-expectations
+#
+
+---
+pool type: mixed
+execute: yes
+wrap: yes
+
+---
+snippet: "
+ var a; return function() { a = 1; };
+"
+frame size: 1 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(CallRuntime), U16(461), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(StackCheck),
+ B(CreateClosure), U8(0), U8(0),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = 1; return function() { a = 2; };
+"
+frame size: 1 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(CallRuntime), U16(461), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(0), U8(0),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a = 1; var b = 2; return function() { a = 2; b = 3 };
+"
+frame size: 1 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(CallRuntime), U16(461), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(StackCheck),
+ B(LdaSmi8), U8(1),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaSmi8), U8(2),
+ B(StaContextSlot), R(context), U8(5),
+ B(CreateClosure), U8(0), U8(0),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ var a; (function() { a = 2; })(); return a;
+"
+frame size: 3 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(CallRuntime), U16(461), R(closure), U8(1),
+ B(PushContext), R(0),
+ B(StackCheck),
+ B(LdaUndefined),
+ B(Star), R(2),
+ B(CreateClosure), U8(0), U8(0),
+ B(Star), R(1),
+ B(Call), R(1), R(2), U8(1), U8(1),
+ B(LdaContextSlot), R(context), U8(4),
+ B(Return),
+]
+constant pool: [
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ 'use strict'; let a = 1; { let b = 2; return function() { a + b; }; }
+"
+frame size: 4 # in multiples of sizeof(void*)
+parameter count: 1
+bytecodes: [
+ B(CallRuntime), U16(461), R(closure), U8(1),
+ B(PushContext), R(0),
+ 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(2),
+ B(Ldar), R(closure),
+ B(Star), R(3),
+ B(CallRuntime), U16(464), R(2), U8(2),
+ B(PushContext), R(1),
+ B(LdaTheHole),
+ B(StaContextSlot), R(context), U8(4),
+ B(LdaSmi8), U8(2),
+ B(StaContextSlot), R(context), U8(4),
+ B(CreateClosure), U8(1), U8(0),
+ B(PopContext), R(0),
+ B(Return),
+]
+constant pool: [
+ InstanceType::FIXED_ARRAY_TYPE,
+ InstanceType::SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ 'use strict';
+"
+frame size: 0
+parameter count: 1
+bytecodes: [
+ B(StackCheck),
+ B(LdaUndefined),
+ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+

Powered by Google App Engine
This is Rietveld 408576698