| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 __ b(ne, done); | 1263 __ b(ne, done); |
| 1264 __ mov(r0, Operand(var->name())); | 1264 __ mov(r0, Operand(var->name())); |
| 1265 __ push(r0); | 1265 __ push(r0); |
| 1266 __ CallRuntime(Runtime::kThrowReferenceError); | 1266 __ CallRuntime(Runtime::kThrowReferenceError); |
| 1267 } else { | 1267 } else { |
| 1268 __ jmp(done); | 1268 __ jmp(done); |
| 1269 } | 1269 } |
| 1270 } | 1270 } |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 | |
| 1274 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | |
| 1275 TypeofMode typeof_mode) { | |
| 1276 #ifdef DEBUG | |
| 1277 Variable* var = proxy->var(); | |
| 1278 DCHECK(var->IsUnallocated() || | |
| 1279 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | |
| 1280 #endif | |
| 1281 __ mov(LoadGlobalDescriptor::SlotRegister(), | |
| 1282 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); | |
| 1283 CallLoadGlobalIC(typeof_mode); | |
| 1284 } | |
| 1285 | |
| 1286 | |
| 1287 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1273 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
| 1288 TypeofMode typeof_mode) { | 1274 TypeofMode typeof_mode) { |
| 1289 // Record position before possible IC call. | 1275 // Record position before possible IC call. |
| 1290 SetExpressionPosition(proxy); | 1276 SetExpressionPosition(proxy); |
| 1291 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1277 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
| 1292 Variable* var = proxy->var(); | 1278 Variable* var = proxy->var(); |
| 1293 | 1279 |
| 1294 // Three cases: global variables, lookup variables, and all other types of | 1280 // Three cases: global variables, lookup variables, and all other types of |
| 1295 // variables. | 1281 // variables. |
| 1296 switch (var->location()) { | 1282 switch (var->location()) { |
| (...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3768 DCHECK(interrupt_address == | 3754 DCHECK(interrupt_address == |
| 3769 isolate->builtins()->OnStackReplacement()->entry()); | 3755 isolate->builtins()->OnStackReplacement()->entry()); |
| 3770 return ON_STACK_REPLACEMENT; | 3756 return ON_STACK_REPLACEMENT; |
| 3771 } | 3757 } |
| 3772 | 3758 |
| 3773 | 3759 |
| 3774 } // namespace internal | 3760 } // namespace internal |
| 3775 } // namespace v8 | 3761 } // namespace v8 |
| 3776 | 3762 |
| 3777 #endif // V8_TARGET_ARCH_ARM | 3763 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |