Index: src/assembler.h |
=================================================================== |
--- src/assembler.h (revision 13276) |
+++ src/assembler.h (working copy) |
@@ -831,13 +831,17 @@ |
#ifdef ENABLE_GDB_JIT_INTERFACE |
gdbjit_lineinfo_ = NULL; |
#endif |
+ jit_code_event_line_info_ = NULL; |
} |
+~PositionsRecorder() { |
#ifdef ENABLE_GDB_JIT_INTERFACE |
- ~PositionsRecorder() { |
delete gdbjit_lineinfo_; |
+#endif |
+ delete jit_code_event_line_info_; |
} |
+#ifdef ENABLE_GDB_JIT_INTERFACE |
void StartGDBJITLineInfoRecording() { |
if (FLAG_gdbjit) { |
gdbjit_lineinfo_ = new GDBJITLineInfo(); |
@@ -850,7 +854,16 @@ |
return lineinfo; |
} |
#endif |
+ JITCodeLineInfo* InitializeJITLineInfo() { |
danno
2013/01/10 16:47:33
Instead of these routines knowing about JITCodeLin
chunyang.dai
2013/01/18 10:22:44
Done.
|
+ jit_code_event_line_info_ = new JITCodeLineInfo(); |
+ return jit_code_event_line_info_; |
+ } |
+ JITCodeLineInfo* DetachJITLineInfo() { |
danno
2013/01/10 16:47:33
Memory management for JITCodeLineInfo (delete) sho
chunyang.dai
2013/01/18 10:22:44
Done.
|
+ JITCodeLineInfo* lineinfo = jit_code_event_line_info_; |
+ jit_code_event_line_info_ = NULL; |
+ return lineinfo; |
+ } |
// Set current position to pos. |
void RecordPosition(int pos); |
@@ -866,13 +879,17 @@ |
return state_.current_statement_position; |
} |
+ Assembler* assembler() { |
+ return assembler_; |
+ } |
+ |
private: |
Assembler* assembler_; |
PositionState state_; |
#ifdef ENABLE_GDB_JIT_INTERFACE |
GDBJITLineInfo* gdbjit_lineinfo_; |
#endif |
- |
+ JITCodeLineInfo* jit_code_event_line_info_; |
friend class PreservePositionScope; |
DISALLOW_COPY_AND_ASSIGN(PositionsRecorder); |