| 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/bootstrapper.h" |     9 #include "src/bootstrapper.h" | 
|    10 #include "src/code-stubs.h" |    10 #include "src/code-stubs.h" | 
| (...skipping 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3087   Label miss; |  3087   Label miss; | 
|  3088  |  3088  | 
|  3089   EmitLoadTypeFeedbackVector(masm, a2); |  3089   EmitLoadTypeFeedbackVector(masm, a2); | 
|  3090  |  3090  | 
|  3091   __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, at); |  3091   __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, at); | 
|  3092   __ Branch(&miss, ne, a1, Operand(at)); |  3092   __ Branch(&miss, ne, a1, Operand(at)); | 
|  3093  |  3093  | 
|  3094   __ li(a0, Operand(arg_count())); |  3094   __ li(a0, Operand(arg_count())); | 
|  3095   __ sll(at, a3, kPointerSizeLog2 - kSmiTagSize); |  3095   __ sll(at, a3, kPointerSizeLog2 - kSmiTagSize); | 
|  3096   __ Addu(at, a2, Operand(at)); |  3096   __ Addu(at, a2, Operand(at)); | 
|  3097   __ lw(a2, FieldMemOperand(at, FixedArray::kHeaderSize)); |  3097   __ lw(t0, FieldMemOperand(at, FixedArray::kHeaderSize)); | 
|  3098   // Verify that a2 contains an AllocationSite |  3098  | 
|  3099   __ AssertUndefinedOrAllocationSite(a2, at); |  3099   // Verify that t0 contains an AllocationSite | 
 |  3100   __ lw(t1, FieldMemOperand(t0, HeapObject::kMapOffset)); | 
 |  3101   __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex); | 
 |  3102   __ Branch(&miss, ne, t1, Operand(at)); | 
 |  3103  | 
 |  3104   __ mov(a2, t0); | 
|  3100   ArrayConstructorStub stub(masm->isolate(), arg_count()); |  3105   ArrayConstructorStub stub(masm->isolate(), arg_count()); | 
|  3101   __ TailCallStub(&stub); |  3106   __ TailCallStub(&stub); | 
|  3102  |  3107  | 
|  3103   __ bind(&miss); |  3108   __ bind(&miss); | 
|  3104   GenerateMiss(masm, IC::kCallIC_Customization_Miss); |  3109   GenerateMiss(masm, IC::kCallIC_Customization_Miss); | 
|  3105  |  3110  | 
|  3106   // The slow case, we need this no matter what to complete a call after a miss. |  3111   // The slow case, we need this no matter what to complete a call after a miss. | 
|  3107   CallFunctionNoFeedback(masm, |  3112   CallFunctionNoFeedback(masm, | 
|  3108                          arg_count(), |  3113                          arg_count(), | 
|  3109                          true, |  3114                          true, | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3156  |  3161  | 
|  3157   __ bind(&extra_checks_or_miss); |  3162   __ bind(&extra_checks_or_miss); | 
|  3158   Label miss; |  3163   Label miss; | 
|  3159  |  3164  | 
|  3160   __ LoadRoot(at, Heap::kMegamorphicSymbolRootIndex); |  3165   __ LoadRoot(at, Heap::kMegamorphicSymbolRootIndex); | 
|  3161   __ Branch(&slow_start, eq, t0, Operand(at)); |  3166   __ Branch(&slow_start, eq, t0, Operand(at)); | 
|  3162   __ LoadRoot(at, Heap::kUninitializedSymbolRootIndex); |  3167   __ LoadRoot(at, Heap::kUninitializedSymbolRootIndex); | 
|  3163   __ Branch(&miss, eq, t0, Operand(at)); |  3168   __ Branch(&miss, eq, t0, Operand(at)); | 
|  3164  |  3169  | 
|  3165   if (!FLAG_trace_ic) { |  3170   if (!FLAG_trace_ic) { | 
|  3166     // We are going megamorphic, and we don't want to visit the runtime. |  3171     // We are going megamorphic. If the feedback is a JSFunction, it is fine | 
 |  3172     // to handle it here. More complex cases are dealt with in the runtime. | 
 |  3173     __ AssertNotSmi(t0); | 
 |  3174     __ GetObjectType(t0, t1, t1); | 
 |  3175     __ Branch(&miss, ne, t1, Operand(JS_FUNCTION_TYPE)); | 
|  3167     __ sll(t0, a3, kPointerSizeLog2 - kSmiTagSize); |  3176     __ sll(t0, a3, kPointerSizeLog2 - kSmiTagSize); | 
|  3168     __ Addu(t0, a2, Operand(t0)); |  3177     __ Addu(t0, a2, Operand(t0)); | 
|  3169     __ LoadRoot(at, Heap::kMegamorphicSymbolRootIndex); |  3178     __ LoadRoot(at, Heap::kMegamorphicSymbolRootIndex); | 
|  3170     __ sw(at, FieldMemOperand(t0, FixedArray::kHeaderSize)); |  3179     __ sw(at, FieldMemOperand(t0, FixedArray::kHeaderSize)); | 
|  3171     __ Branch(&slow_start); |  3180     __ Branch(&slow_start); | 
|  3172   } |  3181   } | 
|  3173  |  3182  | 
|  3174   // We are here because tracing is on or we are going monomorphic. |  3183   // We are here because tracing is on or we are going monomorphic. | 
|  3175   __ bind(&miss); |  3184   __ bind(&miss); | 
|  3176   GenerateMiss(masm, IC::kCallIC_Miss); |  3185   GenerateMiss(masm, IC::kCallIC_Miss); | 
| (...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5261                               MemOperand(fp, 6 * kPointerSize), |  5270                               MemOperand(fp, 6 * kPointerSize), | 
|  5262                               NULL); |  5271                               NULL); | 
|  5263 } |  5272 } | 
|  5264  |  5273  | 
|  5265  |  5274  | 
|  5266 #undef __ |  5275 #undef __ | 
|  5267  |  5276  | 
|  5268 } }  // namespace v8::internal |  5277 } }  // namespace v8::internal | 
|  5269  |  5278  | 
|  5270 #endif  // V8_TARGET_ARCH_MIPS |  5279 #endif  // V8_TARGET_ARCH_MIPS | 
| OLD | NEW |