comparison src/share/vm/adlc/filebuff.hpp @ 475:284d0af00d53

6771309: debugging AD files is difficult without #line directives in generated code Summary: more and better #line and #define directives in the generated code; ADLC itself accepts #line directives Reviewed-by: never, kvn
author jrose
date Tue, 09 Dec 2008 12:41:26 -0800
parents 4d9884b01ba6
children 569b3b226089
comparison
equal deleted inserted replaced
474:7a018855d2f0 475:284d0af00d53
66 66
67 // This returns a pointer to the start of the current line in the buffer, 67 // This returns a pointer to the start of the current line in the buffer,
68 // and increments bufeol and filepos to point at the end of that line. 68 // and increments bufeol and filepos to point at the end of that line.
69 char *get_line(void); 69 char *get_line(void);
70 int linenum() const { return _linenum; } 70 int linenum() const { return _linenum; }
71 void set_linenum(int line) { _linenum = line; }
71 72
72 // This converts a pointer into the buffer to a file offset. It only works 73 // This converts a pointer into the buffer to a file offset. It only works
73 // when the pointer is valid (i.e. just obtained from getline()). 74 // when the pointer is valid (i.e. just obtained from getline()).
74 int getoff(const char *s) { return _bufoff+(int)(s-_buf); } 75 int getoff(const char *s) { return _bufoff+(int)(s-_buf); }
75 }; 76 };