Skip to content
Snippets Groups Projects
  1. Mar 12, 2009
    • Simon Marlow's avatar
      FIX #3079, dodgy parsing of LANGUAGE pragmas · c197fe60
      Simon Marlow authored
      I ended up rewriting this horrible bit of code, using (yikes) lazy I/O
      to slurp in the source file a chunk at a time.  The old code tried to
      read the file a chunk at a time, but failed with LANGUAGE pragmas
      because the parser for LANGUAGE has state and the state wasn't being
      saved between chunks.  We're still closing the Handle eagerly, so
      there shouldn't be any problems here.
      2009-03-13
      c197fe60
  2. Mar 11, 2009
  3. Mar 10, 2009
  4. Mar 09, 2009
  5. Mar 06, 2009
    • Simon Marlow's avatar
      Partial fix for #2917 · 1b62aece
      Simon Marlow authored
       - add newAlignedPinnedByteArray# for allocating pinned BAs with
         arbitrary alignment
      
       - the old newPinnedByteArray# now aligns to 16 bytes
      
      Foreign.alloca will use newAlignedPinnedByteArray#, and so might end
      up wasting less space than before (we used to align to 8 by default).
      Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte
      aligned memory, which is enough to avoid problems with SSE
      instructions on x86, for example.
      
      There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes,
      but would have failed if the header was not a multiple of 8
      (fortunately it always was, even with profiling).  Also we
      occasionally wasted some space unnecessarily due to alignment in
      allocatePinned().
      
      I haven't done anything about Foreign.malloc/mallocBytes, which will
      give you the same alignment guarantees as malloc() (8 bytes on
      Linux/x86 here).
      1b62aece
  6. Mar 08, 2009
  7. Mar 06, 2009
  8. Mar 07, 2009
  9. Mar 06, 2009
  10. Mar 05, 2009
  11. Mar 04, 2009
  12. Mar 03, 2009
  13. Feb 28, 2009
Loading