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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 __ push(Immediate(var->name())); | 1209 __ push(Immediate(var->name())); |
1210 __ CallRuntime(Runtime::kThrowReferenceError); | 1210 __ CallRuntime(Runtime::kThrowReferenceError); |
1211 } | 1211 } |
1212 __ jmp(done); | 1212 __ jmp(done); |
1213 } | 1213 } |
1214 } | 1214 } |
1215 | 1215 |
1216 | 1216 |
1217 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | 1217 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
1218 TypeofMode typeof_mode) { | 1218 TypeofMode typeof_mode) { |
| 1219 #ifdef DEBUG |
1219 Variable* var = proxy->var(); | 1220 Variable* var = proxy->var(); |
1220 DCHECK(var->IsUnallocatedOrGlobalSlot() || | 1221 DCHECK(var->IsUnallocatedOrGlobalSlot() || |
1221 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | 1222 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
1222 __ mov(LoadDescriptor::ReceiverRegister(), NativeContextOperand()); | 1223 #endif |
1223 __ mov(LoadDescriptor::ReceiverRegister(), | 1224 __ mov(LoadGlobalDescriptor::SlotRegister(), |
1224 ContextOperand(LoadDescriptor::ReceiverRegister(), | |
1225 Context::EXTENSION_INDEX)); | |
1226 __ mov(LoadDescriptor::NameRegister(), var->name()); | |
1227 __ mov(LoadDescriptor::SlotRegister(), | |
1228 Immediate(SmiFromSlot(proxy->VariableFeedbackSlot()))); | 1225 Immediate(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
1229 CallLoadGlobalIC(typeof_mode); | 1226 CallLoadGlobalIC(typeof_mode); |
1230 } | 1227 } |
1231 | 1228 |
1232 | 1229 |
1233 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1230 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
1234 TypeofMode typeof_mode) { | 1231 TypeofMode typeof_mode) { |
1235 SetExpressionPosition(proxy); | 1232 SetExpressionPosition(proxy); |
1236 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1233 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
1237 Variable* var = proxy->var(); | 1234 Variable* var = proxy->var(); |
(...skipping 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3694 isolate->builtins()->OnStackReplacement()->entry(), | 3691 isolate->builtins()->OnStackReplacement()->entry(), |
3695 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3692 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3696 return ON_STACK_REPLACEMENT; | 3693 return ON_STACK_REPLACEMENT; |
3697 } | 3694 } |
3698 | 3695 |
3699 | 3696 |
3700 } // namespace internal | 3697 } // namespace internal |
3701 } // namespace v8 | 3698 } // namespace v8 |
3702 | 3699 |
3703 #endif // V8_TARGET_ARCH_IA32 | 3700 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |