| ... | ... |
@@ -208,13 +208,10 @@ static int |
| 208 | 208 |
writeopcode(char *w) |
| 209 | 209 |
{
|
| 210 | 210 |
Uint8 res; |
| 211 |
- /* tail-call optimization */ |
|
| 212 |
- if(scmp(w, "JMP2r", 5)) {
|
|
| 213 |
- if(jsrlast) {
|
|
| 214 |
- p.data[p.ptr - 1] = jsrlast == 2 ? findopcode("JMP2") : findopcode("JMP");
|
|
| 215 |
- jsrlast = 0; |
|
| 216 |
- return 1; |
|
| 217 |
- } |
|
| 211 |
+ if(jsrlast && scmp(w, "JMP2r", 5)) { /* tail-call optimization */
|
|
| 212 |
+ p.data[p.ptr - 1] = jsrlast == 2 ? findopcode("JMP2") : findopcode("JMP");
|
|
| 213 |
+ jsrlast = 0; |
|
| 214 |
+ return 1; |
|
| 218 | 215 |
} |
| 219 | 216 |
res = writebyte(findopcode(w)); |
| 220 | 217 |
if(scmp(w, "JSR2", 4)) |
| ... | ... |
@@ -235,7 +232,7 @@ writeshort(Uint16 s, int lit) |
| 235 | 232 |
static int |
| 236 | 233 |
writelitbyte(Uint8 b) |
| 237 | 234 |
{
|
| 238 |
- if(litlast) { /* combine literals */
|
|
| 235 |
+ if(litlast) { /* literals optimization */
|
|
| 239 | 236 |
Uint8 hb = p.data[p.ptr - 1]; |
| 240 | 237 |
p.ptr -= 2; |
| 241 | 238 |
p.length = p.ptr; |