From 7e42b753e7cc03bf7271dfc98e69aa56973df9ba Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Wed, 8 Dec 2010 11:52:02 -0800 Subject: ruby: remove Ruby asserts for m5.fast 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. --- src/mem/slicc/ast/FuncCallExprAST.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mem/slicc') diff --git a/src/mem/slicc/ast/FuncCallExprAST.py b/src/mem/slicc/ast/FuncCallExprAST.py index 830b10c21..829203d53 100644 --- a/src/mem/slicc/ast/FuncCallExprAST.py +++ b/src/mem/slicc/ast/FuncCallExprAST.py @@ -165,9 +165,11 @@ class FuncCallExprAST(ExprAST): elif self.proc_name == "assert": error = self.exprs[0].embedError('"assert failure"') code(''' -if (ASSERT_FLAG && !(${{cvec[0]}})) { +#ifndef NDEBUG +if (!(${{cvec[0]}})) { $error } +#endif ''') elif self.proc_name == "continueProcessing": -- cgit v1.2.3