| 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 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2833 __ lw(a1, MemOperand(sp, (argc + 1) * kPointerSize)); | 2833 __ lw(a1, MemOperand(sp, (argc + 1) * kPointerSize)); |
| 2834 // Call the target. | 2834 // Call the target. |
| 2835 __ li(a0, Operand(argc)); | 2835 __ li(a0, Operand(argc)); |
| 2836 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); | 2836 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
| 2837 OperandStackDepthDecrement(argc + 1); | 2837 OperandStackDepthDecrement(argc + 1); |
| 2838 RestoreContext(); | 2838 RestoreContext(); |
| 2839 // Discard the function left on TOS. | 2839 // Discard the function left on TOS. |
| 2840 context()->DropAndPlug(1, v0); | 2840 context()->DropAndPlug(1, v0); |
| 2841 } | 2841 } |
| 2842 | 2842 |
| 2843 | |
| 2844 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | |
| 2845 ZoneList<Expression*>* args = expr->arguments(); | |
| 2846 VisitForAccumulatorValue(args->at(0)); | |
| 2847 | |
| 2848 Label materialize_true, materialize_false; | |
| 2849 Label* if_true = NULL; | |
| 2850 Label* if_false = NULL; | |
| 2851 Label* fall_through = NULL; | |
| 2852 context()->PrepareTest(&materialize_true, &materialize_false, | |
| 2853 &if_true, &if_false, &fall_through); | |
| 2854 | |
| 2855 __ lw(a0, FieldMemOperand(v0, String::kHashFieldOffset)); | |
| 2856 __ And(a0, a0, Operand(String::kContainsCachedArrayIndexMask)); | |
| 2857 | |
| 2858 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 2859 Split(eq, a0, Operand(zero_reg), if_true, if_false, fall_through); | |
| 2860 | |
| 2861 context()->Plug(if_true, if_false); | |
| 2862 } | |
| 2863 | |
| 2864 | |
| 2865 void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) { | |
| 2866 ZoneList<Expression*>* args = expr->arguments(); | |
| 2867 DCHECK(args->length() == 1); | |
| 2868 VisitForAccumulatorValue(args->at(0)); | |
| 2869 | |
| 2870 __ AssertString(v0); | |
| 2871 | |
| 2872 __ lw(v0, FieldMemOperand(v0, String::kHashFieldOffset)); | |
| 2873 __ IndexFromHash(v0, v0); | |
| 2874 | |
| 2875 context()->Plug(v0); | |
| 2876 } | |
| 2877 | |
| 2878 | |
| 2879 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { | 2843 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) { |
| 2880 ZoneList<Expression*>* args = expr->arguments(); | 2844 ZoneList<Expression*>* args = expr->arguments(); |
| 2881 DCHECK_EQ(1, args->length()); | 2845 DCHECK_EQ(1, args->length()); |
| 2882 VisitForAccumulatorValue(args->at(0)); | 2846 VisitForAccumulatorValue(args->at(0)); |
| 2883 __ AssertFunction(v0); | 2847 __ AssertFunction(v0); |
| 2884 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); | 2848 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 2885 __ lw(v0, FieldMemOperand(v0, Map::kPrototypeOffset)); | 2849 __ lw(v0, FieldMemOperand(v0, Map::kPrototypeOffset)); |
| 2886 context()->Plug(v0); | 2850 context()->Plug(v0); |
| 2887 } | 2851 } |
| 2888 | 2852 |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3670 reinterpret_cast<uint32_t>( | 3634 reinterpret_cast<uint32_t>( |
| 3671 isolate->builtins()->OnStackReplacement()->entry())); | 3635 isolate->builtins()->OnStackReplacement()->entry())); |
| 3672 return ON_STACK_REPLACEMENT; | 3636 return ON_STACK_REPLACEMENT; |
| 3673 } | 3637 } |
| 3674 | 3638 |
| 3675 | 3639 |
| 3676 } // namespace internal | 3640 } // namespace internal |
| 3677 } // namespace v8 | 3641 } // namespace v8 |
| 3678 | 3642 |
| 3679 #endif // V8_TARGET_ARCH_MIPS | 3643 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |