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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1524 FieldMemOperand(object, HeapObject::kMapOffset)); // In delay slot. | 1524 FieldMemOperand(object, HeapObject::kMapOffset)); // In delay slot. |
1525 __ LoadRoot(result, Heap::kFalseValueRootIndex); | 1525 __ LoadRoot(result, Heap::kFalseValueRootIndex); |
1526 __ bind(&done); | 1526 __ bind(&done); |
1527 __ Ret(USE_DELAY_SLOT); | 1527 __ Ret(USE_DELAY_SLOT); |
1528 __ StoreRoot(result, | 1528 __ StoreRoot(result, |
1529 Heap::kInstanceofCacheAnswerRootIndex); // In delay slot. | 1529 Heap::kInstanceofCacheAnswerRootIndex); // In delay slot. |
1530 | 1530 |
1531 // Proxy-case: Call the %HasInPrototypeChain runtime function. | 1531 // Proxy-case: Call the %HasInPrototypeChain runtime function. |
1532 __ bind(&proxy_case); | 1532 __ bind(&proxy_case); |
1533 __ Push(object, function_prototype); | 1533 __ Push(object, function_prototype); |
| 1534 // Invalidate the instanceof cache. |
| 1535 __ li(scratch, Operand(Smi::FromInt(0))); |
| 1536 __ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex); |
1534 __ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1); | 1537 __ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1); |
1535 | 1538 |
1536 // Slow-case: Call the %InstanceOf runtime function. | 1539 // Slow-case: Call the %InstanceOf runtime function. |
1537 __ bind(&slow_case); | 1540 __ bind(&slow_case); |
1538 __ Push(object, function); | 1541 __ Push(object, function); |
1539 __ TailCallRuntime(Runtime::kInstanceOf, 2, 1); | 1542 __ TailCallRuntime(Runtime::kInstanceOf, 2, 1); |
1540 } | 1543 } |
1541 | 1544 |
1542 | 1545 |
1543 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 1546 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
(...skipping 4051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5595 MemOperand(fp, 6 * kPointerSize), NULL); | 5598 MemOperand(fp, 6 * kPointerSize), NULL); |
5596 } | 5599 } |
5597 | 5600 |
5598 | 5601 |
5599 #undef __ | 5602 #undef __ |
5600 | 5603 |
5601 } // namespace internal | 5604 } // namespace internal |
5602 } // namespace v8 | 5605 } // namespace v8 |
5603 | 5606 |
5604 #endif // V8_TARGET_ARCH_MIPS64 | 5607 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |