Changeset 1074 for proto/Compiler


Ignore:
Timestamp:
Apr 7, 2011, 6:56:32 PM (8 years ago)
Author:
cameron
Message:

Add ScanToFirst? support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r941 r1074  
    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) or is_BuiltIn_Call(callnode,'ScanTo', 2):     
     183    if is_BuiltIn_Call(callnode,'Advance', 1) or is_BuiltIn_Call(callnode,'ScanThru', 2) or is_BuiltIn_Call(callnode,'ScanTo', 2) or is_BuiltIn_Call(callnode,'ScanToFirst', 1):       
    184184      self.carry_count += 1
    185185  def visit_BinOp(self, exprnode):
     
    230230      rtn = "BitBlock_scanto%s%s" % (self.carryin, self.carryout)
    231231      if self.carryout == "":  carry_args = [ast.Name('EOF_mask', ast.Load())] + carry_args
     232      c = mkCall(rtn, callnode.args + carry_args)
     233      self.current_carry += 1
     234      return c
     235    elif is_BuiltIn_Call(callnode, 'ScanToFirst', 1):
     236      rtn = "BitBlock_scantofirst"
     237      #if self.carryout == "":  carry_args = [ast.Name('EOF_mask', ast.Load())] + carry_args
    232238      c = mkCall(rtn, callnode.args + carry_args)
    233239      self.current_carry += 1
Note: See TracChangeset for help on using the changeset viewer.