LetVariableContextSlot.golden 2.98 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#
# Autogenerated by generate-bytecode-expectations.
#

---
pool type: mixed
execute: yes
wrap: yes

---
snippet: "
  let x = 10; function f1() {return x;}
"
frame size: 2
parameter count: 1
bytecode array length: 24
bytecodes: [
  B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
  B(PushContext), R(1),
  B(LdaTheHole),
  B(StaContextSlot), R(context), U8(4),
  B(CreateClosure), U8(0), U8(0),
  B(Star), R(0),
  B(StackCheck),
25
  B(LdaSmi), U8(10),
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
  B(StaContextSlot), R(context), U8(4),
  B(LdaUndefined),
  B(Return),
]
constant pool: [
  InstanceType::SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]

---
snippet: "
  let x = 10; function f1() {return x;} return x;
"
frame size: 3
parameter count: 1
bytecode array length: 37
bytecodes: [
  B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
  B(PushContext), R(1),
  B(LdaTheHole),
  B(StaContextSlot), R(context), U8(4),
  B(CreateClosure), U8(0), U8(0),
  B(Star), R(0),
  B(StackCheck),
51
  B(LdaSmi), U8(10),
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
  B(StaContextSlot), R(context), U8(4),
  B(LdaContextSlot), R(context), U8(4),
  B(JumpIfNotHole), U8(11),
  B(LdaConstant), U8(1),
  B(Star), R(2),
  B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
  B(Return),
]
constant pool: [
  InstanceType::SHARED_FUNCTION_INFO_TYPE,
  InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
]
handlers: [
]

---
snippet: "
  let x = (x = 20); function f1() {return x;}
"
frame size: 4
parameter count: 1
bytecode array length: 45
bytecodes: [
  B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
  B(PushContext), R(1),
  B(LdaTheHole),
  B(StaContextSlot), R(context), U8(4),
  B(CreateClosure), U8(0), U8(0),
  B(Star), R(0),
  B(StackCheck),
82
  B(LdaSmi), U8(20),
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
  B(Star), R(2),
  B(LdaContextSlot), R(context), U8(4),
  B(JumpIfNotHole), U8(11),
  B(LdaConstant), U8(1),
  B(Star), R(3),
  B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
  B(Ldar), R(2),
  B(StaContextSlot), R(context), U8(4),
  B(StaContextSlot), R(context), U8(4),
  B(LdaUndefined),
  B(Return),
]
constant pool: [
  InstanceType::SHARED_FUNCTION_INFO_TYPE,
  InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
]
handlers: [
]

---
snippet: "
  let x = 10; x = 20; function f1() {return x;}
"
frame size: 4
parameter count: 1
bytecode array length: 47
bytecodes: [
  B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
  B(PushContext), R(1),
  B(LdaTheHole),
  B(StaContextSlot), R(context), U8(4),
  B(CreateClosure), U8(0), U8(0),
  B(Star), R(0),
  B(StackCheck),
117
  B(LdaSmi), U8(10),
118
  B(StaContextSlot), R(context), U8(4),
119
  B(LdaSmi), U8(20),
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
  B(Star), R(2),
  B(LdaContextSlot), R(context), U8(4),
  B(JumpIfNotHole), U8(11),
  B(LdaConstant), U8(1),
  B(Star), R(3),
  B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
  B(Ldar), R(2),
  B(StaContextSlot), R(context), U8(4),
  B(LdaUndefined),
  B(Return),
]
constant pool: [
  InstanceType::SHARED_FUNCTION_INFO_TYPE,
  InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
]
handlers: [
]