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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 // ----------- S t a t e ------------- | 1677 // ----------- S t a t e ------------- |
1677 // -- r0 : the number of arguments (not including the receiver) | 1678 // -- r0 : the number of arguments (not including the receiver) |
1678 // -- r1 : the function to call (checked to be a JSFunction) | 1679 // -- r1 : the function to call (checked to be a JSFunction) |
1679 // -- r2 : the shared function info. | 1680 // -- r2 : the shared function info. |
1680 // -- cp : the function context. | 1681 // -- cp : the function context. |
1681 // ----------------------------------- | 1682 // ----------------------------------- |
1682 | 1683 |
1683 __ ldr(r2, | 1684 __ ldr(r2, |
1684 FieldMemOperand(r2, SharedFunctionInfo::kFormalParameterCountOffset)); | 1685 FieldMemOperand(r2, SharedFunctionInfo::kFormalParameterCountOffset)); |
1685 __ SmiUntag(r2); | 1686 __ SmiUntag(r2); |
1686 __ ldr(r4, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); | |
1687 ParameterCount actual(r0); | 1687 ParameterCount actual(r0); |
1688 ParameterCount expected(r2); | 1688 ParameterCount expected(r2); |
1689 __ InvokeCode(r4, no_reg, expected, actual, JUMP_FUNCTION, NullCallWrapper()); | 1689 __ InvokeFunctionCode(r1, no_reg, expected, actual, JUMP_FUNCTION, |
| 1690 CheckDebugStepCallWrapper()); |
1690 | 1691 |
1691 // The function is a "classConstructor", need to raise an exception. | 1692 // The function is a "classConstructor", need to raise an exception. |
1692 __ bind(&class_constructor); | 1693 __ bind(&class_constructor); |
1693 { | 1694 { |
1694 FrameScope frame(masm, StackFrame::INTERNAL); | 1695 FrameScope frame(masm, StackFrame::INTERNAL); |
1695 __ push(r1); | 1696 __ push(r1); |
1696 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); | 1697 __ CallRuntime(Runtime::kThrowConstructorNonCallableError, 1); |
1697 } | 1698 } |
1698 } | 1699 } |
1699 | 1700 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 } | 1972 } |
1972 } | 1973 } |
1973 | 1974 |
1974 | 1975 |
1975 #undef __ | 1976 #undef __ |
1976 | 1977 |
1977 } // namespace internal | 1978 } // namespace internal |
1978 } // namespace v8 | 1979 } // namespace v8 |
1979 | 1980 |
1980 #endif // V8_TARGET_ARCH_ARM | 1981 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |