aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/share/vm/c1/c1_Canonicalizer.cpp2
-rw-r--r--src/share/vm/c1/c1_Canonicalizer.hpp2
-rw-r--r--src/share/vm/c1/c1_Instruction.hpp2
-rw-r--r--src/share/vm/c1/c1_InstructionPrinter.cpp2
-rw-r--r--src/share/vm/c1/c1_InstructionPrinter.hpp2
-rw-r--r--src/share/vm/c1/c1_LIR.cpp4
-rw-r--r--src/share/vm/c1/c1_LIR.hpp5
-rw-r--r--src/share/vm/c1/c1_LIRGenerator.cpp5
-rw-r--r--src/share/vm/c1/c1_LIRGenerator.hpp2
-rw-r--r--src/share/vm/c1/c1_Optimizer.cpp5
-rw-r--r--src/share/vm/c1/c1_RangeCheckElimination.hpp2
-rw-r--r--src/share/vm/c1/c1_ValueMap.hpp2
12 files changed, 30 insertions, 5 deletions
diff --git a/src/share/vm/c1/c1_Canonicalizer.cpp b/src/share/vm/c1/c1_Canonicalizer.cpp
index a4cda5f90..b80b199c9 100644
--- a/src/share/vm/c1/c1_Canonicalizer.cpp
+++ b/src/share/vm/c1/c1_Canonicalizer.cpp
@@ -938,5 +938,7 @@ void Canonicalizer::do_ProfileCall(ProfileCall* x) {}
void Canonicalizer::do_ProfileInvoke(ProfileInvoke* x) {}
void Canonicalizer::do_RuntimeCall(RuntimeCall* x) {}
void Canonicalizer::do_RangeCheckPredicate(RangeCheckPredicate* x) {}
+#ifdef ASSERT
void Canonicalizer::do_Assert(Assert* x) {}
+#endif
void Canonicalizer::do_MemBar(MemBar* x) {}
diff --git a/src/share/vm/c1/c1_Canonicalizer.hpp b/src/share/vm/c1/c1_Canonicalizer.hpp
index b8bcfd7e6..9e34ac79a 100644
--- a/src/share/vm/c1/c1_Canonicalizer.hpp
+++ b/src/share/vm/c1/c1_Canonicalizer.hpp
@@ -108,7 +108,9 @@ class Canonicalizer: InstructionVisitor {
virtual void do_RuntimeCall (RuntimeCall* x);
virtual void do_MemBar (MemBar* x);
virtual void do_RangeCheckPredicate(RangeCheckPredicate* x);
+#ifdef ASSERT
virtual void do_Assert (Assert* x);
+#endif
};
#endif // SHARE_VM_C1_C1_CANONICALIZER_HPP
diff --git a/src/share/vm/c1/c1_Instruction.hpp b/src/share/vm/c1/c1_Instruction.hpp
index b93525bf5..6b1f6ddd3 100644
--- a/src/share/vm/c1/c1_Instruction.hpp
+++ b/src/share/vm/c1/c1_Instruction.hpp
@@ -111,7 +111,9 @@ class ProfileInvoke;
class RuntimeCall;
class MemBar;
class RangeCheckPredicate;
+#ifdef ASSERT
class Assert;
+#endif
// A Value is a reference to the instruction creating the value
typedef Instruction* Value;
diff --git a/src/share/vm/c1/c1_InstructionPrinter.cpp b/src/share/vm/c1/c1_InstructionPrinter.cpp
index 4c88e50cb..cfca00ab2 100644
--- a/src/share/vm/c1/c1_InstructionPrinter.cpp
+++ b/src/share/vm/c1/c1_InstructionPrinter.cpp
@@ -871,12 +871,14 @@ void InstructionPrinter::do_RangeCheckPredicate(RangeCheckPredicate* x) {
}
}
+#ifdef ASSERT
void InstructionPrinter::do_Assert(Assert* x) {
output()->print("assert ");
print_value(x->x());
output()->print(" %s ", cond_name(x->cond()));
print_value(x->y());
}
+#endif
void InstructionPrinter::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {
print_unsafe_object_op(x, "UnsafePrefetchWrite");
diff --git a/src/share/vm/c1/c1_InstructionPrinter.hpp b/src/share/vm/c1/c1_InstructionPrinter.hpp
index d8d6502eb..8c80b6c75 100644
--- a/src/share/vm/c1/c1_InstructionPrinter.hpp
+++ b/src/share/vm/c1/c1_InstructionPrinter.hpp
@@ -136,7 +136,9 @@ class InstructionPrinter: public InstructionVisitor {
virtual void do_RuntimeCall (RuntimeCall* x);
virtual void do_MemBar (MemBar* x);
virtual void do_RangeCheckPredicate(RangeCheckPredicate* x);
+#ifdef ASSERT
virtual void do_Assert (Assert* x);
+#endif
};
#endif // PRODUCT
diff --git a/src/share/vm/c1/c1_LIR.cpp b/src/share/vm/c1/c1_LIR.cpp
index df0828ee5..f26d1812c 100644
--- a/src/share/vm/c1/c1_LIR.cpp
+++ b/src/share/vm/c1/c1_LIR.cpp
@@ -1778,7 +1778,9 @@ const char * LIR_Op::name() const {
// LIR_OpProfileCall
case lir_profile_call: s = "profile_call"; break;
// LIR_OpAssert
+#ifdef ASSERT
case lir_assert: s = "assert"; break;
+#endif
case lir_none: ShouldNotReachHere();break;
default: s = "illegal_op"; break;
}
@@ -2025,12 +2027,14 @@ void LIR_OpLock::print_instr(outputStream* out) const {
out->print("[lbl:0x%x]", stub()->entry());
}
+#ifdef ASSERT
void LIR_OpAssert::print_instr(outputStream* out) const {
print_condition(out, condition()); out->print(" ");
in_opr1()->print(out); out->print(" ");
in_opr2()->print(out); out->print(", \"");
out->print(msg()); out->print("\"");
}
+#endif
void LIR_OpDelay::print_instr(outputStream* out) const {
diff --git a/src/share/vm/c1/c1_LIR.hpp b/src/share/vm/c1/c1_LIR.hpp
index 5bd0e57d6..61dd59e3f 100644
--- a/src/share/vm/c1/c1_LIR.hpp
+++ b/src/share/vm/c1/c1_LIR.hpp
@@ -881,8 +881,9 @@ class LIR_OpLock;
class LIR_OpTypeCheck;
class LIR_OpCompareAndSwap;
class LIR_OpProfileCall;
+#ifdef ASSERT
class LIR_OpAssert;
-
+#endif
// LIR operation codes
enum LIR_Code {
@@ -1139,7 +1140,9 @@ class LIR_Op: public CompilationResourceObj {
virtual LIR_OpTypeCheck* as_OpTypeCheck() { return NULL; }
virtual LIR_OpCompareAndSwap* as_OpCompareAndSwap() { return NULL; }
virtual LIR_OpProfileCall* as_OpProfileCall() { return NULL; }
+#ifdef ASSERT
virtual LIR_OpAssert* as_OpAssert() { return NULL; }
+#endif
virtual void verify() const {}
};
diff --git a/src/share/vm/c1/c1_LIRGenerator.cpp b/src/share/vm/c1/c1_LIRGenerator.cpp
index ffb2965fd..1928df578 100644
--- a/src/share/vm/c1/c1_LIRGenerator.cpp
+++ b/src/share/vm/c1/c1_LIRGenerator.cpp
@@ -3103,8 +3103,8 @@ void LIRGenerator::do_RuntimeCall(RuntimeCall* x) {
}
}
-void LIRGenerator::do_Assert(Assert *x) {
#ifdef ASSERT
+void LIRGenerator::do_Assert(Assert *x) {
ValueTag tag = x->x()->type()->tag();
If::Condition cond = x->cond();
@@ -3124,9 +3124,8 @@ void LIRGenerator::do_Assert(Assert *x) {
LIR_Opr right = yin->result();
__ lir_assert(lir_cond(x->cond()), left, right, x->message(), true);
-#endif
}
-
+#endif
void LIRGenerator::do_RangeCheckPredicate(RangeCheckPredicate *x) {
diff --git a/src/share/vm/c1/c1_LIRGenerator.hpp b/src/share/vm/c1/c1_LIRGenerator.hpp
index 4c70a9f64..d3c76865d 100644
--- a/src/share/vm/c1/c1_LIRGenerator.hpp
+++ b/src/share/vm/c1/c1_LIRGenerator.hpp
@@ -537,7 +537,9 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
virtual void do_RuntimeCall (RuntimeCall* x);
virtual void do_MemBar (MemBar* x);
virtual void do_RangeCheckPredicate(RangeCheckPredicate* x);
+#ifdef ASSERT
virtual void do_Assert (Assert* x);
+#endif
};
diff --git a/src/share/vm/c1/c1_Optimizer.cpp b/src/share/vm/c1/c1_Optimizer.cpp
index 74e9d2240..90dc27972 100644
--- a/src/share/vm/c1/c1_Optimizer.cpp
+++ b/src/share/vm/c1/c1_Optimizer.cpp
@@ -535,7 +535,9 @@ public:
void do_RuntimeCall (RuntimeCall* x);
void do_MemBar (MemBar* x);
void do_RangeCheckPredicate(RangeCheckPredicate* x);
+#ifdef ASSERT
void do_Assert (Assert* x);
+#endif
};
@@ -718,8 +720,9 @@ void NullCheckVisitor::do_ProfileInvoke (ProfileInvoke* x) {}
void NullCheckVisitor::do_RuntimeCall (RuntimeCall* x) {}
void NullCheckVisitor::do_MemBar (MemBar* x) {}
void NullCheckVisitor::do_RangeCheckPredicate(RangeCheckPredicate* x) {}
+#ifdef ASSERT
void NullCheckVisitor::do_Assert (Assert* x) {}
-
+#endif
void NullCheckEliminator::visit(Value* p) {
assert(*p != NULL, "should not find NULL instructions");
diff --git a/src/share/vm/c1/c1_RangeCheckElimination.hpp b/src/share/vm/c1/c1_RangeCheckElimination.hpp
index af6d9d948..ae1a25568 100644
--- a/src/share/vm/c1/c1_RangeCheckElimination.hpp
+++ b/src/share/vm/c1/c1_RangeCheckElimination.hpp
@@ -166,7 +166,9 @@ public:
void do_RuntimeCall (RuntimeCall* x) { /* nothing to do */ };
void do_MemBar (MemBar* x) { /* nothing to do */ };
void do_RangeCheckPredicate(RangeCheckPredicate* x) { /* nothing to do */ };
+#ifdef ASSERT
void do_Assert (Assert* x) { /* nothing to do */ };
+#endif
};
#ifdef ASSERT
diff --git a/src/share/vm/c1/c1_ValueMap.hpp b/src/share/vm/c1/c1_ValueMap.hpp
index c76ef46be..820d1909e 100644
--- a/src/share/vm/c1/c1_ValueMap.hpp
+++ b/src/share/vm/c1/c1_ValueMap.hpp
@@ -207,7 +207,9 @@ class ValueNumberingVisitor: public InstructionVisitor {
void do_RuntimeCall (RuntimeCall* x) { /* nothing to do */ };
void do_MemBar (MemBar* x) { /* nothing to do */ };
void do_RangeCheckPredicate(RangeCheckPredicate* x) { /* nothing to do */ };
+#ifdef ASSERT
void do_Assert (Assert* x) { /* nothing to do */ };
+#endif
};