| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1487 __ bind(&fast_runtime_fallback); | 1487 __ bind(&fast_runtime_fallback); |
| 1488 __ Push(object, function_prototype); | 1488 __ Push(object, function_prototype); |
| 1489 // Invalidate the instanceof cache. | 1489 // Invalidate the instanceof cache. |
| 1490 __ LoadSmiLiteral(scratch, Smi::FromInt(0)); | 1490 __ LoadSmiLiteral(scratch, Smi::FromInt(0)); |
| 1491 __ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex); | 1491 __ StoreRoot(scratch, Heap::kInstanceofCacheFunctionRootIndex); |
| 1492 __ TailCallRuntime(Runtime::kHasInPrototypeChain); | 1492 __ TailCallRuntime(Runtime::kHasInPrototypeChain); |
| 1493 | 1493 |
| 1494 // Slow-case: Call the %InstanceOf runtime function. | 1494 // Slow-case: Call the %InstanceOf runtime function. |
| 1495 __ bind(&slow_case); | 1495 __ bind(&slow_case); |
| 1496 __ Push(object, function); | 1496 __ Push(object, function); |
| 1497 __ TailCallRuntime(Runtime::kInstanceOf); | 1497 __ TailCallRuntime(is_es6_instanceof() ? Runtime::kOrdinaryHasInstance |
| 1498 : Runtime::kInstanceOf); |
| 1498 } | 1499 } |
| 1499 | 1500 |
| 1500 | 1501 |
| 1501 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 1502 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
| 1502 Label miss; | 1503 Label miss; |
| 1503 Register receiver = LoadDescriptor::ReceiverRegister(); | 1504 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 1504 // Ensure that the vector and slot registers won't be clobbered before | 1505 // Ensure that the vector and slot registers won't be clobbered before |
| 1505 // calling the miss handler. | 1506 // calling the miss handler. |
| 1506 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::VectorRegister(), | 1507 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::VectorRegister(), |
| 1507 LoadWithVectorDescriptor::SlotRegister())); | 1508 LoadWithVectorDescriptor::SlotRegister())); |
| (...skipping 4281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5789 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5790 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
| 5790 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5791 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 5791 } | 5792 } |
| 5792 | 5793 |
| 5793 | 5794 |
| 5794 #undef __ | 5795 #undef __ |
| 5795 } // namespace internal | 5796 } // namespace internal |
| 5796 } // namespace v8 | 5797 } // namespace v8 |
| 5797 | 5798 |
| 5798 #endif // V8_TARGET_ARCH_PPC | 5799 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |