simulator in separate directory
This commit is contained in:
parent
1aeb9c57fb
commit
2463cb90e6
1
dead/README
Normal file
1
dead/README
Normal file
|
@ -0,0 +1 @@
|
||||||
|
This holds file that may be dead code.
|
|
@ -1,14 +0,0 @@
|
||||||
#lang racket
|
|
||||||
(require compiler/zo-parse)
|
|
||||||
(require (for-syntax racket/base))
|
|
||||||
|
|
||||||
(provide bytecode)
|
|
||||||
|
|
||||||
|
|
||||||
(define bytecode
|
|
||||||
(parameterize ([current-namespace (make-base-namespace)])
|
|
||||||
(let ([bc (compile (parameterize ([read-accept-reader #t])
|
|
||||||
(read (open-input-file "/home/dyoo/work/js-sicp-5-5/sample-small-file.rkt"))))]
|
|
||||||
[op (open-output-bytes)])
|
|
||||||
(write bc op)
|
|
||||||
(zo-parse (open-input-bytes (get-output-bytes op))))))
|
|
|
@ -1,9 +0,0 @@
|
||||||
#lang racket/base
|
|
||||||
(provide f)
|
|
||||||
(define (f x)
|
|
||||||
(* x x))
|
|
||||||
|
|
||||||
|
|
||||||
;; infinite loop
|
|
||||||
(letrec ([g (lambda () (g))])
|
|
||||||
(g))
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require "simulator-structs.rkt"
|
(require "simulator-structs.rkt"
|
||||||
"il-structs.rkt"
|
"../il-structs.rkt"
|
||||||
racket/math
|
racket/math
|
||||||
racket/list
|
racket/list
|
||||||
(for-syntax racket/base))
|
(for-syntax racket/base))
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
(provide (all-defined-out))
|
(provide (all-defined-out))
|
||||||
|
|
||||||
(require "il-structs.rkt"
|
(require "../il-structs.rkt"
|
||||||
"expression-structs.rkt"
|
"../expression-structs.rkt"
|
||||||
"lexical-structs.rkt")
|
"../lexical-structs.rkt")
|
||||||
|
|
||||||
|
|
||||||
(define-type PrimitiveValue (Rec PrimitiveValue (U String Number Symbol Boolean
|
(define-type PrimitiveValue (Rec PrimitiveValue (U String Number Symbol Boolean
|
|
@ -5,13 +5,13 @@
|
||||||
;; For example, I'll need to be able to count the number of statements executed by an evaluation.
|
;; For example, I'll need to be able to count the number of statements executed by an evaluation.
|
||||||
;; 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 "expression-structs.rkt"
|
(require "simulator-structs.rkt"
|
||||||
"il-structs.rkt"
|
"../expression-structs.rkt"
|
||||||
"lexical-structs.rkt"
|
"../il-structs.rkt"
|
||||||
"simulator-structs.rkt"
|
"../lexical-structs.rkt"
|
||||||
"bootstrapped-primitives.rkt"
|
"../bootstrapped-primitives.rkt"
|
||||||
"kernel-primitives.rkt"
|
"../kernel-primitives.rkt"
|
||||||
"expression-structs.rkt"
|
"../expression-structs.rkt"
|
||||||
racket/list
|
racket/list
|
||||||
racket/match
|
racket/match
|
||||||
(for-syntax racket/base))
|
(for-syntax racket/base))
|
|
@ -1,8 +1,8 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
|
|
||||||
(require "simulator.rkt"
|
(require "simulator/simulator.rkt"
|
||||||
"simulator-structs.rkt"
|
"simulator/simulator-structs.rkt"
|
||||||
"simulator-helpers.rkt"
|
"simulator/simulator-helpers.rkt"
|
||||||
"test-helpers.rkt")
|
"test-helpers.rkt")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user