Changeset 1531 for proto


Ignore:
Timestamp:
Oct 16, 2011, 1:54:42 PM (8 years ago)
Author:
cameron
Message:

Generate _ci_co and _co forms only for Bitblock_add, Bitblock_sub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r1526 r1531  
    283283  def visit_BinOp(self, exprnode):
    284284    self.generic_visit(exprnode)
    285     if self.carryin == '' and self.carryout == '': carry_args = []
    286     else: carry_args = [self.carryvar, ast.Num(self.current_carry)]
     285    carry_args = [self.carryvar, ast.Num(self.current_carry)]
    287286    if isinstance(exprnode.op, ast.Sub):
    288       rtn = "BitBlock_sub%s%s" % (self.carryin, self.carryout)
     287      rtn = "BitBlock_sub%s_co" % (self.carryin)
    289288      c = mkCall(rtn, [exprnode.left, exprnode.right] + carry_args)
    290289      self.current_carry += 1
    291290      return c
    292291    elif isinstance(exprnode.op, ast.Add):
    293       rtn = "BitBlock_add%s%s" % (self.carryin, self.carryout)
     292      rtn = "BitBlock_add%s_co" % (self.carryin)
    294293      c = mkCall(rtn, [exprnode.left, exprnode.right] + carry_args)
    295294      self.current_carry += 1
Note: See TracChangeset for help on using the changeset viewer.