changeset 2d3fc2e6f368 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=2d3fc2e6f368
description:
        ruby: slicc method error fix
        Added error message when a method call is not supported by an object.

diffstat:

1 file changed, 3 insertions(+)
src/mem/slicc/ast/MethodCallExprAST.py |    3 +++

diffs (13 lines):

diff -r 4e611eba2b13 -r 2d3fc2e6f368 src/mem/slicc/ast/MethodCallExprAST.py
--- a/src/mem/slicc/ast/MethodCallExprAST.py    Wed Nov 18 13:55:58 2009 -0800
+++ b/src/mem/slicc/ast/MethodCallExprAST.py    Wed Nov 18 13:55:58 2009 -0800
@@ -97,6 +97,9 @@
         methodId = obj_type.methodId(self.proc_name, paramTypes)
 
         prefix = ""
+        if methodId not in obj_type.methods:
+            self.error("Invalid method call: Type '%s' does not have a method 
'%s'",
+                       obj_type, methodId)
         return_type = obj_type.methods[methodId].return_type
         if return_type.isInterface:
             prefix = "static_cast<%s &>" % return_type.c_ident
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to