Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: src/x64/assembler-x64.h

Issue 7122003: Make x64 to use the RecordWrite stub. This is a step towards getting (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698