the more tests are running again
This commit is contained in:
parent
f2cc5b421f
commit
82a2f9e880
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
|
|
||||||
(provide package
|
(provide package
|
||||||
package-anonymous
|
;;package-anonymous
|
||||||
package-standalone-xhtml
|
package-standalone-xhtml
|
||||||
get-inert-code
|
get-inert-code
|
||||||
get-standalone-code
|
get-standalone-code
|
||||||
|
@ -77,14 +77,14 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define (package-anonymous source-code
|
;; (define (package-anonymous source-code
|
||||||
#:should-follow-children? should-follow?
|
;; #:should-follow-children? should-follow?
|
||||||
#:output-port op)
|
;; #:output-port op)
|
||||||
(fprintf op "(function() {\n")
|
;; (fprintf op "(function() {\n")
|
||||||
(package source-code
|
;; (package source-code
|
||||||
#:should-follow-children? should-follow?
|
;; #:should-follow-children? should-follow?
|
||||||
#:output-port op)
|
;; #:output-port op)
|
||||||
(fprintf op " return invoke; })\n"))
|
;; (fprintf op " return invoke; })\n"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -456,10 +456,10 @@ EOF
|
||||||
|
|
||||||
;; write-standalone-code: source output-port -> void
|
;; write-standalone-code: source output-port -> void
|
||||||
(define (write-standalone-code source-code op)
|
(define (write-standalone-code source-code op)
|
||||||
(package-anonymous source-code
|
(package source-code
|
||||||
#:should-follow-children? (lambda (src) #t)
|
#:should-follow-children? (lambda (src) #t)
|
||||||
#:output-port op)
|
#:output-port op))
|
||||||
(fprintf op "()(plt.runtime.currentMachine, function() {}, function() {}, {});\n"))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,42 +19,38 @@
|
||||||
racket/path
|
racket/path
|
||||||
racket/port))
|
racket/port))
|
||||||
|
|
||||||
|
(define first-run #t)
|
||||||
|
|
||||||
(define evaluate (make-evaluate
|
(define evaluate (make-evaluate
|
||||||
(lambda (program op)
|
(lambda (program op)
|
||||||
|
|
||||||
(fprintf op "(function () {")
|
(fprintf op "(function () {")
|
||||||
|
|
||||||
(displayln (get-runtime) op)
|
|
||||||
|
|
||||||
(newline op)
|
(newline op)
|
||||||
|
|
||||||
(fprintf op "var innerInvoke = ")
|
(when first-run
|
||||||
(package-anonymous program
|
(display (get-runtime) op)
|
||||||
|
(set! first-run #f))
|
||||||
|
|
||||||
|
(display "return (function(succ, fail, params) {
|
||||||
|
var machine = new plt.runtime.Machine();
|
||||||
|
plt.runtime.currentMachine = machine;" op)
|
||||||
|
|
||||||
|
(package program
|
||||||
#:should-follow-children? (lambda (src) #t)
|
#:should-follow-children? (lambda (src) #t)
|
||||||
#:output-port op)
|
#:output-port op)
|
||||||
(fprintf op "();\n")
|
(display " machine.params.currentDisplayer = function(MACHINE, v) {
|
||||||
|
|
||||||
(fprintf op #<<EOF
|
|
||||||
return (function(succ, fail, params) {
|
|
||||||
var machine = new plt.runtime.Machine();
|
|
||||||
var myParams = { currentDisplayer : function(MACHINE, v) {
|
|
||||||
params.currentDisplayer(v);
|
params.currentDisplayer(v);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return innerInvoke(machine,
|
plt.runtime.ready(function() {
|
||||||
function() {
|
plt.runtime.invokeMains(machine,
|
||||||
plt.runtime.invokeMains(machine, succ, fail);
|
succ,
|
||||||
},
|
|
||||||
function(MACHINE, e) {
|
function(MACHINE, e) {
|
||||||
return fail(e);
|
fail(e);
|
||||||
},
|
|
||||||
myParams);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
)))
|
});
|
||||||
|
});" op))))
|
||||||
|
|
||||||
|
|
||||||
;; Flatten the paths out.
|
;; Flatten the paths out.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user