| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 __ cmp(eax, isolate()->factory()->the_hole_value()); | 1174 __ cmp(eax, isolate()->factory()->the_hole_value()); |
| 1175 __ j(not_equal, done); | 1175 __ j(not_equal, done); |
| 1176 __ push(Immediate(var->name())); | 1176 __ push(Immediate(var->name())); |
| 1177 __ CallRuntime(Runtime::kThrowReferenceError); | 1177 __ CallRuntime(Runtime::kThrowReferenceError); |
| 1178 } else { | 1178 } else { |
| 1179 __ jmp(done); | 1179 __ jmp(done); |
| 1180 } | 1180 } |
| 1181 } | 1181 } |
| 1182 } | 1182 } |
| 1183 | 1183 |
| 1184 | |
| 1185 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | |
| 1186 TypeofMode typeof_mode) { | |
| 1187 #ifdef DEBUG | |
| 1188 Variable* var = proxy->var(); | |
| 1189 DCHECK(var->IsUnallocated() || | |
| 1190 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | |
| 1191 #endif | |
| 1192 __ mov(LoadGlobalDescriptor::SlotRegister(), | |
| 1193 Immediate(SmiFromSlot(proxy->VariableFeedbackSlot()))); | |
| 1194 CallLoadGlobalIC(typeof_mode); | |
| 1195 } | |
| 1196 | |
| 1197 | |
| 1198 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1184 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
| 1199 TypeofMode typeof_mode) { | 1185 TypeofMode typeof_mode) { |
| 1200 SetExpressionPosition(proxy); | 1186 SetExpressionPosition(proxy); |
| 1201 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1187 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
| 1202 Variable* var = proxy->var(); | 1188 Variable* var = proxy->var(); |
| 1203 | 1189 |
| 1204 // Three cases: global variables, lookup variables, and all other types of | 1190 // Three cases: global variables, lookup variables, and all other types of |
| 1205 // variables. | 1191 // variables. |
| 1206 switch (var->location()) { | 1192 switch (var->location()) { |
| 1207 case VariableLocation::UNALLOCATED: { | 1193 case VariableLocation::UNALLOCATED: { |
| (...skipping 2383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3591 isolate->builtins()->OnStackReplacement()->entry(), | 3577 isolate->builtins()->OnStackReplacement()->entry(), |
| 3592 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3578 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3593 return ON_STACK_REPLACEMENT; | 3579 return ON_STACK_REPLACEMENT; |
| 3594 } | 3580 } |
| 3595 | 3581 |
| 3596 | 3582 |
| 3597 } // namespace internal | 3583 } // namespace internal |
| 3598 } // namespace v8 | 3584 } // namespace v8 |
| 3599 | 3585 |
| 3600 #endif // V8_TARGET_ARCH_X87 | 3586 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |