Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD63BC74B for ; Wed, 2 May 2012 08:09:53 +0000 (UTC) Received: (qmail 30614 invoked by uid 500); 2 May 2012 08:09:53 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 30471 invoked by uid 500); 2 May 2012 08:09:50 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 30449 invoked by uid 99); 2 May 2012 08:09:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 08:09:50 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of olegsivokon@gmail.com designates 209.85.213.175 as permitted sender) Received: from [209.85.213.175] (HELO mail-yx0-f175.google.com) (209.85.213.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2012 08:09:41 +0000 Received: by yenm3 with SMTP id m3so362740yen.6 for ; Wed, 02 May 2012 01:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Dt9vx7iacf2qMKiLExsPQ3lp2pEG5QyUXggvTe1+1fA=; b=nguG0vrTT9OudZXFYPP3vZF8CJG9504/Xqtbr2Md+/scBHVLptzpnFD22jGtYWcV0M i8+/x1Q3Y7blXE+B4+aspYQrWhIT22KLZst1n26CCMSKW/VgXCALFuF+awkge3ViRh0V BpD1C+goGkJXjXgHr8YyMM/9TWmRbRPu4vvonBS8pEXRUMqj8BuZWIwL/82K1QGvyssv f5fv03ioOruJsEQGaAU//GQI3k1tJiejYsqVj8n7HvlMGd1wEYK+rt8skuVZpMVPmjXh 3+BaGuIEC1SxC3d7ng9zQUpuV5L5HspDGE7Ud/oQsp8FON3I7X/r+u+K6nFvPl2hch3Z fsHg== MIME-Version: 1.0 Received: by 10.42.141.131 with SMTP id o3mr20243779icu.1.1335946160989; Wed, 02 May 2012 01:09:20 -0700 (PDT) Received: by 10.43.124.200 with HTTP; Wed, 2 May 2012 01:09:20 -0700 (PDT) In-Reply-To: References: <4FA082D8.10500@dot-com-it.com> Date: Wed, 2 May 2012 11:09:20 +0300 Message-ID: Subject: Re: [MENTORS] Handling Adobe Binaries From: Left Right To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=90e6ba6e833c5d647004bf09346e --90e6ba6e833c5d647004bf09346e Content-Type: text/plain; charset=ISO-8859-1 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 --90e6ba6e833c5d647004bf09346e--