Changeset 489


Ignore:
Timestamp:
03/30/16 17:05:17 (9 years ago)
Author:
Maciej Komosinski
Message:

Fixed iteration of invalid values and objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/vm/framscript.y

    r477 r489  
    493493                   trctx.out->printf("dec m0\nmove %s.iterator,m[m0]\n",$4.getString().c_str());
    494494           else
    495                    trctx.out->printf("move s%d,m1\ndec m0\nif m1,==,null,:_loop_end_%d\nmove [m1].\"iterator\",m[m0]\n",0,$1.counter);
     495                   trctx.out->printf("move s%d,m1\ndec m0\nif ~=,m1,:_loop_end_%d\nmove [m1].\"iterator\",m[m0]\n",0,$1.counter);
    496496           // s0=iterator s1=obj (=obj.iterator)
    497497           trctx.out->printf(":_loop1_%d\n",$1.counter);
    498498           trctx.out->printf(":_loop_%d\n",$1.counter);
    499499           trctx.out->printf("move s0,m1\nmove [m1].\"next\",m2\n");
    500            trctx.out->printf("if m2,==,0,:_loop_end_%d\n",$1.counter);
     500           trctx.out->printf("if ~=,m2,:_loop_end_%d\n",$1.counter);
    501501           trctx.out->printf("move [m1].\"value\",s%d\n",$3.getInt()-trstack.currentPos());
    502502           }
Note: See TracChangeset for help on using the changeset viewer.