| 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 2678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2689 Register jmp_reg = a4; | 2689 Register jmp_reg = a4; |
| 2690 __ ld(jmp_reg, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 2690 __ ld(jmp_reg, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
| 2691 __ ld(jmp_reg, FieldMemOperand(jmp_reg, | 2691 __ ld(jmp_reg, FieldMemOperand(jmp_reg, |
| 2692 SharedFunctionInfo::kConstructStubOffset)); | 2692 SharedFunctionInfo::kConstructStubOffset)); |
| 2693 __ Daddu(at, jmp_reg, Operand(Code::kHeaderSize - kHeapObjectTag)); | 2693 __ Daddu(at, jmp_reg, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 2694 __ Jump(at); | 2694 __ Jump(at); |
| 2695 | 2695 |
| 2696 // a0: number of arguments | 2696 // a0: number of arguments |
| 2697 // a1: called object | 2697 // a1: called object |
| 2698 // a5: object type | 2698 // a5: object type |
| 2699 Label do_call; | |
| 2700 __ bind(&slow); | 2699 __ bind(&slow); |
| 2701 __ Branch(&non_function_call, ne, a5, Operand(JS_FUNCTION_PROXY_TYPE)); | 2700 { |
| 2702 __ GetBuiltinFunction( | 2701 __ Branch(&non_function_call, ne, a5, Operand(JS_FUNCTION_PROXY_TYPE)); |
| 2703 a1, Context::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR_BUILTIN_INDEX); | 2702 // TODO(neis): This doesn't match the ES6 spec for [[Construct]] on proxies. |
| 2704 __ jmp(&do_call); | 2703 __ ld(a1, FieldMemOperand(a1, JSFunctionProxy::kConstructTrapOffset)); |
| 2704 __ Jump(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
| 2705 | 2705 |
| 2706 __ bind(&non_function_call); | 2706 __ bind(&non_function_call); |
| 2707 __ GetBuiltinFunction( | 2707 { |
| 2708 a1, Context::CALL_NON_FUNCTION_AS_CONSTRUCTOR_BUILTIN_INDEX); | 2708 // Determine the delegate for the target (if any). |
| 2709 __ bind(&do_call); | 2709 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2710 // Set expected number of arguments to zero (not changing r0). | 2710 __ SmiTag(a0); |
| 2711 __ li(a2, Operand(0, RelocInfo::NONE32)); | 2711 __ Push(a0, a1); |
| 2712 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 2712 __ CallRuntime(Runtime::kGetConstructorDelegate, 1); |
| 2713 RelocInfo::CODE_TARGET); | 2713 __ mov(a1, v0); |
| 2714 __ Pop(a0); |
| 2715 __ SmiUntag(a0); |
| 2716 } |
| 2717 // The delegate is always a regular function. |
| 2718 __ AssertFunction(a1); |
| 2719 __ Jump(masm->isolate()->builtins()->CallFunction(), |
| 2720 RelocInfo::CODE_TARGET); |
| 2721 } |
| 2714 } | 2722 } |
| 2715 | 2723 |
| 2716 | 2724 |
| 2717 // StringCharCodeAtGenerator. | 2725 // StringCharCodeAtGenerator. |
| 2718 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { | 2726 void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
| 2719 DCHECK(!a4.is(index_)); | 2727 DCHECK(!a4.is(index_)); |
| 2720 DCHECK(!a4.is(result_)); | 2728 DCHECK(!a4.is(result_)); |
| 2721 DCHECK(!a4.is(object_)); | 2729 DCHECK(!a4.is(object_)); |
| 2722 | 2730 |
| 2723 // If the receiver is a smi trigger the non-string case. | 2731 // If the receiver is a smi trigger the non-string case. |
| (...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5773 MemOperand(fp, 6 * kPointerSize), NULL); | 5781 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5774 } | 5782 } |
| 5775 | 5783 |
| 5776 | 5784 |
| 5777 #undef __ | 5785 #undef __ |
| 5778 | 5786 |
| 5779 } // namespace internal | 5787 } // namespace internal |
| 5780 } // namespace v8 | 5788 } // namespace v8 |
| 5781 | 5789 |
| 5782 #endif // V8_TARGET_ARCH_MIPS64 | 5790 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |