Changeset 455 for proto/Compiler


Ignore:
Timestamp:
Jul 9, 2010, 3:48:07 PM (9 years ago)
Author:
cameron
Message:

Add test_carry function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/py2bitexpr.py

    r454 r455  
    14751475
    14761476    elif isinstance(s[0], bitexpr.WhileLoop):
    1477         if int_carry:
    1478                 code = "\n%s((%s)||((256&%s)%s)) {\n"%(" "*indent+"while"+" ", generate_condition(s[0].control_expr), s[0].carry_expr.var.varname, ">0")
    1479         else:
    1480                         code = "\n%s((%s)||(bitblock_has_bit(%s))) {\n"%(" "*indent+"while"+" ", generate_condition(s[0].control_expr), s[0].carry_expr.var.varname)
     1477        code = "\n%s((%s)||(test_carry(%s))) {\n"%(" "*indent+"while"+" ", generate_condition(s[0].control_expr), s[0].carry_expr.var.varname)
    14811478        code += print_block_stmts(s[0].stmts, int_carry, indent+indent_unit)
    14821479        code += " "*indent+"}\n"
Note: See TracChangeset for help on using the changeset viewer.