/*
* 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"
#include "ci/ciArray.hpp"
#include "ci/ciInstance.hpp"
#include "ci/ciObject.hpp"
#ifndef PRODUCT
switch (type) {
case T_BOOLEAN: return "boolean";
case T_BYTE : return "byte";
case T_CHAR : return "char";
case T_SHORT : return "short";
case T_INT : return "int";
case T_LONG : return "long";
case T_FLOAT : return "float";
case T_DOUBLE : return "double";
case T_ARRAY : return "array";
case T_OBJECT : return "object";
default : return "???";
}
}
switch (cond) {
}
return NULL;
}
switch (op) {
// arithmetic ops
// shift ops
// logic ops
}
}
return true;
}
return false;
}
}
}
if (value->is_null_object()) {
} else {
}
} else {
}
}
} else {
}
}
}
}
}
}
print_value(instr->x());
print_value(instr->y());
}
} else {
}
}
}
if (stack->stack_is_empty()) {
} else {
for (int i = 0; i < stack->stack_size();) {
}
}
}
}
if (!stack->no_active_locks()) {
// print out the lines on the line below this
// one at the same indentation level.
for (int i = i = 0; i < stack->locks_size(); i++) {
if (t == NULL) {
// synchronized methods push null on the lock stack
} else {
print_value(t);
}
}
}
}
}
}
}
}
}
print_value(v);
// print phi operands
for (int j = 0; j < phi->operand_count(); j ++) {
}
}
print_alias(v);
}
if (v != v->subst()) {
}
}
}
}
// print instruction data on one line
// add a line for StateSplit instructions w/ non-empty stacks
// (make it robust so we can print incomplete instructions)
}
}
if (x->is_illegal())
}
}
switch (t->tag()) {
case longTag : output()->print(os::jlong_format_specifier(), t->as_LongConstant()->value()); output()->print("L"); break;
case objectTag : print_object(x); break;
}
}
print_field(x);
}
print_field(x);
print_value(x->value());
}
print_value(x->array());
}
print_indexed(x);
}
print_indexed(x);
print_value(x->value());
}
print_value(x->x());
}
print_op2(x);
}
print_op2(x);
}
print_op2(x);
}
print_op2(x);
}
print_value(x->x());
print_value(x->y());
print_value(x->tval());
print_value(x->fval());
}
print_value(x->value());
}
print_value(x->obj());
if (!x->can_trap()) {
}
}
print_value(x->obj());
}
print_value(x->receiver());
}
for (int i = 0; i < x->number_of_arguments(); i++) {
print_value(x->argument_at(i));
}
}
print_klass(x->klass());
}
print_value(x->length());
}
print_value(x->length());
print_klass(x->klass());
}
}
print_klass(x->klass());
}
print_monitor(x);
}
print_monitor(x);
}
} else {
}
else
for (int i = 0; i < x->number_of_arguments(); i++) {
print_value(x->argument_at(i));
}
}
// print block id
// print flags
bool printed_flag = false;
}
}
}
}
}
}
}
// print block bci range
// print block successors
for (int i = 0; i < end->number_of_sux(); i++) {
}
}
// print exception handlers
if (x->number_of_exception_handlers() > 0) {
for (int i = 0; i < x->number_of_exception_handlers(); i++) {
}
}
// print dominator block
}
// print predecessors and successors
if (x->successors()->length() > 0) {
for (int i = 0; i < x->successors()->length(); i ++) {
}
}
if (x->number_of_preds() > 0) {
for (int i = 0; i < x->number_of_preds(); i ++) {
}
}
if (!_print_phis) {
return;
}
// print phi functions
bool has_phis_in_locals = false;
bool has_phis_on_stack = false;
int i = 0;
has_phis_on_stack = is_phi_of_block(v, x);
}
do {
has_phis_in_locals = is_phi_of_block(v, x);
// also ignore illegal HiWords
}
}
// print values in locals
if (has_phis_in_locals) {
do {
for (int i = 0; i < state->locals_size();) {
if (v) {
// also ignore illegal HiWords
} else {
i ++;
}
}
}
// print values on stack
if (has_phis_on_stack) {
int i = 0;
while (i < x->state()->stack_size()) {
int o = i;
if (v) {
}
}
}
}
print_value(x->obj());
print_klass(x->klass());
}
print_value(x->obj());
print_klass(x->klass());
}
}
print_value(x->x());
print_value(x->y());
}
}
print_value(x->tag());
int l = x->length();
for (int i = 0; i < l; i++) {
}
}
print_value(x->tag());
int l = x->length();
for (int i = 0; i < l; i++) {
}
}
} else {
print_value(x->result());
}
}
print_value(x->exception());
}
if (x->number_of_sux() > 1) {
}
}
}
}
print_value(x->input());
}
print_unsafe_raw_op(x, "UnsafeGetRaw");
}
print_unsafe_raw_op(x, "UnsafePutRaw");
print_value(x->value());
}
print_unsafe_object_op(x, "UnsafeGetObject");
}
print_unsafe_object_op(x, "UnsafePutObject");
print_value(x->value());
}
print_value(x->value());
}
print_unsafe_object_op(x, "UnsafePrefetchRead");
}
print_unsafe_object_op(x, "UnsafePrefetchWrite");
}
print_value(x->recv());
output()->print(" %s.%s", x->method()->holder()->name()->as_utf8(), x->method()->name()->as_utf8());
if (x->known_holder() != NULL) {
print_klass(x->known_holder());
}
}
output()->print(" %s.%s", x->inlinee()->holder()->name()->as_utf8(), x->inlinee()->name()->as_utf8());
}
for (int i = 0; i < x->number_of_arguments(); i++) {
print_value(x->argument_at(i));
}
}
switch (code) {
default : ShouldNotReachHere(); break;
}
}
}
#endif // PRODUCT