| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex); | 1211 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex); |
| 1212 __ j(not_equal, done); | 1212 __ j(not_equal, done); |
| 1213 __ Push(var->name()); | 1213 __ Push(var->name()); |
| 1214 __ CallRuntime(Runtime::kThrowReferenceError); | 1214 __ CallRuntime(Runtime::kThrowReferenceError); |
| 1215 } else { | 1215 } else { |
| 1216 __ jmp(done); | 1216 __ jmp(done); |
| 1217 } | 1217 } |
| 1218 } | 1218 } |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 | |
| 1222 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | |
| 1223 TypeofMode typeof_mode) { | |
| 1224 #ifdef DEBUG | |
| 1225 Variable* var = proxy->var(); | |
| 1226 DCHECK(var->IsUnallocated() || | |
| 1227 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | |
| 1228 #endif | |
| 1229 __ Move(LoadGlobalDescriptor::SlotRegister(), | |
| 1230 SmiFromSlot(proxy->VariableFeedbackSlot())); | |
| 1231 CallLoadGlobalIC(typeof_mode); | |
| 1232 } | |
| 1233 | |
| 1234 | |
| 1235 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1221 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
| 1236 TypeofMode typeof_mode) { | 1222 TypeofMode typeof_mode) { |
| 1237 // Record position before possible IC call. | 1223 // Record position before possible IC call. |
| 1238 SetExpressionPosition(proxy); | 1224 SetExpressionPosition(proxy); |
| 1239 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1225 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
| 1240 Variable* var = proxy->var(); | 1226 Variable* var = proxy->var(); |
| 1241 | 1227 |
| 1242 // Three cases: global variables, lookup variables, and all other types of | 1228 // Three cases: global variables, lookup variables, and all other types of |
| 1243 // variables. | 1229 // variables. |
| 1244 switch (var->location()) { | 1230 switch (var->location()) { |
| (...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3587 DCHECK_EQ( | 3573 DCHECK_EQ( |
| 3588 isolate->builtins()->OnStackReplacement()->entry(), | 3574 isolate->builtins()->OnStackReplacement()->entry(), |
| 3589 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3575 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3590 return ON_STACK_REPLACEMENT; | 3576 return ON_STACK_REPLACEMENT; |
| 3591 } | 3577 } |
| 3592 | 3578 |
| 3593 } // namespace internal | 3579 } // namespace internal |
| 3594 } // namespace v8 | 3580 } // namespace v8 |
| 3595 | 3581 |
| 3596 #endif // V8_TARGET_ARCH_X64 | 3582 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |