mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Revert "codegen.c: exit headless case early if a condition is always true"
This reverts commit e5b32e559860073632fc7b69cb98b90f2c069e81; ref #5815
This commit is contained in:
@@ -2606,25 +2606,6 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
}
|
||||
tree = tree->cdr;
|
||||
while (tree) {
|
||||
if (!head) {
|
||||
n = tree->car->car;
|
||||
while (n) {
|
||||
if (true_always(n->car)) {
|
||||
codegen(s, tree->car->cdr, val);
|
||||
if (val) pop();
|
||||
uint32_t pos = cursp();
|
||||
if (pos3 != JMPLINK_START) dispatch_linked(s, pos3);
|
||||
if (val) {
|
||||
if (cursp() != pos) {
|
||||
gen_move(s, cursp(), pos, 0);
|
||||
}
|
||||
push();
|
||||
}
|
||||
goto exit;
|
||||
}
|
||||
n = n->cdr;
|
||||
}
|
||||
}
|
||||
n = tree->car->car;
|
||||
pos1 = pos2 = JMPLINK_START;
|
||||
while (n) {
|
||||
|
||||
Reference in New Issue
Block a user