Chromium Code Reviews| Index: src/x64/assembler-x64.h |
| =================================================================== |
| --- src/x64/assembler-x64.h (revision 8207) |
| +++ src/x64/assembler-x64.h (working copy) |
| @@ -1374,6 +1374,18 @@ |
| int pc_offset() const { return static_cast<int>(pc_ - buffer_); } |
| + // Used for patching the code stream while it is being emitted. |
| + inline byte get_opcode(int offset) { |
|
Lasse Reichstein
2011/06/07 14:02:53
Rename to get_byte/set_byte. Or read_byte/patch_by
Erik Corry
2011/06/08 10:38:55
No, but it makes the call site clearer.
Lasse Reichstein
2011/06/08 10:58:46
I don't see us using get_opcode anywhere. Just rem
Lasse Reichstein
2011/06/08 10:58:46
The call site can make its own local functions by
Erik Corry
2011/06/08 11:27:11
I now use set_byte_at and pc_offset instead.
Erik Corry
2011/06/08 11:27:11
It was used in an assert
|
| + ASSERT(offset < 0); |
| + ASSERT(pc_ + offset >= buffer_); |
| + return pc_[offset]; |
| + } |
| + inline void set_opcode(int offset, byte opcode) { |
| + ASSERT(offset < 0); |
| + ASSERT(pc_ + offset >= buffer_); |
| + pc_[offset] = opcode; |
| + } |
| + |
| PositionsRecorder* positions_recorder() { return &positions_recorder_; } |
| // Check if there is less than kGap bytes available in the buffer. |