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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 // r0: number of arguments | 563 // r0: number of arguments |
564 // r1: constructor function | 564 // r1: constructor function |
565 // r3: new target | 565 // r3: new target |
566 if (is_api_function) { | 566 if (is_api_function) { |
567 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 567 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
568 Handle<Code> code = | 568 Handle<Code> code = |
569 masm->isolate()->builtins()->HandleApiCallConstruct(); | 569 masm->isolate()->builtins()->HandleApiCallConstruct(); |
570 __ Call(code, RelocInfo::CODE_TARGET); | 570 __ Call(code, RelocInfo::CODE_TARGET); |
571 } else { | 571 } else { |
572 ParameterCount actual(r0); | 572 ParameterCount actual(r0); |
573 __ InvokeFunction(r1, r3, actual, CALL_FUNCTION, NullCallWrapper()); | 573 __ InvokeFunction(r1, r3, actual, CALL_FUNCTION, |
| 574 CheckDebugStepCallWrapper()); |
574 } | 575 } |
575 | 576 |
576 // Store offset of return address for deoptimizer. | 577 // Store offset of return address for deoptimizer. |
577 if (create_implicit_receiver && !is_api_function) { | 578 if (create_implicit_receiver && !is_api_function) { |
578 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 579 masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
579 } | 580 } |
580 | 581 |
581 // Restore context from the frame. | 582 // Restore context from the frame. |
582 // r0: result | 583 // r0: result |
583 // sp[0]: receiver | 584 // sp[0]: receiver |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 // ----------- S t a t e ------------- | 1680 // ----------- S t a t e ------------- |
1680 // -- r0 : the number of arguments (not including the receiver) | 1681 // -- r0 : the number of arguments (not including the receiver) |
1681 // -- r1 : the function to call (checked to be a JSFunction) | 1682 // -- r1 : the function to call (checked to be a JSFunction) |
1682 // -- r2 : the shared function info. | 1683 // -- r2 : the shared function info. |
1683 // -- cp : the function context. | 1684 // -- cp : the function context. |
1684 // ----------------------------------- | 1685 // ----------------------------------- |
1685 | 1686 |
1686 __ ldr(r2, | 1687 __ ldr(r2, |
1687 FieldMemOperand(r2, SharedFunctionInfo::kFormalParameterCountOffset)); | 1688 FieldMemOperand(r2, SharedFunctionInfo::kFormalParameterCountOffset)); |
1688 __ SmiUntag(r2); | 1689 __ SmiUntag(r2); |
1689 __ ldr(r4, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); | |
1690 ParameterCount actual(r0); | 1690 ParameterCount actual(r0); |
1691 ParameterCount expected(r2); | 1691 ParameterCount expected(r2); |
1692 __ InvokeCode(r4, no_reg, expected, actual, JUMP_FUNCTION, NullCallWrapper()); | 1692 __ InvokeFunctionCode(r1, no_reg, expected, actual, JUMP_FUNCTION, |
| 1693 CheckDebugStepCallWrapper()); |
1693 | 1694 |
1694 // The function is a "classConstructor", need to raise an exception. | 1695 // The function is a "classConstructor", need to raise an exception. |
1695 __ bind(&class_constructor); | 1696 __ bind(&class_constructor); |
1696 { | 1697 { |
1697 FrameScope frame(masm, StackFrame::INTERNAL); | 1698 FrameScope frame(masm, StackFrame::INTERNAL); |
1698 __ push(r1); | 1699 __ push(r1); |
1699 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); | 1700 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); |
1700 } | 1701 } |
1701 } | 1702 } |
1702 | 1703 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 } | 1975 } |
1975 } | 1976 } |
1976 | 1977 |
1977 | 1978 |
1978 #undef __ | 1979 #undef __ |
1979 | 1980 |
1980 } // namespace internal | 1981 } // namespace internal |
1981 } // namespace v8 | 1982 } // namespace v8 |
1982 | 1983 |
1983 #endif // V8_TARGET_ARCH_ARM | 1984 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |