dao icon indicating copy to clipboard operation
dao copied to clipboard

Routine packing doesn't work for code section routines

Open Night-walker opened this issue 10 years ago • 0 comments

(dao) r = {1}.iterate.{$backward}
= routine_20_0x1289d00
(dao) r(){io.writeln(X)}
[[ERROR]] in file "interactive codes":
  At line 0 : Invalid function definition --- " __main__() ";
  At line 1 : Invalid virtual machine instruction --- " CALL:0,2560,1 ";
In code snippet:
      0 :  GETVG       :     0 ,     5 ,     0 ;     1;   r
>>    1 :  CALL        :     0 ,  2560 ,     1 ;     1;   r()
      2 :  GOTO        :     0 ,    11 ,    70 ;     1;   {io. writeln(X)}
  ** Invalid call --- " calling normal method with code section ";
     Assuming  : routine<=>none>[item:int,index:int];
(dao) r()
[[Error::Param]] --- Invalid parameter(s):
  ** Invalid call --- " calling code section method without code section ";
     Assuming  : routine iterate(self:list<int>,direction=enum<forward,backward>)[item:int,index:in
                     t]=>none;
     Reference : file "dao";
In code snippet:
      0 :  GETVG       :     0 ,     5 ,     0 ;     1;   r
>>    1 :  CALL        :     0 ,   512 ,     1 ;     1;   r()
      2 :  RETURN      :     1 ,     1 ,     0 ;     1;   r()
Raised by:  __main__(), at instruction 1 in line 1 in file "interactive codes";

Neither of the two and both of them at the same time, heh. Quantum mechanics, no less.

Night-walker avatar Sep 10 '15 13:09 Night-walker