Skip to content

Commit

Permalink
avoid IO in reader too
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Jan 18, 2024
1 parent 8e784fb commit 2d0561b
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 54 deletions.
4 changes: 2 additions & 2 deletions src/compiler/hxb/hxbAbstractReader.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ open HxbData
class virtual hxb_abstract_reader = object(self)
inherit hxb_reader_api

method read_hxb (input : IO.input) (stats : HxbReader.hxb_reader_stats) =
method read_hxb (bytes : bytes) (stats : HxbReader.hxb_reader_stats) =
let reader = new HxbReader.hxb_reader stats in
reader#read (self :> hxb_reader_api) input
reader#read (self :> hxb_reader_api) bytes

method read_chunks (chunks : cached_chunks) (stats : HxbReader.hxb_reader_stats) =
fst (self#read_chunks_until chunks stats EOM)
Expand Down
Loading

0 comments on commit 2d0561b

Please sign in to comment.