Fixed benchmark

This commit is contained in:
Devine Lu Linvega 2019-07-20 19:18:23 +09:00
parent 1e245e144e
commit 7966b81830
4 changed files with 7 additions and 10 deletions

View File

@ -35,12 +35,13 @@ function Commander (ronin) {
if (txt.indexOf('$') > -1) { ronin.log('Present: $'); return }
const inter = new Lisp(txt, ronin.library)
inter.toPixels()
ronin.always && requestAnimationFrame(() => this.run(txt))
ronin.always === true && requestAnimationFrame(() => this.run(txt))
}
this.load = function (txt) {
ronin.animate(false)
this._input.value = txt
this.run()
this.run(txt)
}
this.reindent = function () {

View File

@ -324,7 +324,7 @@ function Library (ronin) {
this.open = async (path) => { // Imports a graphic file and resizes the frame.
return ronin.surface.open(path)
}
// File System
this.dir = (path = ronin.source.path) => { // Returns the content of a directory.

View File

@ -66,7 +66,7 @@ function Source (ronin) {
if (!fs.existsSync(loc)) { console.warn('Source', 'File does not exist: ' + loc); return }
console.log('Source', 'Reading ' + loc)
this.path = loc
this.load(fs.readFileSync(this.path, 'utf8'))
ronin.commander.load(fs.readFileSync(this.path, 'utf8'))
ronin.log(`Reading file.`)
}
@ -74,10 +74,6 @@ function Source (ronin) {
ronin.commander.run()
}
this.load = function (data) {
ronin.commander._input.value = data
}
this.quit = function (force = false) {
if (this.hasChanges() === true && force === false) {
this.verify()

View File

@ -56,6 +56,6 @@
(test "str" (str 1 4 "-" (add 3 4) ".jpg") "14-7.jpg")
; Interop
(test "interop" ((of (of js "Math") "max") 2 4) 4)
(test "recursive key selector" ((of js "Math" "max") 2 4) 4)
(test "interop" ((of (of (js) "Math") "max") 2 4) 4)
(test "recursive key selector" ((of (js) "Math" "max") 2 4) 4)
)