| Index: test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
|
| diff --git a/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden b/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d272f1237aac81e5b25e7be66ec37ef316ecb65d
|
| --- /dev/null
|
| +++ b/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
|
| @@ -0,0 +1,155 @@
|
| +#
|
| +# Autogenerated by generate-bytecode-expectations
|
| +#
|
| +
|
| +---
|
| +pool type: mixed
|
| +execute: yes
|
| +wrap: yes
|
| +
|
| +---
|
| +snippet: "
|
| + var a; return function() { a = 1; };
|
| +"
|
| +frame size: 1
|
| +parameter count: 1
|
| +bytecode array length: 12
|
| +bytecodes: [
|
| + B(CallRuntime), U16(Runtime::kNewFunctionContext), 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
|
| +parameter count: 1
|
| +bytecode array length: 17
|
| +bytecodes: [
|
| + B(CallRuntime), U16(Runtime::kNewFunctionContext), 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
|
| +parameter count: 1
|
| +bytecode array length: 22
|
| +bytecodes: [
|
| + B(CallRuntime), U16(Runtime::kNewFunctionContext), 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
|
| +parameter count: 1
|
| +bytecode array length: 25
|
| +bytecodes: [
|
| + B(CallRuntime), U16(Runtime::kNewFunctionContext), 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
|
| +parameter count: 1
|
| +bytecode array length: 47
|
| +bytecodes: [
|
| + B(CallRuntime), U16(Runtime::kNewFunctionContext), 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(Runtime::kPushBlockContext), 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
|
| +bytecode array length: 3
|
| +bytecodes: [
|
| + B(StackCheck),
|
| + B(LdaUndefined),
|
| + B(Return),
|
| +]
|
| +constant pool: [
|
| +]
|
| +handlers: [
|
| +]
|
| +
|
|
|