turning off debug prints; more directory reorganization.
This commit is contained in:
parent
c6dd8c787b
commit
1ef003c65d
14
compiler.rkt
14
compiler.rkt
|
@ -338,12 +338,12 @@
|
||||||
(make-PerformStatement (make-MarkModuleInvoked! path))
|
(make-PerformStatement (make-MarkModuleInvoked! path))
|
||||||
;; Module body definition:
|
;; Module body definition:
|
||||||
;; 1. First invoke all the modules that this requires.
|
;; 1. First invoke all the modules that this requires.
|
||||||
(make-DebugPrint (make-Const "handling internal requires"))
|
#;(make-DebugPrint (make-Const "handling internal requires"))
|
||||||
(apply append-instruction-sequences
|
(apply append-instruction-sequences
|
||||||
(map compile-module-invoke (Module-requires mod)))
|
(map compile-module-invoke (Module-requires mod)))
|
||||||
|
|
||||||
;; 2. Next, evaluate the module body.
|
;; 2. Next, evaluate the module body.
|
||||||
(make-DebugPrint (make-Const (format "evaluating module body of ~s" path)))
|
#;(make-DebugPrint (make-Const (format "evaluating module body of ~s" path)))
|
||||||
(make-PerformStatement (make-ExtendEnvironment/Prefix! names))
|
(make-PerformStatement (make-ExtendEnvironment/Prefix! names))
|
||||||
|
|
||||||
(make-AssignImmediateStatement (make-ModulePrefixTarget path)
|
(make-AssignImmediateStatement (make-ModulePrefixTarget path)
|
||||||
|
@ -354,14 +354,14 @@
|
||||||
'val
|
'val
|
||||||
next-linkage/drop-multiple)
|
next-linkage/drop-multiple)
|
||||||
|
|
||||||
(make-DebugPrint (make-Const (format "About to clean up ~s" path)))
|
#;(make-DebugPrint (make-Const (format "About to clean up ~s" path)))
|
||||||
|
|
||||||
;; 3. Finally, cleanup and return.
|
;; 3. Finally, cleanup and return.
|
||||||
(make-PopEnvironment (make-Const 1) (make-Const 0))
|
(make-PopEnvironment (make-Const 1) (make-Const 0))
|
||||||
(make-AssignImmediateStatement 'proc (make-ControlStackLabel))
|
(make-AssignImmediateStatement 'proc (make-ControlStackLabel))
|
||||||
(make-PopControlFrame)
|
(make-PopControlFrame)
|
||||||
(make-DebugPrint (make-Const "Returning from module invokation."))
|
#;(make-DebugPrint (make-Const "Returning from module invokation."))
|
||||||
(make-DebugPrint (make-Reg 'proc))
|
#;(make-DebugPrint (make-Reg 'proc))
|
||||||
(make-GotoStatement (make-Reg 'proc))
|
(make-GotoStatement (make-Reg 'proc))
|
||||||
|
|
||||||
after-module-body)))]))
|
after-module-body)))]))
|
||||||
|
@ -403,7 +403,7 @@
|
||||||
,(make-TestAndBranchStatement (make-TestTrue
|
,(make-TestAndBranchStatement (make-TestTrue
|
||||||
(make-IsModuleInvoked a-module-name))
|
(make-IsModuleInvoked a-module-name))
|
||||||
already-loaded)
|
already-loaded)
|
||||||
,(make-DebugPrint (make-Const (format "entering module ~s" a-module-name)))
|
#;,(make-DebugPrint (make-Const (format "entering module ~s" a-module-name)))
|
||||||
,(make-PushControlFrame/Call on-return)
|
,(make-PushControlFrame/Call on-return)
|
||||||
,(make-GotoStatement (ModuleEntry a-module-name))
|
,(make-GotoStatement (ModuleEntry a-module-name))
|
||||||
,on-return-multiple
|
,on-return-multiple
|
||||||
|
@ -411,7 +411,7 @@
|
||||||
(make-Const 1))
|
(make-Const 1))
|
||||||
(make-Const 0))
|
(make-Const 0))
|
||||||
,on-return
|
,on-return
|
||||||
,(make-DebugPrint (make-Const (format "coming back from module ~s" a-module-name)))
|
#;,(make-DebugPrint (make-Const (format "coming back from module ~s" a-module-name)))
|
||||||
,already-loaded)))]))
|
,already-loaded)))]))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
;; Parsing Racket 5.1.1 bytecode structures into our own structures.
|
;; Parsing Racket 5.1.1 bytecode structures into our own structures.
|
||||||
(require "typed-module-path.rkt"
|
(require "typed-module-path.rkt"
|
||||||
"lam-entry-gensym.rkt"
|
"lam-entry-gensym.rkt"
|
||||||
|
"path-rewriter.rkt"
|
||||||
"../expression-structs.rkt"
|
"../expression-structs.rkt"
|
||||||
"../lexical-structs.rkt"
|
"../lexical-structs.rkt"
|
||||||
"../path-rewriter.rkt"
|
|
||||||
"../parameters.rkt"
|
"../parameters.rkt"
|
||||||
"../get-module-bytecode.rkt"
|
"../get-module-bytecode.rkt"
|
||||||
syntax/modresolve
|
syntax/modresolve
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require "parameters.rkt"
|
(require "../parameters.rkt"
|
||||||
"where-is-collects.rkt"
|
"../where-is-collects.rkt"
|
||||||
racket/path
|
racket/path
|
||||||
racket/contract
|
racket/contract
|
||||||
racket/list
|
racket/list
|
||||||
|
@ -13,10 +13,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define-runtime-path this-path ".")
|
(define-runtime-path whalesong-path "..")
|
||||||
(define this-normal-path
|
(define normal-whalesong-path
|
||||||
(let ()
|
(let ()
|
||||||
(normalize-path this-path)))
|
(normalize-path whalesong-path)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,16 +31,16 @@
|
||||||
(define (rewrite-path a-path)
|
(define (rewrite-path a-path)
|
||||||
(let ([a-path (normalize-path a-path)])
|
(let ([a-path (normalize-path a-path)])
|
||||||
(cond
|
(cond
|
||||||
|
[(within-this-project-path? a-path)
|
||||||
|
(string->symbol
|
||||||
|
(string-append "whalesong/"
|
||||||
|
(path->string
|
||||||
|
(find-relative-path normal-whalesong-path a-path))))]
|
||||||
[(within-collects? a-path)
|
[(within-collects? a-path)
|
||||||
(string->symbol
|
(string->symbol
|
||||||
(string-append "collects/"
|
(string-append "collects/"
|
||||||
(path->string
|
(path->string
|
||||||
(find-relative-path collects-path a-path))))]
|
(find-relative-path collects-path a-path))))]
|
||||||
[(within-this-project-path? a-path)
|
|
||||||
(string->symbol
|
|
||||||
(string-append "whalesong/"
|
|
||||||
(path->string
|
|
||||||
(find-relative-path this-normal-path a-path))))]
|
|
||||||
[(within-root? a-path)
|
[(within-root? a-path)
|
||||||
(string->symbol
|
(string->symbol
|
||||||
(string-append "root/"
|
(string-append "root/"
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
|
|
||||||
(define (within-this-project-path? a-path)
|
(define (within-this-project-path? a-path)
|
||||||
(within? this-normal-path a-path))
|
(within? normal-whalesong-path a-path))
|
||||||
|
|
||||||
|
|
||||||
;; within?: normalized-path normalized-path -> boolean
|
;; within?: normalized-path normalized-path -> boolean
|
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require "make.rkt"
|
(require "../make.rkt"
|
||||||
"make-structs.rkt")
|
"../make-structs.rkt")
|
||||||
|
|
||||||
|
|
||||||
;; For some reason, this is breaking. Why?
|
;; For some reason, this is breaking. Why?
|
|
@ -1,8 +1,9 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
|
|
||||||
(require "../js-assembler/assemble.rkt"
|
(require "browser-evaluate.rkt"
|
||||||
|
"../js-assembler/assemble.rkt"
|
||||||
"../js-assembler/get-runtime.rkt"
|
"../js-assembler/get-runtime.rkt"
|
||||||
"../browser-evaluate.rkt"
|
|
||||||
"../lexical-structs.rkt"
|
"../lexical-structs.rkt"
|
||||||
"../il-structs.rkt"
|
"../il-structs.rkt"
|
||||||
racket/port
|
racket/port
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
(require "../js-assembler/get-runtime.rkt"
|
(require "browser-evaluate.rkt"
|
||||||
"../browser-evaluate.rkt"
|
"../js-assembler/get-runtime.rkt"
|
||||||
"../js-assembler/package.rkt"
|
"../js-assembler/package.rkt"
|
||||||
"../make-structs.rkt")
|
"../make-structs.rkt")
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
(require "../browser-evaluate.rkt"
|
(require "browser-evaluate.rkt"
|
||||||
"../js-assembler/package.rkt"
|
"../js-assembler/package.rkt"
|
||||||
"../js-assembler/get-runtime.rkt"
|
"../js-assembler/get-runtime.rkt"
|
||||||
"../make-structs.rkt"
|
"../make-structs.rkt"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
(require "../browser-evaluate.rkt"
|
(require "browser-evaluate.rkt"
|
||||||
"../js-assembler/package.rkt"
|
"../js-assembler/package.rkt"
|
||||||
"../js-assembler/get-runtime.rkt"
|
"../js-assembler/get-runtime.rkt"
|
||||||
"../make-structs.rkt"
|
"../make-structs.rkt"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require "../parser/baby-parser.rkt"
|
(require "../parser/baby-parser.rkt"
|
||||||
|
"../parser/lam-entry-gensym.rkt"
|
||||||
"../lexical-structs.rkt"
|
"../lexical-structs.rkt"
|
||||||
"../expression-structs.rkt"
|
"../expression-structs.rkt"
|
||||||
"../lam-entry-gensym.rkt"
|
|
||||||
(for-syntax racket/base))
|
(for-syntax racket/base))
|
||||||
|
|
||||||
(printf "test-parse.rkt\n");
|
(printf "test-parse.rkt\n");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user