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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1522 FieldMemOperand(object, HeapObject::kMapOffset)); // In delay slot. | 1522 FieldMemOperand(object, HeapObject::kMapOffset)); // In delay slot. |
1523 __ LoadRoot(result, Heap::kFalseValueRootIndex); | 1523 __ LoadRoot(result, Heap::kFalseValueRootIndex); |
1524 __ bind(&done); | 1524 __ bind(&done); |
1525 __ Ret(USE_DELAY_SLOT); | 1525 __ Ret(USE_DELAY_SLOT); |
1526 __ StoreRoot(result, | 1526 __ StoreRoot(result, |
1527 Heap::kInstanceofCacheAnswerRootIndex); // In delay slot. | 1527 Heap::kInstanceofCacheAnswerRootIndex); // In delay slot. |
1528 | 1528 |
1529 // Proxy-case: Call the %HasInPrototypeChain runtime function. | 1529 // Proxy-case: Call the %HasInPrototypeChain runtime function. |
1530 __ bind(&proxy_case); | 1530 __ bind(&proxy_case); |
1531 __ Push(object, function_prototype); | 1531 __ Push(object, function_prototype); |
1532 // Invalidate the instanceof cache. | |
1533 __ li(scratch, Operand(Smi::FromInt(0))); | |
dusan.milosavljevic
2015/12/12 02:40:25
Can we use zero reg here?
paul.l...
2015/12/12 02:55:27
Definitely we could use move from zero reg. But li
paul.l...
2015/12/12 02:57:11
Sorry, you are right, I missed it. I think I stopp
| |
1534 __ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex); | |
1532 __ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1); | 1535 __ TailCallRuntime(Runtime::kHasInPrototypeChain, 2, 1); |
1533 | 1536 |
1534 // Slow-case: Call the %InstanceOf runtime function. | 1537 // Slow-case: Call the %InstanceOf runtime function. |
1535 __ bind(&slow_case); | 1538 __ bind(&slow_case); |
1536 __ Push(object, function); | 1539 __ Push(object, function); |
1537 __ TailCallRuntime(Runtime::kInstanceOf, 2, 1); | 1540 __ TailCallRuntime(Runtime::kInstanceOf, 2, 1); |
1538 } | 1541 } |
1539 | 1542 |
1540 | 1543 |
1541 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 1544 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
(...skipping 4023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5565 MemOperand(fp, 6 * kPointerSize), NULL); | 5568 MemOperand(fp, 6 * kPointerSize), NULL); |
5566 } | 5569 } |
5567 | 5570 |
5568 | 5571 |
5569 #undef __ | 5572 #undef __ |
5570 | 5573 |
5571 } // namespace internal | 5574 } // namespace internal |
5572 } // namespace v8 | 5575 } // namespace v8 |
5573 | 5576 |
5574 #endif // V8_TARGET_ARCH_MIPS | 5577 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |