NDEBUG for Ruby Assert statement
Review Request #337 - Created Dec. 2, 2010 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| Reviewers | |
| Default | |
This diff is for changing the way ASSERT is handled in Ruby. m5.fast compiles out the assert statements by using the macro NDEBUG. Ruby uses the macro RUBY_NO_ASSERT to do so. This macro has been removed and NDEBUG has been put in its place.
I have compiled the source code with this change. The object files created for debug version have the assert statements while those for the fast version don't.
Looks good to me.
Posted (Dec. 6, 2010, 7:56 a.m.)
-
src/mem/ruby/common/Debug.hh (Diff revision 2) -
Someday we should unify m5 & Ruby assertions... basically everyone should use this macro or no one should. Don't hold up this patch on that though; I just want to throw that thought out there for consideration.
-
src/mem/ruby/common/Debug.hh (Diff revision 2) -
What changed in these lines? I don't see any difference here. Was it just a whitespace thing? If so, was it intentional?
-
src/mem/slicc/ast/FuncCallExprAST.py (Diff revision 2) -
Is there a reason the compiler doesn't just emit "ASSERT(${{cvec[0]}})" here? That seems more straightforward to me, unless there's a good reason to do it this way.
