fixing the base (untraced) language
This commit is contained in:
parent
ebc8919614
commit
302d046165
|
@ -6,4 +6,4 @@
|
||||||
`(file ,(path->string base-lang-path)))
|
`(file ,(path->string base-lang-path)))
|
||||||
|
|
||||||
(require racket/runtime-path)
|
(require racket/runtime-path)
|
||||||
(define-runtime-path base-lang-path "../lang/base.rkt")
|
(define-runtime-path base-lang-path "../../lang/base.rkt")
|
|
@ -140,7 +140,7 @@ EOF
|
||||||
(assemble-oparg (UnspliceRestFromStack!-length op)))]
|
(assemble-oparg (UnspliceRestFromStack!-length op)))]
|
||||||
|
|
||||||
[(InstallContinuationMarkEntry!? op)
|
[(InstallContinuationMarkEntry!? op)
|
||||||
(string-append "RUNTIME.installContinuationMarkEntry(MACHINE,"
|
(string-append "MACHINE.installContinuationMarkEntry("
|
||||||
"MACHINE.control[MACHINE.control.length-1].pendingContinuationMarkKey,"
|
"MACHINE.control[MACHINE.control.length-1].pendingContinuationMarkKey,"
|
||||||
"MACHINE.val);")]
|
"MACHINE.val);")]
|
||||||
|
|
||||||
|
|
|
@ -341,6 +341,20 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Save the continuation mark on the top control frame.
|
||||||
|
Machine.prototype.installContinuationMarkEntry = function(key, value) {
|
||||||
|
var frame = this.control[this.control.length - 1];
|
||||||
|
var marks = frame.marks;
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < marks.length; i++) {
|
||||||
|
if (equals(key, marks[i][0])) {
|
||||||
|
marks[i][1] = value;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
marks.push([key, value]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,5 @@
|
||||||
;; If you don't want this, write in whalesong/base instead.
|
;; If you don't want this, write in whalesong/base instead.
|
||||||
|
|
||||||
(provide (except-out (all-from-out "base.rkt")
|
(provide (except-out (all-from-out "base.rkt")
|
||||||
;;#%app
|
#%app)
|
||||||
)
|
(rename-out [traced-app #%app]))
|
||||||
;;(rename-out [traced-app #%app])
|
|
||||||
)
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
(boolean? "t")
|
(boolean? "t")
|
||||||
(boolean? #t)
|
(boolean? #t)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
(require (planet dyoo/whalesong/image))
|
(require (planet dyoo/whalesong/image))
|
||||||
(color 3 4 5 0)
|
(color 3 4 5 0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
(let ()
|
(let ()
|
||||||
|
|
||||||
;; (define (caar l)
|
;; (define (caar l)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
(begin
|
(begin
|
||||||
(define make-parser
|
(define make-parser
|
||||||
(lambda (grammar lexer)
|
(lambda (grammar lexer)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
(displayln "hello world")
|
(displayln "hello world")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
(require (planet dyoo/whalesong/image))
|
(require (planet dyoo/whalesong/image))
|
||||||
|
|
||||||
(image-color? "red")
|
(image-color? "red")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
'(1 2 3)
|
'(1 2 3)
|
||||||
(list "hello" "world")
|
(list "hello" "world")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
;; Knuth's Man-or-boy-test.
|
;; Knuth's Man-or-boy-test.
|
||||||
;; http://rosettacode.org/wiki/Man_or_boy_test
|
;; http://rosettacode.org/wiki/Man_or_boy_test
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
|
|
||||||
(number? 0)
|
(number? 0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
(apply + 2 3 4 5 '())
|
(apply + 2 3 4 5 '())
|
||||||
(apply + 2 3 4 '(5))
|
(apply + 2 3 4 '(5))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
(provide (all-defined-out))
|
(provide (all-defined-out))
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
(define-struct pair (f r))
|
(define-struct pair (f r))
|
||||||
(define-struct color (r g b))
|
(define-struct color (r g b))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
(define (make-gen gen)
|
(define (make-gen gen)
|
||||||
(let ([cont (box #f)])
|
(let ([cont (box #f)])
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
(define (make-gen gen)
|
(define (make-gen gen)
|
||||||
(let ([cont #f])
|
(let ([cont #f])
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang planet dyoo/whalesong
|
#lang planet dyoo/whalesong/base
|
||||||
|
|
||||||
(substring "hello world" 0)
|
(substring "hello world" 0)
|
||||||
(substring "hello world" 1)
|
(substring "hello world" 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user