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 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 __ Ret(); | 1860 __ Ret(); |
1861 | 1861 |
1862 // 3. Raise a TypeError if the receiver is not a date. | 1862 // 3. Raise a TypeError if the receiver is not a date. |
1863 __ bind(&receiver_not_date); | 1863 __ bind(&receiver_not_date); |
1864 { | 1864 { |
1865 FrameScope scope(masm, StackFrame::MANUAL); | 1865 FrameScope scope(masm, StackFrame::MANUAL); |
1866 __ Push(r0); | 1866 __ Push(r0); |
1867 __ Move(r0, Smi::FromInt(0)); | 1867 __ Move(r0, Smi::FromInt(0)); |
1868 __ EnterBuiltinFrame(cp, r1, r0); | 1868 __ EnterBuiltinFrame(cp, r1, r0); |
1869 __ CallRuntime(Runtime::kThrowNotDateError); | 1869 __ CallRuntime(Runtime::kThrowNotDateError); |
| 1870 |
| 1871 // It's far from obvious, but this final trailing instruction after the call |
| 1872 // is required for StackFrame::LookupCode to work correctly. To illustrate |
| 1873 // why: if call were the final instruction in the code object, then the pc |
| 1874 // (== return address) would point beyond the code object when the stack is |
| 1875 // traversed. When we then try to look up the code object through |
| 1876 // StackFrame::LookupCode, we actually return the next code object that |
| 1877 // happens to be on the same page in memory. |
| 1878 // TODO(jgruber): A proper fix for this would be nice. |
| 1879 __ nop(); |
1870 } | 1880 } |
1871 } | 1881 } |
1872 | 1882 |
1873 // static | 1883 // static |
1874 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1884 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1875 // ----------- S t a t e ------------- | 1885 // ----------- S t a t e ------------- |
1876 // -- r0 : argc | 1886 // -- r0 : argc |
1877 // -- sp[0] : argArray | 1887 // -- sp[0] : argArray |
1878 // -- sp[4] : thisArg | 1888 // -- sp[4] : thisArg |
1879 // -- sp[8] : receiver | 1889 // -- sp[8] : receiver |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2923 __ bkpt(0); | 2933 __ bkpt(0); |
2924 } | 2934 } |
2925 } | 2935 } |
2926 | 2936 |
2927 #undef __ | 2937 #undef __ |
2928 | 2938 |
2929 } // namespace internal | 2939 } // namespace internal |
2930 } // namespace v8 | 2940 } // namespace v8 |
2931 | 2941 |
2932 #endif // V8_TARGET_ARCH_ARM | 2942 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |