Deleted Added
sdiff udiff text old ( 11029:32604f9e190b ) new ( 11049:dfb0aa3f0649 )
full compact
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 42 unchanged lines hidden (view full) ---

51 code("$prefix${{self.proc_name}}(${{', '.join(params)}}))")
52 code.fix(fix)
53
54 # Verify that this is a method of the object
55 if methodId not in obj_type.methods:
56 self.error("Invalid method call: Type '%s' does not have a method '%s'",
57 obj_type, methodId)
58
59 func = obj_type.methods[methodId]
60 func.checkArguments(self.expr_ast_vec)
61
62 # Return the return type of the method
63 return obj_type.methods[methodId].return_type
64
65 def findResources(self, resources):
66 pass
67
68class MemberMethodCallExprAST(MethodCallExprAST):
69 def __init__(self, slicc, obj_expr_ast, func_call):
70 s = super(MemberMethodCallExprAST, self)
71 s.__init__(slicc, func_call.proc_name, func_call.exprs)
72 self.obj_expr_ast = obj_expr_ast
73
74 def __repr__(self):
75 return "[MethodCallExpr: %r%r %r]" % (self.proc_name,
76 self.obj_expr_ast,
77 self.expr_ast_vec)
78 def generate_prefix(self, paramTypes):
79 code = self.slicc.codeFormatter()

--- 98 unchanged lines hidden ---