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 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2840 // from the real pointer as a smi. | 2840 // from the real pointer as a smi. |
2841 const char* msg = GetBailoutReason(reason); | 2841 const char* msg = GetBailoutReason(reason); |
2842 intptr_t p1 = reinterpret_cast<intptr_t>(msg); | 2842 intptr_t p1 = reinterpret_cast<intptr_t>(msg); |
2843 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; | 2843 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; |
2844 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); | 2844 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); |
2845 #ifdef DEBUG | 2845 #ifdef DEBUG |
2846 if (msg != NULL) { | 2846 if (msg != NULL) { |
2847 RecordComment("Abort message: "); | 2847 RecordComment("Abort message: "); |
2848 RecordComment(msg); | 2848 RecordComment(msg); |
2849 } | 2849 } |
| 2850 |
| 2851 if (FLAG_trap_on_abort) { |
| 2852 stop(msg); |
| 2853 return; |
| 2854 } |
2850 #endif | 2855 #endif |
2851 | 2856 |
2852 mov(r0, Operand(p0)); | 2857 mov(r0, Operand(p0)); |
2853 push(r0); | 2858 push(r0); |
2854 mov(r0, Operand(Smi::FromInt(p1 - p0))); | 2859 mov(r0, Operand(Smi::FromInt(p1 - p0))); |
2855 push(r0); | 2860 push(r0); |
2856 // Disable stub call restrictions to always allow calls to abort. | 2861 // Disable stub call restrictions to always allow calls to abort. |
2857 if (!has_frame_) { | 2862 if (!has_frame_) { |
2858 // We don't actually want to generate a pile of code for this, so just | 2863 // We don't actually want to generate a pile of code for this, so just |
2859 // claim there is a stack frame, without generating one. | 2864 // claim there is a stack frame, without generating one. |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3888 void CodePatcher::EmitCondition(Condition cond) { | 3893 void CodePatcher::EmitCondition(Condition cond) { |
3889 Instr instr = Assembler::instr_at(masm_.pc_); | 3894 Instr instr = Assembler::instr_at(masm_.pc_); |
3890 instr = (instr & ~kCondMask) | cond; | 3895 instr = (instr & ~kCondMask) | cond; |
3891 masm_.emit(instr); | 3896 masm_.emit(instr); |
3892 } | 3897 } |
3893 | 3898 |
3894 | 3899 |
3895 } } // namespace v8::internal | 3900 } } // namespace v8::internal |
3896 | 3901 |
3897 #endif // V8_TARGET_ARCH_ARM | 3902 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |