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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 __ Push(var->name()); | 1239 __ Push(var->name()); |
1240 __ CallRuntime(Runtime::kThrowReferenceError); | 1240 __ CallRuntime(Runtime::kThrowReferenceError); |
1241 } | 1241 } |
1242 __ jmp(done); | 1242 __ jmp(done); |
1243 } | 1243 } |
1244 } | 1244 } |
1245 | 1245 |
1246 | 1246 |
1247 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | 1247 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
1248 TypeofMode typeof_mode) { | 1248 TypeofMode typeof_mode) { |
| 1249 #ifdef DEBUG |
1249 Variable* var = proxy->var(); | 1250 Variable* var = proxy->var(); |
1250 DCHECK(var->IsUnallocatedOrGlobalSlot() || | 1251 DCHECK(var->IsUnallocatedOrGlobalSlot() || |
1251 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | 1252 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
1252 __ Move(LoadDescriptor::NameRegister(), var->name()); | 1253 #endif |
1253 __ LoadGlobalObject(LoadDescriptor::ReceiverRegister()); | 1254 __ Move(LoadGlobalDescriptor::SlotRegister(), |
1254 __ Move(LoadDescriptor::SlotRegister(), | |
1255 SmiFromSlot(proxy->VariableFeedbackSlot())); | 1255 SmiFromSlot(proxy->VariableFeedbackSlot())); |
1256 CallLoadGlobalIC(typeof_mode); | 1256 CallLoadGlobalIC(typeof_mode); |
1257 } | 1257 } |
1258 | 1258 |
1259 | 1259 |
1260 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1260 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
1261 TypeofMode typeof_mode) { | 1261 TypeofMode typeof_mode) { |
1262 // Record position before possible IC call. | 1262 // Record position before possible IC call. |
1263 SetExpressionPosition(proxy); | 1263 SetExpressionPosition(proxy); |
1264 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1264 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3681 DCHECK_EQ( | 3681 DCHECK_EQ( |
3682 isolate->builtins()->OnStackReplacement()->entry(), | 3682 isolate->builtins()->OnStackReplacement()->entry(), |
3683 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3683 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3684 return ON_STACK_REPLACEMENT; | 3684 return ON_STACK_REPLACEMENT; |
3685 } | 3685 } |
3686 | 3686 |
3687 } // namespace internal | 3687 } // namespace internal |
3688 } // namespace v8 | 3688 } // namespace v8 |
3689 | 3689 |
3690 #endif // V8_TARGET_ARCH_X64 | 3690 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |