diff --git a/src/share/vm/c1/c1_Canonicalizer.cpp b/src/share/vm/c1/c1_Canonicalizer.cpp index a4cda5f904f0147fc24e67bacf5a0c7966fd6c21..b80b199c9c243c66d85e8149bdce737a4d2441ba 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 b8bcfd7e65f20a15cf5e39738a6b6c98e40aa634..9e34ac79a31927f275a33a23a35a093bfb49fc1b 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 b93525bf5029ca0f61578e0711e56fed70f7c4ec..6b1f6ddd3807a207a7d26566c8ea4b24a5369eb8 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 4c88e50cb21c05dc0b85c925367e453ed63633b1..cfca00ab277f6a31a3cbd6c0d9c519d6336b36ce 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 d8d6502ebd66f5fffcb980d0c01fc7cf992b4113..8c80b6c750781412109b37b8cca4165787ce9e2c 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 df0828ee555e048976fa45829d538f83f5cfa582..f26d1812c447f5ad5cae7a1d5e9b2a0e29494726 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 5bd0e57d6f91704f27768ec1b197bab2bd848e79..61dd59e3fe9355d8353ec2321949d87e7c782da9 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 ffb2965fdfca192b0246ea270a913e148ed04b18..1928df57836912b552226559497bc091a17d3605 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 4c70a9f64fd120ae43989b76dab482770f1f8ddf..d3c76865dbd6a7572fccf4080d2de22143d88846 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 74e9d2240db3b24a85d69a51897345436f66a7b1..90dc279721090f443293b370d2cd75a6dffbce95 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 af6d9d94815978183ad3dec8d04dade5b55d131a..ae1a255688169db51e08b29051a14f7762d988a0 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 c76ef46bef4db85cc1fc0176bff39795755d916b..820d1909efa1552ffb2c1a4d98fbedae2d0b63e7 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 };