sharkState.hpp revision 1612
/*
* Copyright 2008, 2009 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
class SharkState : public SharkTargetInvariants {
public:
private:
private:
SharkValue** _stack;
SharkValue** _sp;
int _num_monitors;
bool _has_safepointed;
// Method
public:
return &_method;
}
return _method;
}
protected:
}
// Local variables
public:
}
return *local_addr(index);
}
}
// Expression stack
public:
}
return *stack_addr(slot);
}
protected:
}
public:
int stack_depth() const {
}
}
SharkValue* pop() {
return *(--_sp);
}
// Monitors
public:
int num_monitors() const {
return _num_monitors;
}
void set_num_monitors(int num_monitors) {
}
// Temporary oop slot
public:
return &_oop_tmp;
}
return _oop_tmp;
}
}
// Safepointed status
public:
bool has_safepointed() const {
return _has_safepointed;
}
void set_has_safepointed(bool has_safepointed) {
}
// Comparison
public:
// Copy and merge
public:
SharkState* copy() const {
return new SharkState(this);
}
// Value replacement
public:
};
class SharkTopLevelBlock;
// SharkNormalEntryState objects are used to create the state
// that the method will be entered with for a normal invocation.
class SharkNormalEntryState : public SharkState {
public:
};
// SharkOSREntryState objects are used to create the state
// that the method will be entered with for an OSR invocation.
class SharkOSREntryState : public SharkState {
public:
};
// SharkPHIState objects are used to manage the entry state
// for blocks with more than one entry path or for blocks
// entered from blocks that will be compiled later.
class SharkPHIState : public SharkState {
public:
private:
private:
SharkTopLevelBlock* block() const {
return _block;
}
public:
};