Changeset 902


Ignore:
Timestamp:
Feb 9, 2011, 3:59:52 PM (8 years ago)
Author:
cameron
Message:

Add ScanTo? support to Pablo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r889 r902  
    181181  def visit_Call(self, callnode):
    182182    self.generic_visit(callnode)
    183     if is_BuiltIn_Call(callnode,'Advance', 1) or is_BuiltIn_Call(callnode,'ScanThru', 2):       
     183    if is_BuiltIn_Call(callnode,'Advance', 1) or is_BuiltIn_Call(callnode,'ScanThru', 2) or is_BuiltIn_Call(callnode,'ScanTo', 2):     
    184184      self.carry_count += 1
    185185  def visit_BinOp(self, exprnode):
     
    221221    elif is_BuiltIn_Call(callnode, 'ScanThru', 2):
    222222      rtn = "BitBlock_scanthru_%s" % self.mode
     223      c = mkCall(rtn, [callnode.args[0], callnode.args[1], self.carryvar, ast.Num(self.current_carry)])
     224      self.current_carry += 1
     225      return c
     226    elif is_BuiltIn_Call(callnode, 'ScanTo', 2):
     227      rtn = "BitBlock_scanto_%s" % self.mode
    223228      c = mkCall(rtn, [callnode.args[0], callnode.args[1], self.carryvar, ast.Num(self.current_carry)])
    224229      self.current_carry += 1
Note: See TracChangeset for help on using the changeset viewer.