| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 __ JumpIfNotRoot(x0, Heap::kTheHoleValueRootIndex, done); | 1250 __ JumpIfNotRoot(x0, Heap::kTheHoleValueRootIndex, done); |
| 1251 __ Mov(x0, Operand(var->name())); | 1251 __ Mov(x0, Operand(var->name())); |
| 1252 __ Push(x0); | 1252 __ Push(x0); |
| 1253 __ CallRuntime(Runtime::kThrowReferenceError); | 1253 __ CallRuntime(Runtime::kThrowReferenceError); |
| 1254 } else { | 1254 } else { |
| 1255 __ B(done); | 1255 __ B(done); |
| 1256 } | 1256 } |
| 1257 } | 1257 } |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 | |
| 1261 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | |
| 1262 TypeofMode typeof_mode) { | |
| 1263 #ifdef DEBUG | |
| 1264 Variable* var = proxy->var(); | |
| 1265 DCHECK(var->IsUnallocated() || | |
| 1266 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | |
| 1267 #endif | |
| 1268 __ Mov(LoadGlobalDescriptor::SlotRegister(), | |
| 1269 SmiFromSlot(proxy->VariableFeedbackSlot())); | |
| 1270 CallLoadGlobalIC(typeof_mode); | |
| 1271 } | |
| 1272 | |
| 1273 | |
| 1274 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1260 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
| 1275 TypeofMode typeof_mode) { | 1261 TypeofMode typeof_mode) { |
| 1276 // Record position before possible IC call. | 1262 // Record position before possible IC call. |
| 1277 SetExpressionPosition(proxy); | 1263 SetExpressionPosition(proxy); |
| 1278 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1264 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
| 1279 Variable* var = proxy->var(); | 1265 Variable* var = proxy->var(); |
| 1280 | 1266 |
| 1281 // Three cases: global variables, lookup variables, and all other types of | 1267 // Three cases: global variables, lookup variables, and all other types of |
| 1282 // variables. | 1268 // variables. |
| 1283 switch (var->location()) { | 1269 switch (var->location()) { |
| (...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3778 } | 3764 } |
| 3779 | 3765 |
| 3780 return INTERRUPT; | 3766 return INTERRUPT; |
| 3781 } | 3767 } |
| 3782 | 3768 |
| 3783 | 3769 |
| 3784 } // namespace internal | 3770 } // namespace internal |
| 3785 } // namespace v8 | 3771 } // namespace v8 |
| 3786 | 3772 |
| 3787 #endif // V8_TARGET_ARCH_ARM64 | 3773 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |