Rename run() to ircbotRun(), since it's meant for them

This commit is contained in:
Juhani Krekelä 2018-05-26 13:15:34 +03:00
parent 96a5cd7767
commit bf28a946ec
2 changed files with 2 additions and 3 deletions

View File

@ -23,7 +23,7 @@ TODO
### gir.js
* Make VM and transformMultiplyLoops use a Proxied object that gives out 0
for nonexistent elements for tape and allows using [] interface
* Keep a cache of compiled programs in `run()`
* Keep a cache of compiled programs in `ircbotRun()`
* Support for other types of EOF?
### gir.html

3
gir.js
View File

@ -917,9 +917,8 @@ function compile(program, enableExtensions = true) {
return optimize(parse(program, enableExtensions));
}
// TODO: Rename to fit purpose
// (string, string, int) → string
function run(program, input, maxCycles = null) {
function ircbotRun(program, input, maxCycles = null) {
// TODO; Cache programs
let compiled = compile(program);
let vm = newVM(compiled, encodeUTF8(input));