Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
TerrorJack committed Dec 16, 2018
1 parent a68642c commit 4224024
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 0 additions & 2 deletions asterius/src/Asterius/Builtins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,6 @@ scheduleHandleThreadFinished t = do
callImport
"__asterius_setTSOrstat"
[loadI32 t offset_StgTSO_id, constI32 scheduler_Killed])
storeI64 t offset_StgTSO_bound $ constI64 0
pure $ constI32 1

schedule :: Expression -> EDSL ()
Expand Down Expand Up @@ -869,7 +868,6 @@ createThreadFunction _ =
storeI32 tso_p offset_StgTSO_flags $ constI32 0
storeI32 tso_p offset_StgTSO_dirty $ constI32 1
storeI32 tso_p offset_StgTSO_saved_errno $ constI32 0
storeI64 tso_p offset_StgTSO_bound $ constI64 0
storeI64 tso_p offset_StgTSO_cap cap
storeI64 tso_p offset_StgTSO_stackobj stack_p
storeI32 tso_p offset_StgTSO_tot_stack_size $ wrapInt64 stack_size_w
Expand Down
10 changes: 9 additions & 1 deletion asterius/test/bytearray/bytearray.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,13 @@ m (I# len) =
, ( I# (indexInt8Array# ba 0#)
, I# (indexInt8Array# ba (len -# 1#)))#))

src :: [Int]
src = w 0 []
where
w 100000 acc = acc
w i acc = w (succ i) (i : acc)

main :: IO ()
main = for_ [63, 511, 8191, 65535] $ m >=> print >=> const yield
main = do
for_ [63, 511, 8191, 65535] $ m >=> print >=> const yield
print $ foldl' (+) (0 :: Int) src

0 comments on commit 4224024

Please sign in to comment.