(uxnasm) Minor cleanup
This commit is contained in:
parent
18b73f4861
commit
17fd40af43
|
@ -208,14 +208,11 @@ static int
|
||||||
writeopcode(char *w)
|
writeopcode(char *w)
|
||||||
{
|
{
|
||||||
Uint8 res;
|
Uint8 res;
|
||||||
/* tail-call optimization */
|
if(jsrlast && scmp(w, "JMP2r", 5)) { /* tail-call optimization */
|
||||||
if(scmp(w, "JMP2r", 5)) {
|
|
||||||
if(jsrlast) {
|
|
||||||
p.data[p.ptr - 1] = jsrlast == 2 ? findopcode("JMP2") : findopcode("JMP");
|
p.data[p.ptr - 1] = jsrlast == 2 ? findopcode("JMP2") : findopcode("JMP");
|
||||||
jsrlast = 0;
|
jsrlast = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
res = writebyte(findopcode(w));
|
res = writebyte(findopcode(w));
|
||||||
if(scmp(w, "JSR2", 4))
|
if(scmp(w, "JSR2", 4))
|
||||||
jsrlast = 2;
|
jsrlast = 2;
|
||||||
|
@ -235,7 +232,7 @@ writeshort(Uint16 s, int lit)
|
||||||
static int
|
static int
|
||||||
writelitbyte(Uint8 b)
|
writelitbyte(Uint8 b)
|
||||||
{
|
{
|
||||||
if(litlast) { /* combine literals */
|
if(litlast) { /* literals optimization */
|
||||||
Uint8 hb = p.data[p.ptr - 1];
|
Uint8 hb = p.data[p.ptr - 1];
|
||||||
p.ptr -= 2;
|
p.ptr -= 2;
|
||||||
p.length = p.ptr;
|
p.length = p.ptr;
|
||||||
|
|
Loading…
Reference in New Issue