You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2016/04/22 19:25:06 UTC
[19/35] git commit: [flex-falcon]
[refs/heads/feature/maven-migration-test] - js externs
js externs
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/c4dfaba4
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/c4dfaba4
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/c4dfaba4
Branch: refs/heads/feature/maven-migration-test
Commit: c4dfaba48ac0c39db515fdbc35e955b1bcf8395a
Parents: 03f1da0
Author: Alex Harui <ah...@apache.org>
Authored: Thu Apr 21 19:23:05 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Apr 22 09:02:58 2016 -0700
----------------------------------------------------------------------
externs/js/build.xml | 80 +++++++++
externs/js/compile-config.xml | 93 ----------
externs/js/js-compile-config.xml | 173 -------------------
.../js/src/main/flex/__AS3__/vec/Vector$uint.as | 30 ++--
4 files changed, 95 insertions(+), 281 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4dfaba4/externs/js/build.xml
----------------------------------------------------------------------
diff --git a/externs/js/build.xml b/externs/js/build.xml
new file mode 100644
index 0000000..e565a02
--- /dev/null
+++ b/externs/js/build.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" ?>
+
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<project name="js" default="main" basedir=".">
+
+ <target name="main" depends="preprocess, externc, postprocess, compc" />
+
+ <target name="preprocess" >
+ <!-- preprocessing .js files -->
+ <replaceregexp file="${basedir}/target/downloads/svg.js" match="@type \{function\(new:.*" replace="" flags="g" />
+ <replaceregexp file="${basedir}/target/downloads/svg.js" match="Window\.prototype\..*" replace="" flags="g" />
+ <replace file="${basedir}/target/downloads/svg.js" token="EventListener|(function(Event)" value="EventListener|(function(!Event)" />
+ <replaceregexp file="${basedir}/target/downloads/es3.js" match="(The constructor of the current object(?:(?!\*/).)*?)@type \{Function\}((?:(?!\*/).)*?\*/[\r\n]+Object\.prototype\.constructor)([^;]*?);" replace="\1@type {Class}\2;" flags="s" />
+ <replaceregexp file="${basedir}/target/downloads/es3.js" match="(Transposes the elements of an array in place(?:(?!\*/).)*?[\r\n]+ \*)([\r\n]+)( \* @this)" replace="\1\2 * @return {!Array<?>}\2\3" flags="s" />
+ <replaceregexp file="${basedir}/target/downloads/es3.js" match="(Sorts the elements of an array in place(?:(?!\*/).)*?[\r\n]+ \*)([\r\n]+)( \* @param)" replace="\1\2 * @return {!Array<?>}\2\3" flags="s" />
+ </target>
+
+ <target name="externc" >
+ <java jar="${basedir}/../../compiler-jx/lib/externc.jar" fork="true"
+ failonerror="false">
+ <arg value="+flexlib=externs" />
+ <arg value="-debug" />
+ <arg value="-load-config=${basedir}/src/main/config/externc-config.xml" />
+ </java>
+ </target>
+
+ <target name="postprocess" >
+ <replace file="${basedir}/target/generated-sources/externc/functions/parseInt.as" >
+ <replacefilter token="base:Number)" value="base:Number = 10)" />
+ </replace>
+ </target>
+
+ <target name="compc" >
+ <copy file="${basedir}/src/main/config/compile-as-config.xml"
+ todir="${basedir}/target" />
+ <java jar="${basedir}/../../compiler/lib/falcon-compc.jar" fork="true"
+ failonerror="true">
+ <arg value="+flexlib=externs/frameworks" />
+ <arg value="-debug" />
+ <arg value="-load-config=${basedir}/target/compile-as-config.xml" />
+ <arg value="-output=${basedir}/target/js.swc" />
+ </java>
+ </target>
+
+ <target name="clean">
+ <delete failonerror="false" includeEmptyDirs="true" >
+ <fileset dir="${basedir}/target">
+ <include name="**/**"/>
+ <exclude name="downloads/**"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="wipe">
+ <delete failonerror="false" includeEmptyDirs="true" >
+ <fileset dir="${basedir}/target">
+ <include name="**/**"/>
+ </fileset>
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4dfaba4/externs/js/compile-config.xml
----------------------------------------------------------------------
diff --git a/externs/js/compile-config.xml b/externs/js/compile-config.xml
deleted file mode 100644
index be1ef01..0000000
--- a/externs/js/compile-config.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>true</accessible>
-
- <!--
- <external-library-path>
- <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
- <path-element>../../libs/framework.swc</path-element>
- <path-element>../../libs/mx/mx.swc</path-element>
- <path-element>../../libs/osmf.swc</path-element>
- <path-element>../../libs/textLayout.swc</path-element>
- </external-library-path>
-
- <keep-as3-metadata>
- <name>SkinPart</name>
- </keep-as3-metadata>
-
- <mxml>
- <minimum-supported-version>4.0.0</minimum-supported-version>
- </mxml>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.adobe.com/flex/spark</uri>
- <manifest>manifest.xml</manifest>
- </namespace>
- </namespaces>
- -->
- <source-path>
- <path-element>out/as/classes</path-element>
- <path-element>out/as/constants</path-element>
- <path-element>out/as/functions</path-element>
- <path-element>out/as/interfaces</path-element>
- <path-element>out/as/typedefs</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-sources>
- <path-element>out/as/classes</path-element>
- <path-element>out/as/constants</path-element>
- <path-element>out/as/functions</path-element>
- <path-element>out/as/interfaces</path-element>
- <path-element>out/as/typedefs</path-element>
- </include-sources>
-
- <include-file>
- <name>externs/svg.js</name>
- <path>externs/svg.js</path>
- </include-file>
- <!--
- <include-file>
- <name>assets/ErrorIndicator.png</name>
- <path>assets/ErrorIndicator.png</path>
- </include-file>
- <include-file>
- <name>assets/RequiredIndicator.png</name>
- <path>assets/RequiredIndicator.png</path>
- </include-file>
-
- <include-namespaces>
- <uri>library://ns.adobe.com/flex/spark</uri>
- </include-namespaces>
-
- <resource-bundle-list>bundles.properties</resource-bundle-list>
-
- <target-player>${playerglobal.version}</target-player>
- -->
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4dfaba4/externs/js/js-compile-config.xml
----------------------------------------------------------------------
diff --git a/externs/js/js-compile-config.xml b/externs/js/js-compile-config.xml
deleted file mode 100644
index 2346f10..0000000
--- a/externs/js/js-compile-config.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License</name></exclude> you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>true</accessible>
-
- <!--
- <external-library-path>
- <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
- <path-element>../../libs/framework.swc</path-element>
- <path-element>../../libs/mx/mx.swc</path-element>
- <path-element>../../libs/osmf.swc</path-element>
- <path-element>../../libs/textLayout.swc</path-element>
- </external-library-path>
-
- <keep-as3-metadata>
- <name>SkinPart</name>
- </keep-as3-metadata>
-
- <mxml>
- <minimum-supported-version>4.0.0</minimum-supported-version>
- </mxml>
- -->
-
- <locale/>
-
- <library-path/>
-
- <!--
- <namespaces>
- <namespace>
- <uri>library://ns.adobe.com/flex/spark</uri>
- <manifest>manifest.xml</manifest>
- </namespace>
- </namespaces>
- -->
-
- <source-path>
- <path-element>src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <external>
- <path-element>missing.js</path-element>
- <path-element>externs/es3.js</path-element>
- <path-element>externs/es5.js</path-element>
- <path-element>externs/es6.js</path-element>
- <path-element>externs/browser/w3c_anim_timing.js</path-element>
- <path-element>externs/browser/w3c_audio.js</path-element>
- <path-element>externs/browser/w3c_batterystatus.js</path-element>
- <path-element>externs/browser/w3c_css.js</path-element>
- <path-element>externs/browser/w3c_css3d.js</path-element>
- <path-element>externs/browser/w3c_device_sensor_event.js</path-element>
- <path-element>externs/browser/w3c_dom1.js</path-element>
- <path-element>externs/browser/w3c_dom2.js</path-element>
- <path-element>externs/browser/w3c_dom3.js</path-element>
- <path-element>externs/browser/w3c_elementtraversal.js</path-element>
- <path-element>externs/browser/w3c_encoding.js</path-element>
- <path-element>externs/browser/w3c_event.js</path-element>
- <path-element>externs/browser/w3c_event3.js</path-element>
- <path-element>externs/browser/w3c_geolocation.js</path-element>
- <path-element>externs/browser/w3c_indexeddb.js</path-element>
- <path-element>externs/browser/w3c_navigation_timing.js</path-element>
- <path-element>externs/browser/w3c_range.js</path-element>
- <path-element>externs/browser/w3c_rtc.js</path-element>
- <path-element>externs/browser/w3c_selectors.js</path-element>
- <!-- path-element>externs/browser/w3c_serviceworker.js</path-element> -->
- <!-- path-element>externs/browser/w3c_webcrypto.js</path-element> -->
- <path-element>externs/browser/w3c_xml.js</path-element>
-
- <!-- path-element>externs/fetchapi</path-element> -->
-
- <path-element>externs/browser/window.js</path-element>
-
- <path-element>externs/browser/ie_dom.js</path-element>
- <path-element>externs/browser/gecko_dom.js</path-element>
- <path-element>externs/browser/gecko_xml.js</path-element>
- <path-element>externs/browser/gecko_event.js</path-element>
-
- <path-element>externs/browser/webkit_css.js</path-element>
- <path-element>externs/browser/webkit_dom.js</path-element>
- <path-element>externs/browser/webkit_event.js</path-element>
- <!-- path-element>externs/webkit_notifications.js</path-element> -->
-
- <path-element>externs/browser/iphone.js</path-element>
- <path-element>externs/browser/chrome.js</path-element>
- <path-element>externs/browser/flash.js</path-element>
-
- <path-element>externs/browser/page_visibility.js</path-element>
- <path-element>externs/browser/fileapi.js</path-element>
- <path-element>externs/browser/html5.js</path-element>
-
- <path-element>externs/browser/webgl.js</path-element>
- <path-element>externs/browser/webstorage.js</path-element>
-
- <path-element>externs/svg.js</path-element>
- </external>
-
- <as-root>out/as</as-root>
-
- <field-exclude>
- <class>Window</class>
- <field>focus</field>
- </field-exclude>
-
- <class-exclude>
- <class>controlRange</class>
- </class-exclude>
-
- <exclude>
- <class>Array</class>
- <name>toSource</name>
- </exclude>
- <exclude>
- <class>Date</class>
- <name>valueOf</name>
- </exclude>
- <exclude>
- <class>String</class>
- <name>valueOf</name>
- </exclude>
- <exclude><class>FontFaceSet</class><name>delete</name></exclude>
-
- <exclude><class>CSSStyleDeclaration</class><name>cssText</name></exclude>
- <exclude><class>CSSStyleRule</class><name>style</name></exclude>
- <exclude><class>CSSFontFaceRule</class><name>style</name></exclude>
- <exclude><class>CSSPageRule</class><name>style</name></exclude>
-
- <exclude><class>Generator</class><name>throw</name></exclude>
- <exclude><class>Generator</class><name>return</name></exclude>
- <exclude><class>HTMLMenuItemElement</class><name>default</name></exclude>
- <exclude><class>MessageEvent</class><name>data</name></exclude><!-- TODO returns T -->
- <exclude><class>MessageEvent</class><name>initMessageEventNS</name></exclude> <!-- TODO param T -->
- <exclude><class>MessageEvent</class><name>initMessageEvent</name></exclude> <!-- TODO param T -->
- <exclude><class>MessageEvent</class><name>default</name></exclude>
- <exclude><class>Object</class><name>is</name></exclude>
- <exclude><class>Promise</class><name>catch</name></exclude>
-
- <exclude><class>IDBCursor</class><name>continue</name></exclude>
- <exclude><class>IDBCursor</class><name>delete</name></exclude>
- <exclude><class>IDBObjectStore</class><name>delete</name></exclude>
-
- <!-- TODO method treated like field -->
- <field-exclude><class>Iterator</class><field>next</field></field-exclude>
- <exclude><class>Generator</class><name>next</name></exclude>
- <exclude><class>LinkStyle</class><name>sheet</name></exclude>
-
- <!-- SVG -->
- <exclude><class>SVGStylable</class><name>className</name></exclude>
- <exclude><class>SVGStylable</class><name>style</name></exclude>
- <exclude><class>SVGLocatable</class><name>farthestViewportElement</name></exclude>
- <exclude><class>SVGLocatable</class><name>nearestViewportElement</name></exclude>
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c4dfaba4/externs/js/src/main/flex/__AS3__/vec/Vector$uint.as
----------------------------------------------------------------------
diff --git a/externs/js/src/main/flex/__AS3__/vec/Vector$uint.as b/externs/js/src/main/flex/__AS3__/vec/Vector$uint.as
index 6540728..9d4761f 100644
--- a/externs/js/src/main/flex/__AS3__/vec/Vector$uint.as
+++ b/externs/js/src/main/flex/__AS3__/vec/Vector$uint.as
@@ -28,49 +28,49 @@ package __AS3__.vec
* @playerversion AIR 1.1
* @productversion Flex 3
*/
-internal class Vector$unit
+internal class Vector$uint
{
- public function Vector$unit(length:uint = 0, fixed:Boolean = false) {}
+ public function Vector$uint(length:uint = 0, fixed:Boolean = false) {}
public var fixed:Boolean;
public var length:uint;
- public function concat(...args):Vector$unit { return null }
+ public function concat(...args):Vector$uint { return null }
public function every(callback:Function, thisObject:Object):Boolean { return false }
- public function filter(callback:Function, thisObject:Object = null):Vector$unit { return null }
+ public function filter(callback:Function, thisObject:Object = null):Vector$uint { return null }
public function forEach(callback:Function, thisObject:Object = null):void {}
- public function indexOf(searchElement:unit, fromIndex:int = 0):int { return -1 }
+ public function indexOf(searchElement:uint, fromIndex:int = 0):int { return -1 }
- public function insertAt(index:int, element:unit):void {}
+ public function insertAt(index:int, element:uint):void {}
public function join(sep:String = ","):String { return null }
- public function lastIndexOf(searchElement:unit, fromIndex:int = 0x7fffffff):int { return -1 }
+ public function lastIndexOf(searchElement:uint, fromIndex:int = 0x7fffffff):int { return -1 }
- public function map(callback:Function, thisObject:Object = null):Vector$unit { return null }
+ public function map(callback:Function, thisObject:Object = null):Vector$uint { return null }
- public function pop():unit { return null }
+ public function pop():uint { return null }
public function push(... args):uint { return 0 }
- public function removeAt(index:int):unit { return null }
+ public function removeAt(index:int):uint { return null }
- public function reverse():Vector$unit { return null }
+ public function reverse():Vector$uint { return null }
- public function shift():unit { return null }
+ public function shift():uint { return null }
- public function slice(startIndex:int = 0, endIndex:int = 16777215):Vector$unit { return null }
+ public function slice(startIndex:int = 0, endIndex:int = 16777215):Vector$uint { return null }
public function some(callback:Function, thisObject:Object = null):Boolean { return false }
- public function sort(sortBehavior:Object):Vector$unit { return null }
+ public function sort(sortBehavior:Object):Vector$uint { return null }
- public function splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector$unit { return null }
+ public function splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector$uint { return null }
override public function toLocaleString():String { return null }