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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 __ Branch(done, ne, at, Operand(zero_reg)); | 1259 __ Branch(done, ne, at, Operand(zero_reg)); |
1260 __ li(a0, Operand(var->name())); | 1260 __ li(a0, Operand(var->name())); |
1261 __ push(a0); | 1261 __ push(a0); |
1262 __ CallRuntime(Runtime::kThrowReferenceError); | 1262 __ CallRuntime(Runtime::kThrowReferenceError); |
1263 } else { | 1263 } else { |
1264 __ Branch(done); | 1264 __ Branch(done); |
1265 } | 1265 } |
1266 } | 1266 } |
1267 } | 1267 } |
1268 | 1268 |
1269 | |
1270 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | |
1271 TypeofMode typeof_mode) { | |
1272 #ifdef DEBUG | |
1273 Variable* var = proxy->var(); | |
1274 DCHECK(var->IsUnallocated() || | |
1275 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | |
1276 #endif | |
1277 __ li(LoadGlobalDescriptor::SlotRegister(), | |
1278 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); | |
1279 CallLoadGlobalIC(typeof_mode); | |
1280 } | |
1281 | |
1282 | |
1283 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1269 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
1284 TypeofMode typeof_mode) { | 1270 TypeofMode typeof_mode) { |
1285 // Record position before possible IC call. | 1271 // Record position before possible IC call. |
1286 SetExpressionPosition(proxy); | 1272 SetExpressionPosition(proxy); |
1287 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); | 1273 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); |
1288 Variable* var = proxy->var(); | 1274 Variable* var = proxy->var(); |
1289 | 1275 |
1290 // Three cases: global variables, lookup variables, and all other types of | 1276 // Three cases: global variables, lookup variables, and all other types of |
1291 // variables. | 1277 // variables. |
1292 switch (var->location()) { | 1278 switch (var->location()) { |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3709 reinterpret_cast<uint32_t>( | 3695 reinterpret_cast<uint32_t>( |
3710 isolate->builtins()->OnStackReplacement()->entry())); | 3696 isolate->builtins()->OnStackReplacement()->entry())); |
3711 return ON_STACK_REPLACEMENT; | 3697 return ON_STACK_REPLACEMENT; |
3712 } | 3698 } |
3713 | 3699 |
3714 | 3700 |
3715 } // namespace internal | 3701 } // namespace internal |
3716 } // namespace v8 | 3702 } // namespace v8 |
3717 | 3703 |
3718 #endif // V8_TARGET_ARCH_MIPS | 3704 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |