src/share/vm/adlc/filebuff.hpp

changeset 1204
116b019a3961
parent 1063
7bb995fbd3c0
child 1907
c18cbe5936b8
equal deleted inserted replaced
1203:7a485bc4da16 1204:116b019a3961
71 int linenum() const { return _linenum; } 71 int linenum() const { return _linenum; }
72 void set_linenum(int line) { _linenum = line; } 72 void set_linenum(int line) { _linenum = line; }
73 73
74 // This converts a pointer into the buffer to a file offset. It only works 74 // This converts a pointer into the buffer to a file offset. It only works
75 // when the pointer is valid (i.e. just obtained from getline()). 75 // when the pointer is valid (i.e. just obtained from getline()).
76 long getoff(const char* s) { return _bufoff + (s - _buf); } 76 long getoff(const char* s) { return _bufoff + (long)(s - _buf); }
77 }; 77 };
78 78
79 //------------------------------FileBuffRegion--------------------------------- 79 //------------------------------FileBuffRegion---------------------------------
80 // A buffer region is really a region of some file, specified as a linked list 80 // A buffer region is really a region of some file, specified as a linked list
81 // of offsets and lengths. These regions can be merged; overlapping regions 81 // of offsets and lengths. These regions can be merged; overlapping regions

mercurial