Regardless of how the legal side of this pans out, I'm terribly confused
about the content of playerglobal.swc - again, it is not "fakes". Or, if
you consider that analogy with C - it is not the headers only, it is both
the headers and the actual code / implementations. And implementations are
the 90% of that library.
If compiler needed only the headers (definitions) - why does Adobe put all
that stuff into the library? How does compiler know what to include /
exclude (a function / variable declared as native cannot have
implementation - so all the ES stuff gets compiled w/o the native
namespace, some Adobe stuff, which is originally Tamarin (ByteArray for
example) has both native declaration and actual implementations (of several
methods, like, compress() for example). Is that anything that the compiler
actually needs to know? Or if it doesn't, then why is it there?

Besides, there are some kindergarten-style functions, like this one (/***
***/ are my comments):

 // avm+ specific utility method
 public static function throwError(type:Class, index:uint, ... rest)
 {
     // This implements the same error string formatting as the native
     // method PrintWriter::formatP(...) any changes to this method should
     // also be made there to keep the two in sync.
     var i=0; /*** What do you need this variable for? ***/
     var f=function(match, pos, string) /*** obviously type constraints are
for the weak ***/
     {
         var arg_num = -1;
         /*** Did you know you could do `match.charCodeAt(1) - 48` instead
of this switch? ***/
         switch(match.charAt(1))
         {
             case '1':
                 arg_num = 0;
                 break;
             case '2':
                 arg_num = 1;
                 break;
             case '3':
                 arg_num = 2;
                 break;
             case '4':
                 arg_num = 3;
                 break;
             case '5':
                 arg_num = 4;
                 break;
             case '6':
                 arg_num = 5;
                 break; /*** where are 7, 8 and 9? ***/
         }
         if( arg_num > -1 && rest.length > arg_num )
             return rest[arg_num];
         else
             return "";
     }
     /*** digit has an alias - \d, no need to use [0-9], but more than
that, this filters 0..9 characters, but you only replace 0..6 characters,
why? ***/
     throw new type(Error.getErrorMessage(index).replace(/%[0-9]/g, f),
index);
 }

Is this _really_ how this code works in the player? And if so, don't we
have any way to fix this?

Best.

Oleg

Reply via email to