| Index: runtime/vm/assembler_x64.h
|
| diff --git a/runtime/vm/assembler_x64.h b/runtime/vm/assembler_x64.h
|
| index b4b0ee8744d57c605991194f5274429714ceea8b..af9e1ed40719d7435d2b3b1ce4f0dfe946d825ca 100644
|
| --- a/runtime/vm/assembler_x64.h
|
| +++ b/runtime/vm/assembler_x64.h
|
| @@ -296,7 +296,7 @@ class Label : public ValueObject {
|
|
|
| class Assembler : public ValueObject {
|
| public:
|
| - Assembler() : buffer_(), prolog_offset_(-1) { }
|
| + Assembler() : buffer_(), prolog_offset_(-1), comments_() { }
|
| ~Assembler() { }
|
|
|
| static const bool kNearJump = true;
|
| @@ -530,6 +530,9 @@ class Assembler : public ValueObject {
|
| void Align(int alignment, int offset);
|
| void Bind(Label* label);
|
|
|
| + void Comment(const char* format, ...);
|
| + const Code::Comments& GetCodeComments() const;
|
| +
|
| int CodeSize() const { return buffer_.Size(); }
|
| int prolog_offset() const { return prolog_offset_; }
|
| const ZoneGrowableArray<int>& GetPointerOffsets() const {
|
| @@ -552,6 +555,23 @@ class Assembler : public ValueObject {
|
| AssemblerBuffer buffer_;
|
| int prolog_offset_;
|
|
|
| + class CodeComment : public ZoneAllocated {
|
| + public:
|
| + CodeComment(intptr_t pc_offset, const String& comment)
|
| + : pc_offset_(pc_offset), comment_(comment) { }
|
| +
|
| + intptr_t pc_offset() const { return pc_offset_; }
|
| + const String& comment() const { return comment_; }
|
| +
|
| + private:
|
| + intptr_t pc_offset_;
|
| + const String& comment_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(CodeComment);
|
| + };
|
| +
|
| + GrowableArray<CodeComment*> comments_;
|
| +
|
| inline void EmitUint8(uint8_t value);
|
| inline void EmitInt32(int32_t value);
|
| inline void EmitInt64(int64_t value);
|
|
|