/*
* 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.
*
*/
#include "precompiled.hpp"
#include "c1/c1_InstructionPrinter.hpp"
#include "c1/c1_ValueStack.hpp"
// Implementation of ValueStack
, _bci(-99)
, _locks()
{
verify();
}
, _locals()
, _stack()
{
assert(kind != EmptyExceptionState || !Compilation::current()->env()->jvmti_can_access_local_variables(), "need locals");
if (kind != EmptyExceptionState) {
// only allocate space if we need to copy the locals-array
}
// stack will be modified, so reserve enough space to avoid resizing
} else {
// stack will not be modified, so do not waste space
}
}
verify();
}
if (caller_state() != s->caller_state()) return false;
if (locals_size() != s->locals_size()) return false;
if (stack_size() != s->stack_size()) return false;
if (locks_size() != s->locks_size()) return false;
// compare each stack element with the corresponding stack element of s
int index;
}
}
return true;
}
}
}
for_each_state_value(this, v,
}
);
}
// apply function to all values of a list; factored out from values_do(f)
#ifdef ASSERT
assert(!v1->type()->is_double_word() || list.at(i + 1) == NULL, "hi-word of doubleword value must be NULL");
#endif
}
}
}
}
}
return args;
}
int num_locks = 0;
}
return num_locks;
}
return num_locks - 1;
}
return total_locks_size();
}
assert(stack_at(index)->as_Phi() == NULL || stack_at(index)->as_Phi()->block() != b, "phi function already created");
assert(!t->is_double_word() || _stack.at(index + 1) == NULL, "hi-word of doubleword value must be NULL");
}
assert(local_at(index)->as_Phi() == NULL || local_at(index)->as_Phi()->block() != b, "phi function already created");
}
#ifndef PRODUCT
if (stack_is_empty()) {
} else {
for (int i = 0; i < stack_size();) {
Value t = stack_at_inc(i);
ip.print_instr(t);
}
}
if (!no_active_locks()) {
for (int i = 0; i < locks_size(); i++) {
if (t == NULL) {
} else {
ip.print_instr(t);
}
}
}
if (locals_size() > 0) {
for (int i = 0; i < locals_size();) {
if (l == NULL) {
i ++;
} else {
ip.print_instr(l);
}
}
}
if (caller_state() != NULL) {
caller_state()->print();
}
}
if (caller_state() != NULL) {
caller_state()->verify();
}
} else {
assert(bci() == SynchronizationEntryBCI || Bytecodes::is_defined(scope()->method()->java_code_at_bci(bci())), "make sure bci points at a real bytecode");
}
int i;
for (i = 0; i < stack_size(); i++) {
if (v == NULL) {
} else if (v->type()->is_double_word()) {
}
}
for (i = 0; i < locals_size(); i++) {
}
}
for_each_state_value(this, v,
);
}
#endif // PRODUCT