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

Unified Diff: runtime/vm/assembler_ia32.h

Issue 10407019: Extend assembler with ability to produce comments for the generated code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32.cc » ('j') | runtime/vm/assembler_ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32.h
diff --git a/runtime/vm/assembler_ia32.h b/runtime/vm/assembler_ia32.h
index bcb2f755b671fb4e6995e8607c5ed6c533b93bf7..d5a351fb4bdfba12b964df2cad4680527b1b91b7 100644
--- a/runtime/vm/assembler_ia32.h
+++ b/runtime/vm/assembler_ia32.h
@@ -561,10 +561,28 @@ class Assembler : public ValueObject {
static void InitializeMemoryWithBreakpoints(uword data, int length);
+ void Comment(const char* comment);
+ CodeComments GetComments();
srdjan 2012/05/17 17:22:08 CodeComments is too close to CodeComment (confusin
srdjan 2012/05/17 17:22:08 GetComments -> GetCodeComments since you are not r
Vyacheslav Egorov (Google) 2012/05/17 21:16:27 Done.
+
private:
AssemblerBuffer buffer_;
int prolog_offset_;
+ class CodeComment : public ZoneAllocated {
+ public:
+ CodeComment(intptr_t pc, const String& comment)
+ : pc_(pc), comment_(comment) { }
+
+ intptr_t pc() const { return pc_; }
+ const String& comment() const { return comment_; }
+
+ private:
+ intptr_t pc_;
+ const String& comment_;
srdjan 2012/05/17 17:22:08 Add DISALLOW_bla_bla
Vyacheslav Egorov (Google) 2012/05/17 21:16:27 Done.
+ };
+
+ GrowableArray<CodeComment*> comments_;
+
inline void EmitUint8(uint8_t value);
inline void EmitInt32(int32_t value);
inline void EmitRegisterOperand(int rm, int reg);
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32.cc » ('j') | runtime/vm/assembler_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698