From: Sandro S. <st...@us...> - 2006-12-18 15:59:07
|
Update of /cvsroot/ming/ming/src/actioncompiler In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv397/src/actioncompiler Modified Files: swf5compiler.y Log Message: Use Logical OR and AND tags rather then implement these by mean of other tags. Note that the logor.as testfile was already producing *working* code, just a bit bigger then the one that is output now. This was verified with the MM player. Index: swf5compiler.y =================================================================== RCS file: /cvsroot/ming/ming/src/actioncompiler/swf5compiler.y,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** swf5compiler.y 13 Dec 2006 22:12:44 -0000 1.39 --- swf5compiler.y 18 Dec 2006 15:58:59 -0000 1.40 *************** *** 1187,1208 **** bufferWriteOp($2, SWFACTION_LOGICALNOT); } ! | expr "||" expr { $$ = $1; ! bufferWriteOp($$, SWFACTION_PUSHDUP); ! bufferWriteOp($$, SWFACTION_IF); ! bufferWriteS16($$, 2); ! bufferWriteS16($$, bufferLength($3)+1); ! bufferWriteOp($$, SWFACTION_POP); ! bufferConcat($$, $3); } ! | expr "&&" expr { $$ = $1; ! bufferWriteOp($$, SWFACTION_PUSHDUP); ! bufferWriteOp($$, SWFACTION_LOGICALNOT); ! bufferWriteOp($$, SWFACTION_IF); ! bufferWriteS16($$, 2); ! bufferWriteS16($$, bufferLength($3)+1); ! bufferWriteOp($$, SWFACTION_POP); ! bufferConcat($$, $3); } | expr '*' expr --- 1187,1199 ---- bufferWriteOp($2, SWFACTION_LOGICALNOT); } ! | expr LOR expr { $$ = $1; ! bufferConcat($$, $3); ! bufferWriteOp($$, SWFACTION_LOGICALOR); } ! | expr LAN expr { $$ = $1; ! bufferConcat($$, $3); ! bufferWriteOp($$, SWFACTION_LOGICALAND); } | expr '*' expr |