| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 intptr_t p1 = reinterpret_cast<intptr_t>(msg); | 1713 intptr_t p1 = reinterpret_cast<intptr_t>(msg); |
| 1714 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; | 1714 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; |
| 1715 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); | 1715 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); |
| 1716 #ifdef DEBUG | 1716 #ifdef DEBUG |
| 1717 if (msg != NULL) { | 1717 if (msg != NULL) { |
| 1718 RecordComment("Abort message: "); | 1718 RecordComment("Abort message: "); |
| 1719 RecordComment(msg); | 1719 RecordComment(msg); |
| 1720 } | 1720 } |
| 1721 #endif | 1721 #endif |
| 1722 // Disable stub call restrictions to always allow calls to abort. | 1722 // Disable stub call restrictions to always allow calls to abort. |
| 1723 set_allow_stub_calls(true); | 1723 AllowStubCallsScope allow_scope(this, true); |
| 1724 | 1724 |
| 1725 push(eax); | 1725 push(eax); |
| 1726 push(Immediate(p0)); | 1726 push(Immediate(p0)); |
| 1727 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0)))); | 1727 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0)))); |
| 1728 CallRuntime(Runtime::kAbort, 2); | 1728 CallRuntime(Runtime::kAbort, 2); |
| 1729 // will not return here | 1729 // will not return here |
| 1730 int3(); | 1730 int3(); |
| 1731 } | 1731 } |
| 1732 | 1732 |
| 1733 | 1733 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 | 1904 |
| 1905 // Check that the code was patched as expected. | 1905 // Check that the code was patched as expected. |
| 1906 ASSERT(masm_.pc_ == address_ + size_); | 1906 ASSERT(masm_.pc_ == address_ + size_); |
| 1907 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1907 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 | 1910 |
| 1911 } } // namespace v8::internal | 1911 } } // namespace v8::internal |
| 1912 | 1912 |
| 1913 #endif // V8_TARGET_ARCH_IA32 | 1913 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |