Index: src/codegen.cc |
=================================================================== |
--- src/codegen.cc (revision 3811) |
+++ src/codegen.cc (working copy) |
@@ -42,7 +42,25 @@ |
namespace v8 { |
namespace internal { |
+#define __ ACCESS_MASM(masm_) |
+#ifdef DEBUG |
+ |
+Comment::Comment(MacroAssembler* masm, const char* msg) |
+ : masm_(masm), msg_(msg) { |
+ __ RecordComment(msg); |
+} |
+ |
+ |
+Comment::~Comment() { |
+ if (msg_[0] == '[') __ RecordComment("]"); |
+} |
+ |
+#endif // DEBUG |
+ |
+#undef __ |
+ |
+ |
CodeGenerator* CodeGeneratorScope::top_ = NULL; |