OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 __ bne(done); | 1228 __ bne(done); |
1229 __ mov(r3, Operand(var->name())); | 1229 __ mov(r3, Operand(var->name())); |
1230 __ push(r3); | 1230 __ push(r3); |
1231 __ CallRuntime(Runtime::kThrowReferenceError); | 1231 __ CallRuntime(Runtime::kThrowReferenceError); |
1232 } else { | 1232 } else { |
1233 __ b(done); | 1233 __ b(done); |
1234 } | 1234 } |
1235 } | 1235 } |
1236 } | 1236 } |
1237 | 1237 |
1238 | |
1239 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | |
1240 TypeofMode typeof_mode) { | |
1241 #ifdef DEBUG | |
1242 Variable* var = proxy->var(); | |
1243 DCHECK(var->IsUnallocated() || | |
1244 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | |
1245 #endif | |
1246 __ mov(LoadGlobalDescriptor::SlotRegister(), | |
1247 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); | |
1248 CallLoadGlobalIC(typeof_mode); | |
1249 } | |
1250 | |
1251 | |
1252 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1238 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
1253 TypeofMode typeof_mode) { | 1239 TypeofMode typeof_mode) { |
1254 // Record position before possible IC call. | 1240 // Record position before possible IC call. |
1255 SetExpressionPosition(proxy); | 1241 SetExpressionPosition(proxy); |
1256 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1242 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
1257 Variable* var = proxy->var(); | 1243 Variable* var = proxy->var(); |
1258 | 1244 |
1259 // Three cases: global variables, lookup variables, and all other types of | 1245 // Three cases: global variables, lookup variables, and all other types of |
1260 // variables. | 1246 // variables. |
1261 switch (var->location()) { | 1247 switch (var->location()) { |
(...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3692 | 3678 |
3693 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3679 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3694 | 3680 |
3695 DCHECK(interrupt_address == | 3681 DCHECK(interrupt_address == |
3696 isolate->builtins()->OnStackReplacement()->entry()); | 3682 isolate->builtins()->OnStackReplacement()->entry()); |
3697 return ON_STACK_REPLACEMENT; | 3683 return ON_STACK_REPLACEMENT; |
3698 } | 3684 } |
3699 } // namespace internal | 3685 } // namespace internal |
3700 } // namespace v8 | 3686 } // namespace v8 |
3701 #endif // V8_TARGET_ARCH_PPC | 3687 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |