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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 | 1937 |
1938 // Check that the key is an array index, that is Uint32. | 1938 // Check that the key is an array index, that is Uint32. |
1939 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask)); | 1939 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask)); |
1940 __ Branch(&slow, ne, t0, Operand(zero_reg)); | 1940 __ Branch(&slow, ne, t0, Operand(zero_reg)); |
1941 | 1941 |
1942 // Everything is fine, call runtime. | 1942 // Everything is fine, call runtime. |
1943 __ Push(receiver, key); // Receiver, key. | 1943 __ Push(receiver, key); // Receiver, key. |
1944 | 1944 |
1945 // Perform tail call to the entry. | 1945 // Perform tail call to the entry. |
1946 __ TailCallExternalReference( | 1946 __ TailCallExternalReference( |
1947 ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor), | 1947 ExternalReference( |
1948 masm->isolate()), | 1948 Runtime::FunctionForId(Runtime::kLoadElementWithInterceptor), |
| 1949 masm->isolate()), |
1949 2, 1); | 1950 2, 1); |
1950 | 1951 |
1951 __ bind(&slow); | 1952 __ bind(&slow); |
1952 PropertyAccessCompiler::TailCallBuiltin( | 1953 PropertyAccessCompiler::TailCallBuiltin( |
1953 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | 1954 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
1954 } | 1955 } |
1955 | 1956 |
1956 | 1957 |
1957 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { | 1958 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
1958 // sp[0] : number of parameters | 1959 // sp[0] : number of parameters |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3035 } | 3036 } |
3036 | 3037 |
3037 | 3038 |
3038 void CallICStub::GenerateMiss(MacroAssembler* masm) { | 3039 void CallICStub::GenerateMiss(MacroAssembler* masm) { |
3039 FrameScope scope(masm, StackFrame::INTERNAL); | 3040 FrameScope scope(masm, StackFrame::INTERNAL); |
3040 | 3041 |
3041 // Push the receiver and the function and feedback info. | 3042 // Push the receiver and the function and feedback info. |
3042 __ Push(a1, a2, a3); | 3043 __ Push(a1, a2, a3); |
3043 | 3044 |
3044 // Call the entry. | 3045 // Call the entry. |
3045 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss | 3046 Runtime::FunctionId id = GetICState() == DEFAULT |
3046 : IC::kCallIC_Customization_Miss; | 3047 ? Runtime::kCallIC_Miss |
| 3048 : Runtime::kCallIC_Customization_Miss; |
3047 | 3049 |
3048 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); | 3050 ExternalReference miss = |
| 3051 ExternalReference(Runtime::FunctionForId(id), masm->isolate()); |
3049 __ CallExternalReference(miss, 3); | 3052 __ CallExternalReference(miss, 3); |
3050 | 3053 |
3051 // Move result to a1 and exit the internal frame. | 3054 // Move result to a1 and exit the internal frame. |
3052 __ mov(a1, v0); | 3055 __ mov(a1, v0); |
3053 } | 3056 } |
3054 | 3057 |
3055 | 3058 |
3056 // StringCharCodeAtGenerator. | 3059 // StringCharCodeAtGenerator. |
3057 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { | 3060 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
3058 DCHECK(!t0.is(index_)); | 3061 DCHECK(!t0.is(index_)); |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4001 __ subu(v0, a0, a1); | 4004 __ subu(v0, a0, a1); |
4002 | 4005 |
4003 __ bind(&miss); | 4006 __ bind(&miss); |
4004 GenerateMiss(masm); | 4007 GenerateMiss(masm); |
4005 } | 4008 } |
4006 | 4009 |
4007 | 4010 |
4008 void CompareICStub::GenerateMiss(MacroAssembler* masm) { | 4011 void CompareICStub::GenerateMiss(MacroAssembler* masm) { |
4009 { | 4012 { |
4010 // Call the runtime system in a fresh internal frame. | 4013 // Call the runtime system in a fresh internal frame. |
4011 ExternalReference miss = | 4014 ExternalReference miss = ExternalReference( |
4012 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate()); | 4015 Runtime::FunctionForId(Runtime::kCompareIC_Miss), isolate()); |
4013 FrameScope scope(masm, StackFrame::INTERNAL); | 4016 FrameScope scope(masm, StackFrame::INTERNAL); |
4014 __ Push(a1, a0); | 4017 __ Push(a1, a0); |
4015 __ Push(ra, a1, a0); | 4018 __ Push(ra, a1, a0); |
4016 __ li(t0, Operand(Smi::FromInt(op()))); | 4019 __ li(t0, Operand(Smi::FromInt(op()))); |
4017 __ addiu(sp, sp, -kPointerSize); | 4020 __ addiu(sp, sp, -kPointerSize); |
4018 __ CallExternalReference(miss, 3, USE_DELAY_SLOT); | 4021 __ CallExternalReference(miss, 3, USE_DELAY_SLOT); |
4019 __ sw(t0, MemOperand(sp)); // In the delay slot. | 4022 __ sw(t0, MemOperand(sp)); // In the delay slot. |
4020 // Compute the entry point of the rewritten stub. | 4023 // Compute the entry point of the rewritten stub. |
4021 __ Addu(a2, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); | 4024 __ Addu(a2, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
4022 // Restore registers. | 4025 // Restore registers. |
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5579 MemOperand(fp, 6 * kPointerSize), NULL); | 5582 MemOperand(fp, 6 * kPointerSize), NULL); |
5580 } | 5583 } |
5581 | 5584 |
5582 | 5585 |
5583 #undef __ | 5586 #undef __ |
5584 | 5587 |
5585 } // namespace internal | 5588 } // namespace internal |
5586 } // namespace v8 | 5589 } // namespace v8 |
5587 | 5590 |
5588 #endif // V8_TARGET_ARCH_MIPS | 5591 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |