gm + gmPrep wiring

This commit is contained in:
crumbtoo
2023-12-11 18:05:17 -07:00
parent b31c50dd72
commit b371e84d80
3 changed files with 30 additions and 9 deletions

View File

@@ -27,6 +27,7 @@ import System.IO (Handle, hPutStrLn)
import Data.String (IsString)
import Data.Heap
import Debug.Trace
import Core2Core
import Core
----------------------------------------------------------------------------------
@@ -551,9 +552,10 @@ pop [] = []
compile :: Program' -> GmState
compile p = GmState c [] [] h g sts
where
p' = gmPrep p
-- find the entry point and evaluate it
c = [PushGlobal "main", Eval]
(h,g) = buildInitialHeap p
(h,g) = buildInitialHeap p'
sts = def
type CompiledSC = (Name, Int, Code)