comparison python/c3/codegenerator.py @ 186:46d62dadd61b

Improved testsuite
author Windel Bouwman
date Sat, 25 May 2013 14:26:25 +0200
parents 460db5669efa
children de3a68f677a5
comparison
equal deleted inserted replaced
185:51a6440d6398 186:46d62dadd61b
21 if type(s) is astnodes.Function: 21 if type(s) is astnodes.Function:
22 f = self.builder.newFunc(s.name) 22 f = self.builder.newFunc(s.name)
23 self.funcMap[s] = f 23 self.funcMap[s] = f
24 for s in pkg.scope: 24 for s in pkg.scope:
25 if type(s) is astnodes.Variable: 25 if type(s) is astnodes.Variable:
26 # TODO 26 v = self.builder.newTmp(s.name)
27 pass 27 #self.builder.addIns(ir.Alloc(v))
28 self.varMap[s] = v
28 elif type(s) is astnodes.Function: 29 elif type(s) is astnodes.Function:
29 # TODO: handle arguments 30 # TODO: handle arguments
30 f = self.funcMap[s] 31 f = self.funcMap[s]
31 self.builder.setFunc(f) 32 self.builder.setFunc(f)
32 bb = self.builder.newBB() 33 bb = self.builder.newBB()