optimize begin emitter
This commit is contained in:
parent
f4b54c85ea
commit
d097a021e3
|
@ -1183,15 +1183,9 @@ codegen(pic_state *pic, codegen_context *cxt, pic_value obj)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (sym == pic->sBEGIN) {
|
else if (sym == pic->sBEGIN) {
|
||||||
pic_value elt, it;
|
codegen(pic, cxt, pic_list_ref(pic, obj, 1));
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
pic_for_each (elt, pic_cdr(pic, obj), it) {
|
|
||||||
if (i++ != 0) {
|
|
||||||
emit_n(pic, cxt, OP_POP);
|
emit_n(pic, cxt, OP_POP);
|
||||||
}
|
codegen(pic, cxt, pic_list_ref(pic, obj, 2));
|
||||||
codegen(pic, cxt, elt);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (sym == pic->sQUOTE) {
|
else if (sym == pic->sQUOTE) {
|
||||||
|
|
Loading…
Reference in New Issue