int main()
{
array(int) positions=({4,3});
int pos=1;
array unrolled=({});
foreach (positions, int nextpos)
{
write("Extending to %d\n",nextpos);
for (;pos<=nextpos;++pos) unrolled+=({"Spam"});
}
}
The basic concept is that it should unroll an array of
With inlined byte code disassembly (and some braces and newlines):
>int main()
>{
=== 3 1c entry
=== 3 30 function start
=== 3 30 mark_at(0)
=== 3 54 pop to mark
=== 3 90 fill_stack(4,0)
=== 3 b6 init_frame(0,4)
>array(int) positions=({4,3});
=== 4 be constant(0)
F_LOOP is rather simple.
is type int?
yes:
is it 0?
yes:
end loop
no:
decrement
call body
no:
call f_loop
Note the absence of "or less than" in the check for 0. I guess there
should be such a check. It's there in the interret_functions.h
version.
I will
Just " A::f(); ".
The following artificial example generates a syntax error. What is the
correct syntax?
main.pike:
class B {
inherit FOO.A;
void f() {
FOO.A::f();
}
}
FOO.pmod:
class A {
void f() {}
}
Arne