| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 // from the real pointer as a smi. | 1386 // from the real pointer as a smi. |
| 1387 intptr_t p1 = reinterpret_cast<intptr_t>(msg); | 1387 intptr_t p1 = reinterpret_cast<intptr_t>(msg); |
| 1388 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; | 1388 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; |
| 1389 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); | 1389 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); |
| 1390 #ifdef DEBUG | 1390 #ifdef DEBUG |
| 1391 if (msg != NULL) { | 1391 if (msg != NULL) { |
| 1392 RecordComment("Abort message: "); | 1392 RecordComment("Abort message: "); |
| 1393 RecordComment(msg); | 1393 RecordComment(msg); |
| 1394 } | 1394 } |
| 1395 #endif | 1395 #endif |
| 1396 // Disable stub call restrictions to always allow cals to abort. | 1396 // Disable stub call restrictions to always allow calls to abort. |
| 1397 set_allow_stub_calls(true); | 1397 set_allow_stub_calls(true); |
| 1398 | 1398 |
| 1399 push(eax); | 1399 push(eax); |
| 1400 push(Immediate(p0)); | 1400 push(Immediate(p0)); |
| 1401 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0)))); | 1401 push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0)))); |
| 1402 CallRuntime(Runtime::kAbort, 2); | 1402 CallRuntime(Runtime::kAbort, 2); |
| 1403 // will not return here | 1403 // will not return here |
| 1404 int3(); | 1404 int3(); |
| 1405 } | 1405 } |
| 1406 | 1406 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1418 // Indicate that code has changed. | 1418 // Indicate that code has changed. |
| 1419 CPU::FlushICache(address_, size_); | 1419 CPU::FlushICache(address_, size_); |
| 1420 | 1420 |
| 1421 // Check that the code was patched as expected. | 1421 // Check that the code was patched as expected. |
| 1422 ASSERT(masm_.pc_ == address_ + size_); | 1422 ASSERT(masm_.pc_ == address_ + size_); |
| 1423 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1423 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1424 } | 1424 } |
| 1425 | 1425 |
| 1426 | 1426 |
| 1427 } } // namespace v8::internal | 1427 } } // namespace v8::internal |
| OLD | NEW |