Minor
This commit is contained in:
parent
c17995f97d
commit
c0be56ee21
1 changed files with 4 additions and 2 deletions
|
@ -58,6 +58,9 @@
|
||||||
(: lookup-node (-> Heap Addr Node))
|
(: lookup-node (-> Heap Addr Node))
|
||||||
(define lookup-node hash-ref)
|
(define lookup-node hash-ref)
|
||||||
|
|
||||||
|
(: lookup-globals (-> Globals Name Addr))
|
||||||
|
(define lookup-globals hash-ref)
|
||||||
|
|
||||||
(: initialize-heap (-> (Listof CoreScDefn) (Values Heap Globals)))
|
(: initialize-heap (-> (Listof CoreScDefn) (Values Heap Globals)))
|
||||||
(define (initialize-heap scs)
|
(define (initialize-heap scs)
|
||||||
(for/fold ([heap : Heap empty-heap]
|
(for/fold ([heap : Heap empty-heap]
|
||||||
|
@ -70,7 +73,7 @@
|
||||||
(: compile-core (-> (Listof CoreScDefn) State))
|
(: compile-core (-> (Listof CoreScDefn) State))
|
||||||
(define (compile-core scdefs)
|
(define (compile-core scdefs)
|
||||||
(let-values ([(heap globals) (initialize-heap (append scdefs prelude))])
|
(let-values ([(heap globals) (initialize-heap (append scdefs prelude))])
|
||||||
(State empty-stack empty-dump heap globals empty-stats)))
|
(State (list (lookup-globals globals 'main)) empty-dump heap globals empty-stats)))
|
||||||
|
|
||||||
|
|
||||||
(: data-node? (-> Node Boolean))
|
(: data-node? (-> Node Boolean))
|
||||||
|
@ -100,5 +103,4 @@
|
||||||
|
|
||||||
(: step-sc (-> State Name (Listof Name) CoreExpr State))
|
(: step-sc (-> State Name (Listof Name) CoreExpr State))
|
||||||
(define (step-sc state sc args body)
|
(define (step-sc state sc args body)
|
||||||
|
|
||||||
(error "to be implemented"))
|
(error "to be implemented"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue