| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 __ Addu(a0, a0, Operand((kNoCodeAgeSequenceLength) * Assembler::kInstrSize)); | 893 __ Addu(a0, a0, Operand((kNoCodeAgeSequenceLength) * Assembler::kInstrSize)); |
| 894 __ Jump(a0); | 894 __ Jump(a0); |
| 895 } | 895 } |
| 896 | 896 |
| 897 | 897 |
| 898 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { | 898 void Builtins::Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm) { |
| 899 GenerateMakeCodeYoungAgainCommon(masm); | 899 GenerateMakeCodeYoungAgainCommon(masm); |
| 900 } | 900 } |
| 901 | 901 |
| 902 | 902 |
| 903 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { | 903 static void Generate_NotifyStubFailureHelper(MacroAssembler* masm, |
| 904 SaveFPRegsMode save_doubles) { |
| 904 { | 905 { |
| 905 FrameScope scope(masm, StackFrame::INTERNAL); | 906 FrameScope scope(masm, StackFrame::INTERNAL); |
| 906 | 907 |
| 907 // Preserve registers across notification, this is important for compiled | 908 // Preserve registers across notification, this is important for compiled |
| 908 // stubs that tail call the runtime on deopts passing their parameters in | 909 // stubs that tail call the runtime on deopts passing their parameters in |
| 909 // registers. | 910 // registers. |
| 910 __ MultiPush(kJSCallerSaved | kCalleeSaved); | 911 __ MultiPush(kJSCallerSaved | kCalleeSaved); |
| 911 // Pass the function and deoptimization type to the runtime system. | 912 // Pass the function and deoptimization type to the runtime system. |
| 912 __ CallRuntime(Runtime::kNotifyStubFailure, 0); | 913 __ CallRuntime(Runtime::kNotifyStubFailure, 0, save_doubles); |
| 913 __ MultiPop(kJSCallerSaved | kCalleeSaved); | 914 __ MultiPop(kJSCallerSaved | kCalleeSaved); |
| 914 } | 915 } |
| 915 | 916 |
| 916 __ Addu(sp, sp, Operand(kPointerSize)); // Ignore state | 917 __ Addu(sp, sp, Operand(kPointerSize)); // Ignore state |
| 917 __ Jump(ra); // Jump to miss handler | 918 __ Jump(ra); // Jump to miss handler |
| 918 } | 919 } |
| 919 | 920 |
| 920 | 921 |
| 922 void Builtins::Generate_NotifyStubFailure(MacroAssembler* masm) { |
| 923 Generate_NotifyStubFailureHelper(masm, kDontSaveFPRegs); |
| 924 } |
| 925 |
| 926 |
| 927 void Builtins::Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm) { |
| 928 Generate_NotifyStubFailureHelper(masm, kSaveFPRegs); |
| 929 } |
| 930 |
| 931 |
| 921 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, | 932 static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
| 922 Deoptimizer::BailoutType type) { | 933 Deoptimizer::BailoutType type) { |
| 923 { | 934 { |
| 924 FrameScope scope(masm, StackFrame::INTERNAL); | 935 FrameScope scope(masm, StackFrame::INTERNAL); |
| 925 // Pass the function and deoptimization type to the runtime system. | 936 // Pass the function and deoptimization type to the runtime system. |
| 926 __ li(a0, Operand(Smi::FromInt(static_cast<int>(type)))); | 937 __ li(a0, Operand(Smi::FromInt(static_cast<int>(type)))); |
| 927 __ push(a0); | 938 __ push(a0); |
| 928 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); | 939 __ CallRuntime(Runtime::kNotifyDeoptimized, 1); |
| 929 } | 940 } |
| 930 | 941 |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 __ bind(&dont_adapt_arguments); | 1528 __ bind(&dont_adapt_arguments); |
| 1518 __ Jump(a3); | 1529 __ Jump(a3); |
| 1519 } | 1530 } |
| 1520 | 1531 |
| 1521 | 1532 |
| 1522 #undef __ | 1533 #undef __ |
| 1523 | 1534 |
| 1524 } } // namespace v8::internal | 1535 } } // namespace v8::internal |
| 1525 | 1536 |
| 1526 #endif // V8_TARGET_ARCH_MIPS | 1537 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |