Changeset 1439 for proto/Compiler


Ignore:
Timestamp:
Sep 14, 2011, 11:57:40 AM (8 years ago)
Author:
cameron
Message:

inFile and atEOF functions replace EOF_mask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/Compiler/pablo.py

    r1271 r1439  
    265265      self.current_carry += 1
    266266      return c
     267    elif is_BuiltIn_Call(callnode, 'atEOF', 1):
     268      if self.carryout != "": 
     269        # Non final block: atEOF(x) = 0.
     270        return mkCall('simd_const_1', [ast.Num(0)])
     271      else: return mkCall('simd_andc', [callnode.args[0], ast.Name('EOF_mask', ast.Load())])
     272    elif is_BuiltIn_Call(callnode, 'inFile', 1):
     273      if self.carryout != "": 
     274        # Non final block: inFile(x) = x.
     275        return callnode.args[0]
     276      else: return mkCall('simd_and', [callnode.args[0], ast.Name('EOF_mask', ast.Load())])
    267277    elif is_BuiltIn_Call(callnode, 'StreamScan', 2):
    268278      rtn = "StreamScan"           
Note: See TracChangeset for help on using the changeset viewer.