Moved compiler-related stuff to compiler subdirectory

This commit is contained in:
Danny Yoo 2011-05-26 19:46:23 -04:00
parent f56253f229
commit 667318e895
34 changed files with 81 additions and 83 deletions

View File

@ -6,12 +6,12 @@
"compiler-structs.rkt") "compiler-structs.rkt")
(require/typed "parameters.rkt" (require/typed "../parameters.rkt"
(current-defined-name (Parameterof (U Symbol LamPositionalName)))) (current-defined-name (Parameterof (U Symbol LamPositionalName))))
(require/typed "parser/parse-bytecode.rkt" (require/typed "../parser/parse-bytecode.rkt"
(parse-bytecode (Path -> Expression))) (parse-bytecode (Path -> Expression)))
(require/typed "parser/baby-parser.rkt" (require/typed "../parser/baby-parser.rkt"
[parse (Any -> Expression)]) [parse (Any -> Expression)])

View File

@ -6,10 +6,10 @@
"compiler-structs.rkt" "compiler-structs.rkt"
"kernel-primitives.rkt" "kernel-primitives.rkt"
"optimize-il.rkt" "optimize-il.rkt"
"parameters.rkt"
"sets.rkt"
"analyzer-structs.rkt" "analyzer-structs.rkt"
"analyzer.rkt" "analyzer.rkt"
"../parameters.rkt"
"../sets.rkt"
racket/match racket/match
racket/bool racket/bool
racket/list) racket/list)

View File

@ -2,7 +2,7 @@
(require racket/list (require racket/list
"lexical-structs.rkt" "lexical-structs.rkt"
"sets.rkt") "../sets.rkt")
(provide find-variable (provide find-variable
extend-lexical-environment extend-lexical-environment
extend-lexical-environment/names extend-lexical-environment/names

View File

@ -1,6 +1,6 @@
#lang typed/racket/base #lang typed/racket/base
(require "expression-structs.rkt" (require "compiler/expression-structs.rkt"
"lexical-structs.rkt" "compiler/lexical-structs.rkt"
"sets.rkt" "sets.rkt"
racket/match) racket/match)

View File

@ -3,8 +3,8 @@
(require "assemble-structs.rkt" (require "assemble-structs.rkt"
"assemble-helpers.rkt" "assemble-helpers.rkt"
"assemble-open-coded.rkt" "assemble-open-coded.rkt"
"../il-structs.rkt" "../compiler/il-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
racket/string racket/string
racket/list) racket/list)

View File

@ -1,8 +1,8 @@
#lang typed/racket/base #lang typed/racket/base
(require "../il-structs.rkt" (require "../compiler/il-structs.rkt"
"../expression-structs.rkt" "../compiler/expression-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
racket/list) racket/list)
(provide assemble-oparg (provide assemble-oparg

View File

@ -1,9 +1,9 @@
#lang typed/racket/base #lang typed/racket/base
(require "assemble-helpers.rkt" (require "assemble-helpers.rkt"
"../il-structs.rkt" "../compiler/il-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../kernel-primitives.rkt" "../compiler/kernel-primitives.rkt"
racket/string racket/string
racket/list) racket/list)

View File

@ -1,7 +1,7 @@
#lang typed/racket/base #lang typed/racket/base
(require "assemble-helpers.rkt" (require "assemble-helpers.rkt"
"../il-structs.rkt" "../compiler/il-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../parameters.rkt" "../parameters.rkt"
racket/string) racket/string)

View File

@ -3,7 +3,7 @@
(provide (all-defined-out)) (provide (all-defined-out))
(require "../il-structs.rkt") (require "../compiler/il-structs.rkt")

View File

@ -5,10 +5,10 @@
"assemble-expression.rkt" "assemble-expression.rkt"
"assemble-perform-statement.rkt" "assemble-perform-statement.rkt"
"collect-jump-targets.rkt" "collect-jump-targets.rkt"
"../il-structs.rkt" "../compiler/il-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../compiler/expression-structs.rkt"
"../helpers.rkt" "../helpers.rkt"
"../expression-structs.rkt"
racket/string racket/string
racket/list) racket/list)

View File

@ -1,7 +1,7 @@
#lang typed/racket/base #lang typed/racket/base
(require "../expression-structs.rkt" (require "../compiler/expression-structs.rkt"
"../il-structs.rkt" "../compiler/il-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../helpers.rkt" "../helpers.rkt"
racket/list) racket/list)

View File

@ -1,12 +1,13 @@
#lang typed/racket/base #lang typed/racket/base
(require "compiler.rkt" (require "compiler/compiler.rkt"
"il-structs.rkt" "compiler/il-structs.rkt"
"compiler/lexical-structs.rkt"
"compiler/bootstrapped-primitives.rkt"
"compiler/compiler-structs.rkt"
"compiler/expression-structs.rkt"
"get-dependencies.rkt" "get-dependencies.rkt"
"lexical-structs.rkt"
"bootstrapped-primitives.rkt"
"compiler-structs.rkt"
"expression-structs.rkt"
"parameters.rkt" "parameters.rkt"
"sets.rkt" "sets.rkt"
racket/list racket/list

View File

@ -1,12 +1,12 @@
#lang typed/racket/base #lang typed/racket/base
(require "compiler.rkt" (require "compiler/compiler.rkt"
"il-structs.rkt" "compiler/il-structs.rkt"
"compiler/lexical-structs.rkt"
"compiler/bootstrapped-primitives.rkt"
"compiler/compiler-structs.rkt"
"compiler/expression-structs.rkt"
"get-dependencies.rkt" "get-dependencies.rkt"
"lexical-structs.rkt"
"bootstrapped-primitives.rkt"
"compiler-structs.rkt"
"expression-structs.rkt"
"parameters.rkt" "parameters.rkt"
"sets.rkt" "sets.rkt"
"make-structs.rkt" "make-structs.rkt"

View File

@ -1,7 +1,7 @@
#lang typed/racket/base #lang typed/racket/base
(require "expression-structs.rkt" (require "compiler/expression-structs.rkt"
"lexical-structs.rkt" "compiler/lexical-structs.rkt"
"sets.rkt" "sets.rkt"
racket/path) racket/path)

View File

@ -1,8 +1,8 @@
#lang racket/base #lang racket/base
(require "../expression-structs.rkt" (require "../compiler/expression-structs.rkt"
"../lexical-env.rkt" "../compiler/lexical-env.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../helpers.rkt" "../helpers.rkt"
"../parameters.rkt" "../parameters.rkt"
"lam-entry-gensym.rkt" "lam-entry-gensym.rkt"

View File

@ -4,8 +4,8 @@
(require "typed-module-path.rkt" (require "typed-module-path.rkt"
"lam-entry-gensym.rkt" "lam-entry-gensym.rkt"
"path-rewriter.rkt" "path-rewriter.rkt"
"../expression-structs.rkt" "../compiler/expression-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../parameters.rkt" "../parameters.rkt"
"../get-module-bytecode.rkt" "../get-module-bytecode.rkt"
syntax/modresolve syntax/modresolve

View File

@ -1,7 +1,7 @@
#lang racket/base #lang racket/base
(require "simulator-structs.rkt" (require "simulator-structs.rkt"
"../il-structs.rkt"
"simulator-helpers.rkt" "simulator-helpers.rkt"
"../compiler/il-structs.rkt"
racket/math racket/math
racket/list racket/list
(for-syntax racket/base)) (for-syntax racket/base))

View File

@ -2,9 +2,9 @@
(provide (all-defined-out)) (provide (all-defined-out))
(require "../il-structs.rkt" (require "../compiler/il-structs.rkt"
"../expression-structs.rkt" "../compiler/expression-structs.rkt"
"../lexical-structs.rkt") "../compiler/lexical-structs.rkt")

View File

@ -6,12 +6,11 @@
;; I also need to do things like count pushes and pops. Basically, low-level benchmarking. ;; I also need to do things like count pushes and pops. Basically, low-level benchmarking.
(require "simulator-structs.rkt" (require "simulator-structs.rkt"
"../expression-structs.rkt" "../compiler/expression-structs.rkt"
"../il-structs.rkt" "../compiler/il-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../bootstrapped-primitives.rkt" "../compiler/bootstrapped-primitives.rkt"
"../kernel-primitives.rkt" "../compiler/kernel-primitives.rkt"
"../expression-structs.rkt"
racket/list racket/list
racket/match racket/match
(for-syntax racket/base)) (for-syntax racket/base))

View File

@ -3,9 +3,8 @@
(require "browser-evaluate.rkt" (require "browser-evaluate.rkt"
"../js-assembler/assemble.rkt" "../js-assembler/assemble.rkt"
"../js-assembler/get-runtime.rkt" "../js-assembler/get-runtime.rkt"
"../compiler/lexical-structs.rkt"
"../lexical-structs.rkt" "../compiler/il-structs.rkt"
"../il-structs.rkt"
racket/port racket/port
racket/promise racket/promise
racket/runtime-path) racket/runtime-path)

View File

@ -2,19 +2,18 @@
(require "../get-dependencies.rkt" (require "../get-dependencies.rkt"
"../get-module-bytecode.rkt" "../get-module-bytecode.rkt"
"../parser/parse-bytecode.rkt" "../parser/parse-bytecode.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
racket/path racket/path
racket/runtime-path racket/runtime-path
rackunit) rackunit)
(printf "test-get-dependencies.rkt\n") (printf "test-get-dependencies.rkt\n")
(define-runtime-path compiler-path "..")
(define-runtime-path get-dependencies-path
;(printf "This is the path: ~s\n" (build-path ".." "get-dependencies.rkt"))
; (path->string (normalize-path compiler-path))) (define-runtime-path get-module-bytecode-path
;(flush-output) (build-path ".." "get-module-bytecode.rkt"))
@ -22,11 +21,11 @@
(normalize-path (normalize-path
(let ([p (find-system-path 'collects-dir)]) (let ([p (find-system-path 'collects-dir)])
(cond (cond
[(relative-path? p) [(relative-path? p)
(find-executable-path (find-system-path 'exec-file) (find-executable-path (find-system-path 'exec-file)
(find-system-path 'collects-dir))] (find-system-path 'collects-dir))]
[else [else
p])))) p]))))
@ -37,7 +36,7 @@
(define e (define e
(parse-bytecode (build-path compiler-path "get-dependencies.rkt"))) (parse-bytecode get-dependencies-path))
(void (get-dependencies e)) (void (get-dependencies e))
@ -52,19 +51,19 @@
;; This should have three dependencies: racket/base, racket/match, and get-module-bytecode. ;; This should have three dependencies: racket/base, racket/match, and get-module-bytecode.
(let ([ip (open-input-string (let ([ip (open-input-string
(format (string-append "(module foo racket/base (require racket/math " (format (string-append "(module foo racket/base (require racket/math "
"(file \"~a/get-module-bytecode.rkt\")) (exp 1))") "(file ~s)) (exp 1))")
(path->string (normalize-path compiler-path))))]) (path->string (normalize-path get-module-bytecode-path))))])
(check-equal? (sort (get-dependencies (parse-bytecode (check-equal? (sort (get-dependencies (parse-bytecode
(open-input-bytes (open-input-bytes
(get-module-bytecode ip)))) (get-module-bytecode ip))))
module-name<) module-name<)
(sort (sort
(list (make-ModuleLocator 'collects/racket/base.rkt (list (make-ModuleLocator 'collects/racket/base.rkt
(normalize-path (build-path collects-dir "racket" "base.rkt"))) (normalize-path (build-path collects-dir "racket" "base.rkt")))
(make-ModuleLocator 'collects/racket/math.rkt (make-ModuleLocator 'collects/racket/math.rkt
(normalize-path (build-path collects-dir "racket" "math.rkt"))) (normalize-path (build-path collects-dir "racket" "math.rkt")))
(make-ModuleLocator 'whalesong/get-module-bytecode.rkt (make-ModuleLocator 'whalesong/get-module-bytecode.rkt
(normalize-path (build-path compiler-path "get-module-bytecode.rkt")))) (normalize-path get-module-bytecode-path)))
module-name<))) module-name<)))

View File

@ -2,8 +2,8 @@
(require (prefix-in racket: racket/base) (require (prefix-in racket: racket/base)
racket/runtime-path racket/runtime-path
"../compiler-structs.rkt" "../compiler/compiler-structs.rkt"
"../compiler.rkt" "../compiler/compiler.rkt"
"../parser/parse-bytecode.rkt" "../parser/parse-bytecode.rkt"
"../get-module-bytecode.rkt" "../get-module-bytecode.rkt"
"../language-namespace.rkt") "../language-namespace.rkt")

View File

@ -6,8 +6,8 @@
racket/path racket/path
"../parameters.rkt" "../parameters.rkt"
"../parser/parse-bytecode.rkt" "../parser/parse-bytecode.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../expression-structs.rkt" "../compiler/expression-structs.rkt"
racket/runtime-path racket/runtime-path
(for-syntax racket/base)) (for-syntax racket/base))

View File

@ -2,8 +2,8 @@
(require "../parser/baby-parser.rkt" (require "../parser/baby-parser.rkt"
"../parser/lam-entry-gensym.rkt" "../parser/lam-entry-gensym.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../expression-structs.rkt" "../compiler/expression-structs.rkt"
(for-syntax racket/base)) (for-syntax racket/base))
(printf "test-parse.rkt\n"); (printf "test-parse.rkt\n");

View File

@ -1,7 +1,7 @@
#lang racket #lang racket
(require "../il-structs.rkt" (require "../compiler/il-structs.rkt"
"../lexical-structs.rkt" "../compiler/lexical-structs.rkt"
"../simulator/simulator-structs.rkt" "../simulator/simulator-structs.rkt"
"../simulator/simulator-primitives.rkt" "../simulator/simulator-primitives.rkt"
"../simulator/simulator.rkt") "../simulator/simulator.rkt")