mirror of
https://git.sr.ht/~crc_/retroforth
synced 2024-11-16 19:48:56 +01:00
nga-js: remove some unused functions, use proper address for tib to allow longer tokens
FossilOrigin-Name: e2657ec5988876902c306f85cd0c4d699835285f3ecb53f2e0f80927d78507eb
This commit is contained in:
parent
5aa1f0d0bb
commit
360de30bfe
1 changed files with 3 additions and 25 deletions
|
@ -341,7 +341,7 @@ function execute(offset) {
|
|||
opcode = image[ip];
|
||||
if (ip == notfound) {
|
||||
document.getElementById('console').value +=
|
||||
"err:notfound : " + string_extract(1471) + "\n";
|
||||
"err:notfound : " + string_extract(1024) + "\n";
|
||||
}
|
||||
if (validatePackedOpcodes(opcode) != 0) {
|
||||
ngaProcessPackedOpcodes(opcode);
|
||||
|
@ -392,32 +392,14 @@ function string_extract(at) {
|
|||
return string_data;
|
||||
}
|
||||
|
||||
function d_link(dt) {
|
||||
return dt + 0;
|
||||
}
|
||||
|
||||
function d_xt(dt) {
|
||||
return dt + 1;
|
||||
}
|
||||
|
||||
function d_class(dt) {
|
||||
return dt + 2;
|
||||
}
|
||||
|
||||
function d_name(dt) {
|
||||
return dt + 3;
|
||||
}
|
||||
|
||||
function d_count_entries() {
|
||||
var c = 0;
|
||||
var i = image[2];
|
||||
while (image[i] != 0) {
|
||||
c++;
|
||||
i = image[i];
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
function d_lookup(name) {
|
||||
var dt = 0;
|
||||
var i = image[2];
|
||||
|
@ -438,15 +420,11 @@ function d_xt_for(name) {
|
|||
return image[d_xt(d_lookup(name))];
|
||||
}
|
||||
|
||||
function d_class_for(name) {
|
||||
return image[d_class(d_lookup(name))];
|
||||
}
|
||||
|
||||
function evaluate(s) {
|
||||
if (s.length == 0)
|
||||
return;
|
||||
string_inject(s, 1471);
|
||||
data.push(1471);
|
||||
string_inject(s, 1024);
|
||||
data.push(1024);
|
||||
execute(interpret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue