| 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 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2441 static void GenerateRecordCallTarget(MacroAssembler* masm) { | 2441 static void GenerateRecordCallTarget(MacroAssembler* masm) { |
| 2442 // Cache the called function in a feedback vector slot. Cache states | 2442 // Cache the called function in a feedback vector slot. Cache states |
| 2443 // are uninitialized, monomorphic (indicated by a JSFunction), and | 2443 // are uninitialized, monomorphic (indicated by a JSFunction), and |
| 2444 // megamorphic. | 2444 // megamorphic. |
| 2445 // a0 : number of arguments to the construct function | 2445 // a0 : number of arguments to the construct function |
| 2446 // a1 : the function to call | 2446 // a1 : the function to call |
| 2447 // a2 : Feedback vector | 2447 // a2 : Feedback vector |
| 2448 // a3 : slot in feedback vector (Smi) | 2448 // a3 : slot in feedback vector (Smi) |
| 2449 Label initialize, done, miss, megamorphic, not_array_function; | 2449 Label initialize, done, miss, megamorphic, not_array_function; |
| 2450 | 2450 |
| 2451 DCHECK_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()), | 2451 DCHECK_EQ(*TypeFeedbackVector::MegamorphicSentinel(masm->isolate()), |
| 2452 masm->isolate()->heap()->megamorphic_symbol()); | 2452 masm->isolate()->heap()->megamorphic_symbol()); |
| 2453 DCHECK_EQ(*TypeFeedbackInfo::UninitializedSentinel(masm->isolate()), | 2453 DCHECK_EQ(*TypeFeedbackVector::UninitializedSentinel(masm->isolate()), |
| 2454 masm->isolate()->heap()->uninitialized_symbol()); | 2454 masm->isolate()->heap()->uninitialized_symbol()); |
| 2455 | 2455 |
| 2456 // Load the cache state into t0. | 2456 // Load the cache state into t0. |
| 2457 __ sll(t0, a3, kPointerSizeLog2 - kSmiTagSize); | 2457 __ sll(t0, a3, kPointerSizeLog2 - kSmiTagSize); |
| 2458 __ Addu(t0, a2, Operand(t0)); | 2458 __ Addu(t0, a2, Operand(t0)); |
| 2459 __ lw(t0, FieldMemOperand(t0, FixedArray::kHeaderSize)); | 2459 __ lw(t0, FieldMemOperand(t0, FixedArray::kHeaderSize)); |
| 2460 | 2460 |
| 2461 // A monomorphic cache hit or an already megamorphic state: invoke the | 2461 // A monomorphic cache hit or an already megamorphic state: invoke the |
| 2462 // function without changing the state. | 2462 // function without changing the state. |
| 2463 __ Branch(&done, eq, t0, Operand(a1)); | 2463 __ Branch(&done, eq, t0, Operand(a1)); |
| (...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4859 MemOperand(fp, 6 * kPointerSize), | 4859 MemOperand(fp, 6 * kPointerSize), |
| 4860 NULL); | 4860 NULL); |
| 4861 } | 4861 } |
| 4862 | 4862 |
| 4863 | 4863 |
| 4864 #undef __ | 4864 #undef __ |
| 4865 | 4865 |
| 4866 } } // namespace v8::internal | 4866 } } // namespace v8::internal |
| 4867 | 4867 |
| 4868 #endif // V8_TARGET_ARCH_MIPS | 4868 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |