Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E6CD42009F7 for ; Sat, 7 May 2016 18:34:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E57D4160A01; Sat, 7 May 2016 16:34:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3BAEA1609F6 for ; Sat, 7 May 2016 18:34:13 +0200 (CEST) Received: (qmail 64725 invoked by uid 500); 7 May 2016 16:34:07 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 64713 invoked by uid 99); 7 May 2016 16:34:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 May 2016 16:34:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A29591A0597 for ; Sat, 7 May 2016 16:34:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.997 X-Spam-Level: * X-Spam-Status: No, score=1.997 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cwareitservice.onmicrosoft.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id RGPzeuT2_iOY for ; Sat, 7 May 2016 16:34:05 +0000 (UTC) Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3on0133.outbound.protection.outlook.com [157.55.234.133]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 6B39C5F4EE for ; Sat, 7 May 2016 16:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CWareITService.onmicrosoft.com; s=selector1-cware-de0c; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Vu6onMQulIyGk+JcUH/joLvT+2NUgx46DonxhmFhSfw=; b=QRrlrTkxRKG5qR9V9LuzftH2DElL+vBv0wHidEPOeFXHqIjRLYTOeNum7tY+1V7u8xN4Gsd4aFhfBFs6K/pb9HFoRDzPOsM2BSNltYZ4Y4P+cySJQlH53UcQxqOytaPY8YIbrGF1McFlMxNSeC82oarBiCC/hvtRFtaqYe1/OnI= Received: from DB5PR05MB1285.eurprd05.prod.outlook.com (10.162.157.147) by DB5PR05MB1285.eurprd05.prod.outlook.com (10.162.157.147) with Microsoft SMTP Server (TLS) id 15.1.492.11; Sat, 7 May 2016 16:33:56 +0000 Received: from DB5PR05MB1285.eurprd05.prod.outlook.com ([10.162.157.147]) by DB5PR05MB1285.eurprd05.prod.outlook.com ([10.162.157.147]) with mapi id 15.01.0492.011; Sat, 7 May 2016 16:33:56 +0000 From: Christofer Dutz To: "'dev@flex.apache.org'" Subject: [FLEXJS] Probably found the reason for some of my problems ... Thread-Topic: [FLEXJS] Probably found the reason for some of my problems ... Thread-Index: AQHRqH4kUcP6NhYs20a+b5c+odHDxg== Date: Sat, 7 May 2016 16:33:56 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: flex.apache.org; dkim=none (message not signed) header.d=none;flex.apache.org; dmarc=none action=none header.from=c-ware.de; x-originating-ip: [88.128.81.132] x-ms-office365-filtering-correlation-id: 2382e63d-1b8f-47c0-e4d6-08d37695627e x-microsoft-exchange-diagnostics: 1;DB5PR05MB1285;5:ZyjWRbxFlCc89E8YnlYocsVwRsZbh9j6d+03cXipH5+ZOACuj6ApJ+kXRIijS8P7yJE+X5NZvqA87vkP/VIK3eC8wUPm7IFNR97MCIQQD9Zn//M1mNL+SV5vMY+LTAo5Va+IW5YzkOFPU0D2NH5yCg==;24:OtWP38s8p8xgjYZ5umhxQJ74hggoRXcgUjG4gmTgQ+4/TLUfeeoyebjF8KDtpHuOACLZjffkIszYrZTdLu658nLc8NXeDdu5lyXVNDt1wFs=;7:8wiYuQIw/zB0n7snitMgyYCgdQm6iXRQRGtb9PtB0pUVwNcbdkV1hujL0GmRmVC3k1shXstCUzrGraiNb9ecU01LTgGSfQN06iK89d7WtCDPyojgnHTdN+OTW3S3KS0FO3/sovjzSk9FWI0kNTQO0x602z5TXkYoUXg+b7+j/+79pAxHHDjCv4MvVX1wgwN6 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1285; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041072)(6043046);SRVR:DB5PR05MB1285;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1285; x-forefront-prvs: 09352FD734 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(66066001)(77096005)(2900100001)(86362001)(106116001)(16236675004)(75402003)(3280700002)(5003600100002)(5008740100001)(189998001)(92566002)(74482002)(9686002)(107886002)(76576001)(586003)(1220700001)(229853001)(110136002)(102836003)(3846002)(6116002)(33656002)(19625215002)(87936001)(2906002)(54356999)(50986999)(81166005)(8936002)(11100500001)(122556002)(5002640100001)(19627405001)(5004730100002)(10400500002)(3660700001)(450100001)(74316001)(491001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR05MB1285;H:DB5PR05MB1285.eurprd05.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_DB5PR05MB12859DC5F92F3DB5AF7729D7A27E0DB5PR05MB1285eurp_" MIME-Version: 1.0 X-OriginatorOrg: c-ware.de X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2016 16:33:56.2653 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9d387546-1437-4b89-846c-691d64a7e74d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1285 archived-at: Sat, 07 May 2016 16:34:14 -0000 --_000_DB5PR05MB12859DC5F92F3DB5AF7729D7A27E0DB5PR05MB1285eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ok ... in a final struggle to at least have something to show at my talk at= ApacheCon I dug really deep into the compiler and noticed one thing: There's a class called: JSSharedData, which contains a set of public static= variables for containing the state of a compilation (I guess). The problem= is that the values inside are set by the constructors of the compilers ...= well actually just MXMLJSC but as COMPJSC extends from that also from that= . In the FlexJSToolGroup I create an instance of any tool the group has. Fi= rst one of COMPJSC and then MXMLJSC. So when creating the MXMLJSC instance = all the static global variables correctly initialized by COMPJSC are overwr= itten by those of MXMLJSC. The reason I didn't notice this, was that in my = last attempt I only used MXMLJSC in my examples from Flexmojos. This "one state that's shared between compiler instances" is really bad as = the VM isn't destroyed during the build, this means that eventually setting= s from one module could leak to another module. I guess it would be absolut= ely impossible to track down problems like this. "public static"-Variables = for maintaining the State of an instance of anything is super-duper-ultra-b= ad ... we have to change this. Chris --_000_DB5PR05MB12859DC5F92F3DB5AF7729D7A27E0DB5PR05MB1285eurp_--