| 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 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 __ Branch(done); | 1256 __ Branch(done); |
| 1257 } | 1257 } |
| 1258 } | 1258 } |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 | 1261 |
| 1262 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | 1262 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
| 1263 TypeofMode typeof_mode) { | 1263 TypeofMode typeof_mode) { |
| 1264 #ifdef DEBUG | 1264 #ifdef DEBUG |
| 1265 Variable* var = proxy->var(); | 1265 Variable* var = proxy->var(); |
| 1266 DCHECK(var->IsUnallocatedOrGlobalSlot() || | 1266 DCHECK(var->IsUnallocated() || |
| 1267 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | 1267 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
| 1268 #endif | 1268 #endif |
| 1269 __ li(LoadGlobalDescriptor::SlotRegister(), | 1269 __ li(LoadGlobalDescriptor::SlotRegister(), |
| 1270 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); | 1270 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
| 1271 CallLoadGlobalIC(typeof_mode); | 1271 CallLoadGlobalIC(typeof_mode); |
| 1272 } | 1272 } |
| 1273 | 1273 |
| 1274 | 1274 |
| 1275 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1275 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
| 1276 TypeofMode typeof_mode) { | 1276 TypeofMode typeof_mode) { |
| (...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3043 CallRuntimeWithOperands(is_strict(language_mode()) | 3043 CallRuntimeWithOperands(is_strict(language_mode()) |
| 3044 ? Runtime::kDeleteProperty_Strict | 3044 ? Runtime::kDeleteProperty_Strict |
| 3045 : Runtime::kDeleteProperty_Sloppy); | 3045 : Runtime::kDeleteProperty_Sloppy); |
| 3046 context()->Plug(v0); | 3046 context()->Plug(v0); |
| 3047 } else if (proxy != NULL) { | 3047 } else if (proxy != NULL) { |
| 3048 Variable* var = proxy->var(); | 3048 Variable* var = proxy->var(); |
| 3049 // Delete of an unqualified identifier is disallowed in strict mode but | 3049 // Delete of an unqualified identifier is disallowed in strict mode but |
| 3050 // "delete this" is allowed. | 3050 // "delete this" is allowed. |
| 3051 bool is_this = var->is_this(); | 3051 bool is_this = var->is_this(); |
| 3052 DCHECK(is_sloppy(language_mode()) || is_this); | 3052 DCHECK(is_sloppy(language_mode()) || is_this); |
| 3053 if (var->IsUnallocatedOrGlobalSlot()) { | 3053 if (var->IsUnallocated()) { |
| 3054 __ LoadGlobalObject(a2); | 3054 __ LoadGlobalObject(a2); |
| 3055 __ li(a1, Operand(var->name())); | 3055 __ li(a1, Operand(var->name())); |
| 3056 __ Push(a2, a1); | 3056 __ Push(a2, a1); |
| 3057 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); | 3057 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); |
| 3058 context()->Plug(v0); | 3058 context()->Plug(v0); |
| 3059 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 3059 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
| 3060 // Result of deleting non-global, non-dynamic variables is false. | 3060 // Result of deleting non-global, non-dynamic variables is false. |
| 3061 // The subexpression does not have side effects. | 3061 // The subexpression does not have side effects. |
| 3062 context()->Plug(is_this); | 3062 context()->Plug(is_this); |
| 3063 } else { | 3063 } else { |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3757 reinterpret_cast<uint32_t>( | 3757 reinterpret_cast<uint32_t>( |
| 3758 isolate->builtins()->OnStackReplacement()->entry())); | 3758 isolate->builtins()->OnStackReplacement()->entry())); |
| 3759 return ON_STACK_REPLACEMENT; | 3759 return ON_STACK_REPLACEMENT; |
| 3760 } | 3760 } |
| 3761 | 3761 |
| 3762 | 3762 |
| 3763 } // namespace internal | 3763 } // namespace internal |
| 3764 } // namespace v8 | 3764 } // namespace v8 |
| 3765 | 3765 |
| 3766 #endif // V8_TARGET_ARCH_MIPS | 3766 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |