Changeset 2717 for proto


Ignore:
Timestamp:
Dec 2, 2012, 8:46:35 PM (7 years ago)
Author:
cameron
Message:

Omit extra if tests in carry-in mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r2715 r2717  
    577577    #new_test = ast.BoolOp(ast.Or(), [ifNode.test, mkCall(ast.Attribute(self.carryvar, 'CarryTest', ast.Load()), carry_arglist)])
    578578    #new_else_part = ifNode.orelse + [mkCallStmt(ast.Attribute(self.carryvar, 'CarryDequeueEnqueue', ast.Load()), carry_arglist)]
    579     new_test = self.ccgo.GenerateCarryIfTest(this_block, ifNode.test)
     579    if self.carryin == "": new_test = ifNode.test
     580    else: new_test = self.ccgo.GenerateCarryIfTest(this_block, ifNode.test)
    580581    new_else_part = ifNode.orelse + self.ccgo.GenerateCarryElseFinalization(this_block)
    581582    newIf = ast.If(new_test, ifNode.body, new_else_part)
Note: See TracChangeset for help on using the changeset viewer.