FuncCallExprAST.py (8192:be38f7b6ad9e) | FuncCallExprAST.py (9106:aa9b75db7ea0) |
---|---|
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; --- 79 unchanged lines hidden (view full) --- 88 " Expected %d, got %d", self.proc_name, 89 len(func.param_types), len(self.exprs)) 90 91 cvec = [] 92 type_vec = [] 93 for expr,expected_type in zip(self.exprs, func.param_types): 94 # Check the types of the parameter 95 actual_type,param_code = expr.inline(True) | 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; --- 79 unchanged lines hidden (view full) --- 88 " Expected %d, got %d", self.proc_name, 89 len(func.param_types), len(self.exprs)) 90 91 cvec = [] 92 type_vec = [] 93 for expr,expected_type in zip(self.exprs, func.param_types): 94 # Check the types of the parameter 95 actual_type,param_code = expr.inline(True) |
96 if actual_type != expected_type: | 96 if str(actual_type) != str(expected_type): |
97 expr.error("Type mismatch: expected: %s actual: %s" % \ 98 (expected_type, actual_type)) 99 cvec.append(param_code) 100 type_vec.append(expected_type) 101 102 # OK, the semantics of "trigger" here is that, ports in the 103 # machine have different priorities. We always check the first 104 # port for doable transitions. If nothing/stalled, we pick one --- 127 unchanged lines hidden --- | 97 expr.error("Type mismatch: expected: %s actual: %s" % \ 98 (expected_type, actual_type)) 99 cvec.append(param_code) 100 type_vec.append(expected_type) 101 102 # OK, the semantics of "trigger" here is that, ports in the 103 # machine have different priorities. We always check the first 104 # port for doable transitions. If nothing/stalled, we pick one --- 127 unchanged lines hidden --- |