| 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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 CodePatcher::~CodePatcher() { | 1462 CodePatcher::~CodePatcher() { |
| 1463 // Indicate that code has changed. | 1463 // Indicate that code has changed. |
| 1464 CPU::FlushICache(address_, size_); | 1464 CPU::FlushICache(address_, size_); |
| 1465 | 1465 |
| 1466 // Check that the code was patched as expected. | 1466 // Check that the code was patched as expected. |
| 1467 ASSERT(masm_.pc_ == address_ + size_); | 1467 ASSERT(masm_.pc_ == address_ + size_); |
| 1468 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1468 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1469 } | 1469 } |
| 1470 | 1470 |
| 1471 | 1471 |
| 1472 void CodePatcher::Emit(Instr x) { | |
| 1473 masm()->emit(x); | |
| 1474 } | |
| 1475 | |
| 1476 | |
| 1477 void CodePatcher::Emit(Address addr) { | 1472 void CodePatcher::Emit(Address addr) { |
| 1478 masm()->emit(reinterpret_cast<Instr>(addr)); | 1473 masm()->emit_int32(reinterpret_cast<int32_t>(addr)); |
| 1479 } | 1474 } |
| 1480 #endif // ENABLE_DEBUGGER_SUPPORT | 1475 #endif // ENABLE_DEBUGGER_SUPPORT |
| 1481 | 1476 |
| 1482 | 1477 |
| 1483 } } // namespace v8::internal | 1478 } } // namespace v8::internal |
| OLD | NEW |