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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1889 __ Ret(); | 1889 __ Ret(); |
1890 | 1890 |
1891 // 3. Raise a TypeError if the receiver is not a date. | 1891 // 3. Raise a TypeError if the receiver is not a date. |
1892 __ bind(&receiver_not_date); | 1892 __ bind(&receiver_not_date); |
1893 { | 1893 { |
1894 FrameScope scope(masm, StackFrame::MANUAL); | 1894 FrameScope scope(masm, StackFrame::MANUAL); |
1895 __ push(r2); | 1895 __ push(r2); |
1896 __ LoadSmiLiteral(r2, Smi::FromInt(0)); | 1896 __ LoadSmiLiteral(r2, Smi::FromInt(0)); |
1897 __ EnterBuiltinFrame(cp, r3, r2); | 1897 __ EnterBuiltinFrame(cp, r3, r2); |
1898 __ CallRuntime(Runtime::kThrowNotDateError); | 1898 __ CallRuntime(Runtime::kThrowNotDateError); |
| 1899 |
| 1900 // It's far from obvious, but this final trailing instruction after the call |
| 1901 // is required for StackFrame::LookupCode to work correctly. To illustrate |
| 1902 // why: if call were the final instruction in the code object, then the pc |
| 1903 // (== return address) would point beyond the code object when the stack is |
| 1904 // traversed. When we then try to look up the code object through |
| 1905 // StackFrame::LookupCode, we actually return the next code object that |
| 1906 // happens to be on the same page in memory. |
| 1907 // TODO(jgruber): A proper fix for this would be nice. |
| 1908 __ nop(); |
1899 } | 1909 } |
1900 } | 1910 } |
1901 | 1911 |
1902 // static | 1912 // static |
1903 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1913 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1904 // ----------- S t a t e ------------- | 1914 // ----------- S t a t e ------------- |
1905 // -- r2 : argc | 1915 // -- r2 : argc |
1906 // -- sp[0] : argArray | 1916 // -- sp[0] : argArray |
1907 // -- sp[4] : thisArg | 1917 // -- sp[4] : thisArg |
1908 // -- sp[8] : receiver | 1918 // -- sp[8] : receiver |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3021 __ bkpt(0); | 3031 __ bkpt(0); |
3022 } | 3032 } |
3023 } | 3033 } |
3024 | 3034 |
3025 #undef __ | 3035 #undef __ |
3026 | 3036 |
3027 } // namespace internal | 3037 } // namespace internal |
3028 } // namespace v8 | 3038 } // namespace v8 |
3029 | 3039 |
3030 #endif // V8_TARGET_ARCH_S390 | 3040 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |