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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2751 | 2751 |
2752 // Goto miss case if we do not have a function. | 2752 // Goto miss case if we do not have a function. |
2753 __ GetObjectType(a1, a4, a4); | 2753 __ GetObjectType(a1, a4, a4); |
2754 __ Branch(&miss, ne, a4, Operand(JS_FUNCTION_TYPE)); | 2754 __ Branch(&miss, ne, a4, Operand(JS_FUNCTION_TYPE)); |
2755 | 2755 |
2756 // Make sure the function is not the Array() function, which requires special | 2756 // Make sure the function is not the Array() function, which requires special |
2757 // behavior on MISS. | 2757 // behavior on MISS. |
2758 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, a4); | 2758 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, a4); |
2759 __ Branch(&miss, eq, a1, Operand(a4)); | 2759 __ Branch(&miss, eq, a1, Operand(a4)); |
2760 | 2760 |
| 2761 // Make sure the function belongs to the same native context (which implies |
| 2762 // the same global object). |
| 2763 __ ld(t0, FieldMemOperand(a1, JSFunction::kContextOffset)); |
| 2764 __ ld(t0, ContextOperand(t0, Context::GLOBAL_OBJECT_INDEX)); |
| 2765 __ ld(t1, GlobalObjectOperand()); |
| 2766 __ Branch(&miss, ne, t0, Operand(t1)); |
| 2767 |
2761 // Update stats. | 2768 // Update stats. |
2762 __ ld(a4, FieldMemOperand(a2, with_types_offset)); | 2769 __ ld(a4, FieldMemOperand(a2, with_types_offset)); |
2763 __ Daddu(a4, a4, Operand(Smi::FromInt(1))); | 2770 __ Daddu(a4, a4, Operand(Smi::FromInt(1))); |
2764 __ sd(a4, FieldMemOperand(a2, with_types_offset)); | 2771 __ sd(a4, FieldMemOperand(a2, with_types_offset)); |
2765 | 2772 |
2766 // Initialize the call counter. | 2773 // Initialize the call counter. |
2767 __ dsrl(at, a3, 32 - kPointerSizeLog2); | 2774 __ dsrl(at, a3, 32 - kPointerSizeLog2); |
2768 __ Daddu(at, a2, Operand(at)); | 2775 __ Daddu(at, a2, Operand(at)); |
2769 __ li(t0, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); | 2776 __ li(t0, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); |
2770 __ sd(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); | 2777 __ sd(t0, FieldMemOperand(at, FixedArray::kHeaderSize + kPointerSize)); |
(...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5665 MemOperand(fp, 6 * kPointerSize), NULL); | 5672 MemOperand(fp, 6 * kPointerSize), NULL); |
5666 } | 5673 } |
5667 | 5674 |
5668 | 5675 |
5669 #undef __ | 5676 #undef __ |
5670 | 5677 |
5671 } // namespace internal | 5678 } // namespace internal |
5672 } // namespace v8 | 5679 } // namespace v8 |
5673 | 5680 |
5674 #endif // V8_TARGET_ARCH_MIPS64 | 5681 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |