src/share/vm/adlc/filebuff.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/adlc/filebuff.hpp Mon May 5 12:28:31 2014
--- new/src/share/vm/adlc/filebuff.hpp Mon May 5 12:28:30 2014
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 24,36 ****
--- 24,33 ----
#ifndef SHARE_VM_ADLC_FILEBUFF_HPP
#define SHARE_VM_ADLC_FILEBUFF_HPP
// FILEBUFF.HPP - Definitions for parser file buffering routines
#include <iostream>
using namespace std;
// STRUCTURE FOR HANDLING INPUT AND OUTPUT FILES
class BufferedFile {
public:
*** 44,54 ****
--- 41,50 ----
//------------------------------FileBuff--------------------------------------
// This class defines a nicely behaved buffer of text. Entire file of text
// is read into buffer at creation, with sentinels at start and end.
class FileBuff {
friend class FileBuffRegion;
private:
long _bufferSize; // Size of text holding buffer.
long _offset; // Expected filepointer offset.
long _bufoff; // Start of buffer file offset
*** 81,110 ****
--- 77,82 ----
// This converts a pointer into the buffer to a file offset. It only works
// when the pointer is valid (i.e. just obtained from getline()).
long getoff(const char* s) { return _bufoff + (long)(s - _buf); }
};
//------------------------------FileBuffRegion---------------------------------
// A buffer region is really a region of some file, specified as a linked list
// of offsets and lengths. These regions can be merged; overlapping regions
// will coalesce.
class FileBuffRegion {
public: // Workaround dev-studio friend/private bug
FileBuffRegion *_next; // Linked list of regions sorted by offset.
private:
FileBuff *_bfr; // The Buffer of the file
int _offset, _length; // The file area
int _sol; // Start of line where the file area starts
int _line; // First line of region
public:
FileBuffRegion(FileBuff*, int sol, int line, int offset, int len);
~FileBuffRegion();
FileBuffRegion *copy(); // Deep copy
FileBuffRegion *merge(FileBuffRegion*); // Merge 2 regions; delete input
void print(ostream&);
friend ostream& operator<< (ostream&, FileBuffRegion&);
};
#endif // SHARE_VM_ADLC_FILEBUFF_HPP
src/share/vm/adlc/filebuff.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File