| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 | 1175 |
| 1176 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, | 1176 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
| 1177 TypeofMode typeof_mode, | 1177 TypeofMode typeof_mode, |
| 1178 Label* slow) { | 1178 Label* slow) { |
| 1179 Register current = cp; | 1179 Register current = cp; |
| 1180 Register next = a1; | 1180 Register next = a1; |
| 1181 Register temp = a2; | 1181 Register temp = a2; |
| 1182 | 1182 |
| 1183 Scope* s = scope(); | 1183 int to_check = scope()->ContextChainLengthUntilOutermostSloppyEval(); |
| 1184 while (s != NULL) { | 1184 for (Scope* s = scope(); to_check > 0; s = s->outer_scope()) { |
| 1185 if (s->num_heap_slots() > 0) { | 1185 if (!s->NeedsContext()) continue; |
| 1186 if (s->calls_sloppy_eval()) { | 1186 if (s->calls_sloppy_eval()) { |
| 1187 // Check that extension is "the hole". | 1187 // Check that extension is "the hole". |
| 1188 __ ld(temp, ContextMemOperand(current, Context::EXTENSION_INDEX)); | 1188 __ ld(temp, ContextMemOperand(current, Context::EXTENSION_INDEX)); |
| 1189 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); | 1189 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); |
| 1190 } | |
| 1191 // Load next context in chain. | |
| 1192 __ ld(next, ContextMemOperand(current, Context::PREVIOUS_INDEX)); | |
| 1193 // Walk the rest of the chain without clobbering cp. | |
| 1194 current = next; | |
| 1195 } | 1190 } |
| 1196 // If no outer scope calls eval, we do not need to check more | 1191 // Load next context in chain. |
| 1197 // context extensions. | 1192 __ ld(next, ContextMemOperand(current, Context::PREVIOUS_INDEX)); |
| 1198 if (!s->outer_scope_calls_sloppy_eval()) break; | 1193 // Walk the rest of the chain without clobbering cp. |
| 1199 s = s->outer_scope(); | 1194 current = next; |
| 1195 to_check--; |
| 1200 } | 1196 } |
| 1201 | 1197 |
| 1202 // All extension objects were empty and it is safe to use a normal global | 1198 // All extension objects were empty and it is safe to use a normal global |
| 1203 // load machinery. | 1199 // load machinery. |
| 1204 EmitGlobalVariableLoad(proxy, typeof_mode); | 1200 EmitGlobalVariableLoad(proxy, typeof_mode); |
| 1205 } | 1201 } |
| 1206 | 1202 |
| 1207 | 1203 |
| 1208 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1204 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
| 1209 Label* slow) { | 1205 Label* slow) { |
| (...skipping 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3768 reinterpret_cast<uint64_t>( | 3764 reinterpret_cast<uint64_t>( |
| 3769 isolate->builtins()->OnStackReplacement()->entry())); | 3765 isolate->builtins()->OnStackReplacement()->entry())); |
| 3770 return ON_STACK_REPLACEMENT; | 3766 return ON_STACK_REPLACEMENT; |
| 3771 } | 3767 } |
| 3772 | 3768 |
| 3773 | 3769 |
| 3774 } // namespace internal | 3770 } // namespace internal |
| 3775 } // namespace v8 | 3771 } // namespace v8 |
| 3776 | 3772 |
| 3777 #endif // V8_TARGET_ARCH_MIPS64 | 3773 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |