diff --git a/asterius/src/Asterius/Backends/Binaryen.hs b/asterius/src/Asterius/Backends/Binaryen.hs index 18257bb42e..903fe95a67 100644 --- a/asterius/src/Asterius/Backends/Binaryen.hs +++ b/asterius/src/Asterius/Backends/Binaryen.hs @@ -587,7 +587,7 @@ marshalModule tail_calls pool_size sym_map hs_mod@Module {..} = do envSymbolMap = sym_map, envModuleRef = m } - parallelFoldMap 1 (M.toList functionMap') $ \(k, f@Function {..}) -> -- TODO: pool_size + parallelFoldMap pool_size (M.toList functionMap') $ \(k, f@Function {..}) -> flip runReaderT env $ void $ marshalFunction k (ftps M.! functionType) f forM_ functionImports $ \fi@FunctionImport {..} -> marshalFunctionImport m (ftps M.! functionType) fi diff --git a/asterius/src/Asterius/Ld.hs b/asterius/src/Asterius/Ld.hs index efb8fc6985..7a3cfd0873 100644 --- a/asterius/src/Asterius/Ld.hs +++ b/asterius/src/Asterius/Ld.hs @@ -49,8 +49,8 @@ loadTheWorld LinkTask {..} = do ncu <- newNameCacheUpdater lib <- do entries <- concat <$> for linkLibs loadArchiveEntries - parallelFoldMap 1 entries (loadArchiveEntry ncu) -- TODO: threadPoolSize - objs <- parallelFoldMap 1 linkObjs (loadObj ncu) -- TODO: threadPoolSize + parallelFoldMap threadPoolSize entries (loadArchiveEntry ncu) + objs <- parallelFoldMap threadPoolSize linkObjs (loadObj ncu) evaluate $ linkModule <> objs <> lib where loadObj ncu path = tryGetFile ncu path >>= \case diff --git a/asterius/src/Asterius/Resolve.hs b/asterius/src/Asterius/Resolve.hs index 07fad7190c..99bf01e650 100644 --- a/asterius/src/Asterius/Resolve.hs +++ b/asterius/src/Asterius/Resolve.hs @@ -127,7 +127,7 @@ linkStart debug gc_sections verbose_err pool_size store root_syms export_funcs = merged_m0 | gc_sections = gcSections verbose_err store root_syms export_funcs | otherwise = fromCachedModule store - !merged_m0_evaluated = parForceAsteriusModule 1 merged_m0 -- TODO: pool_size + !merged_m0_evaluated = parForceAsteriusModule pool_size merged_m0 merged_m1 | debug = addMemoryTrap merged_m0_evaluated | otherwise = merged_m0_evaluated