Ignore:
Timestamp:
Dec 3, 2010, 2:06:00 PM (8 years ago)
Author:
cameron
Message:

Fix total carry count for @any_carry.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r771 r772  
    213213    self.carryvar = ast.Name(carryvar, ast.Load())
    214214    self.mode = mode
    215   def any_carry_expr(self, fndef):
    216     carry_count = CarryCounter().count(fndef)
    217     carry_arglist = [self.carryvar, ast.Num(0), ast.Num(carry_count)]
    218     return mkCall('CarryTest', carry_arglist)
    219215  def xfrm_fndef(self, fndef):
    220216    self.current_carry = 0
     
    384380  return Cgen.py2C().gen(main_fn.body)
    385381
    386 def any_carry_expr(main_fn):
    387   return Cgen.py2C().gen(CarryIntro().any_carry_expr(main_fn))
     382def any_carry_expr(carryvar, carry_count):
     383  carry_arglist = [ast.Name(carryvar, ast.Load()), ast.Num(0), ast.Num(carry_count)] 
     384  return Cgen.py2C().gen(mkCall('CarryTest', carry_arglist))
    388385
    389386if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.