| 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 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 __ bind(&no_descriptors); | 1174 __ bind(&no_descriptors); |
| 1175 __ Drop(1); | 1175 __ Drop(1); |
| 1176 __ jmp(&exit); | 1176 __ jmp(&exit); |
| 1177 | 1177 |
| 1178 // We got a fixed array in register v0. Iterate through that. | 1178 // We got a fixed array in register v0. Iterate through that. |
| 1179 Label non_proxy; | 1179 Label non_proxy; |
| 1180 __ bind(&fixed_array); | 1180 __ bind(&fixed_array); |
| 1181 | 1181 |
| 1182 __ li(a1, FeedbackVector()); | 1182 __ li(a1, FeedbackVector()); |
| 1183 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1183 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
| 1184 __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(slot.ToInt()))); | 1184 int vector_index = FeedbackVector()->GetIndex(slot); |
| 1185 __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index))); |
| 1185 | 1186 |
| 1186 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check | 1187 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check |
| 1187 __ lw(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object | 1188 __ lw(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object |
| 1188 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 1189 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
| 1189 __ GetObjectType(a2, a3, a3); | 1190 __ GetObjectType(a2, a3, a3); |
| 1190 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE)); | 1191 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE)); |
| 1191 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy | 1192 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy |
| 1192 __ bind(&non_proxy); | 1193 __ bind(&non_proxy); |
| 1193 __ Push(a1, v0); // Smi and array | 1194 __ Push(a1, v0); // Smi and array |
| 1194 __ lw(a1, FieldMemOperand(v0, FixedArray::kLengthOffset)); | 1195 __ lw(a1, FieldMemOperand(v0, FixedArray::kLengthOffset)); |
| (...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2866 VisitForStackValue(args->at(i)); | 2867 VisitForStackValue(args->at(i)); |
| 2867 } | 2868 } |
| 2868 } | 2869 } |
| 2869 | 2870 |
| 2870 // Record source position of the IC call. | 2871 // Record source position of the IC call. |
| 2871 SetSourcePosition(expr->position()); | 2872 SetSourcePosition(expr->position()); |
| 2872 Handle<Code> ic = CallIC::initialize_stub( | 2873 Handle<Code> ic = CallIC::initialize_stub( |
| 2873 isolate(), arg_count, call_type); | 2874 isolate(), arg_count, call_type); |
| 2874 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 2875 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
| 2875 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2876 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
| 2876 // Don't assign a type feedback id to the IC, since type feedback is provided | 2877 CallIC(ic, TypeFeedbackId(expr->CallFeedbackSlot().ToInt())); |
| 2877 // by the vector above. | |
| 2878 CallIC(ic); | |
| 2879 | 2878 |
| 2880 RecordJSReturnSite(expr); | 2879 RecordJSReturnSite(expr); |
| 2881 // Restore context register. | 2880 // Restore context register. |
| 2882 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2881 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2883 context()->DropAndPlug(1, v0); | 2882 context()->DropAndPlug(1, v0); |
| 2884 } | 2883 } |
| 2885 | 2884 |
| 2886 | 2885 |
| 2887 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { | 2886 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
| 2888 // t2: copy of the first argument or undefined if it doesn't exist. | 2887 // t2: copy of the first argument or undefined if it doesn't exist. |
| (...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5137 Assembler::target_address_at(pc_immediate_load_address)) == | 5136 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5138 reinterpret_cast<uint32_t>( | 5137 reinterpret_cast<uint32_t>( |
| 5139 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5138 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5140 return OSR_AFTER_STACK_CHECK; | 5139 return OSR_AFTER_STACK_CHECK; |
| 5141 } | 5140 } |
| 5142 | 5141 |
| 5143 | 5142 |
| 5144 } } // namespace v8::internal | 5143 } } // namespace v8::internal |
| 5145 | 5144 |
| 5146 #endif // V8_TARGET_ARCH_MIPS | 5145 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |