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/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 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 __ cmp(eax, isolate()->factory()->the_hole_value()); | 1182 __ cmp(eax, isolate()->factory()->the_hole_value()); |
1183 __ j(not_equal, done); | 1183 __ j(not_equal, done); |
1184 __ push(Immediate(var->name())); | 1184 __ push(Immediate(var->name())); |
1185 __ CallRuntime(Runtime::kThrowReferenceError); | 1185 __ CallRuntime(Runtime::kThrowReferenceError); |
1186 } else { | 1186 } else { |
1187 __ jmp(done); | 1187 __ jmp(done); |
1188 } | 1188 } |
1189 } | 1189 } |
1190 } | 1190 } |
1191 | 1191 |
1192 | |
1193 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | |
1194 TypeofMode typeof_mode) { | |
1195 #ifdef DEBUG | |
1196 Variable* var = proxy->var(); | |
1197 DCHECK(var->IsUnallocated() || | |
1198 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | |
1199 #endif | |
1200 __ mov(LoadGlobalDescriptor::SlotRegister(), | |
1201 Immediate(SmiFromSlot(proxy->VariableFeedbackSlot()))); | |
1202 CallLoadGlobalIC(typeof_mode); | |
1203 } | |
1204 | |
1205 | |
1206 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1192 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
1207 TypeofMode typeof_mode) { | 1193 TypeofMode typeof_mode) { |
1208 SetExpressionPosition(proxy); | 1194 SetExpressionPosition(proxy); |
1209 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1195 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
1210 Variable* var = proxy->var(); | 1196 Variable* var = proxy->var(); |
1211 | 1197 |
1212 // Three cases: global variables, lookup variables, and all other types of | 1198 // Three cases: global variables, lookup variables, and all other types of |
1213 // variables. | 1199 // variables. |
1214 switch (var->location()) { | 1200 switch (var->location()) { |
1215 case VariableLocation::UNALLOCATED: { | 1201 case VariableLocation::UNALLOCATED: { |
(...skipping 2383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3599 isolate->builtins()->OnStackReplacement()->entry(), | 3585 isolate->builtins()->OnStackReplacement()->entry(), |
3600 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3586 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3601 return ON_STACK_REPLACEMENT; | 3587 return ON_STACK_REPLACEMENT; |
3602 } | 3588 } |
3603 | 3589 |
3604 | 3590 |
3605 } // namespace internal | 3591 } // namespace internal |
3606 } // namespace v8 | 3592 } // namespace v8 |
3607 | 3593 |
3608 #endif // V8_TARGET_ARCH_IA32 | 3594 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |