diff --git a/.gitmodules b/.gitmodules
index 6c14965acb..5d1959ba87 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,3 +10,6 @@
[submodule "external/emscripten"]
path = external/emscripten
url = https://github.com/kripken/emscripten.git
+[submodule "tools/cocos2d-console"]
+ path = tools/cocos2d-console
+ url = https://github.com/cocos2d/cocos2d-console.git
diff --git a/tools/cocos2d-console b/tools/cocos2d-console
new file mode 160000
index 0000000000..a44729e6b2
--- /dev/null
+++ b/tools/cocos2d-console
@@ -0,0 +1 @@
+Subproject commit a44729e6b2ed7d9be5fb3847e624bbe82d4384aa
diff --git a/tools/jsbcc/README b/tools/jsbcc/README
deleted file mode 100644
index 00983c8209..0000000000
--- a/tools/jsbcc/README
+++ /dev/null
@@ -1,11 +0,0 @@
-jsbcc stands for JavasSript Byte Code Compiler.
-It compiles javascript files to SpiderMonkey byte code files. It supports Mac and win32 now.
-Usage:
- jsbcc input_js_file [byte_code_file]
-Note: it also supports pipeline on Mac, so you can use it like this:
- ls *.js | jsbcc
-
-Furthermore, 2 scripts supplied to help: "jsbcc.sh" on Mac and "jsbcc.bat" on win32
- jsbcc.sh/jsbcc.bat js_root_dir
-js_root_dir is the root directory of js source files. The scripts search and compile js source files recrusively.
-
\ No newline at end of file
diff --git a/tools/jsbcc/jsbcc-vc2010.vcxproj b/tools/jsbcc/jsbcc-vc2010.vcxproj
deleted file mode 100644
index c1447336ec..0000000000
--- a/tools/jsbcc/jsbcc-vc2010.vcxproj
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
-
- {BD6738AE-6468-4881-B32B-5749DCF95511}
- Win32Proj
- jsbcc
- jsbcc
-
-
-
- Application
- true
- Unicode
-
-
- Application
- false
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
-
-
-
-
-
- Level3
- Disabled
- WIN32;_DEBUG;_CONSOLE;XP_WIN;%(PreprocessorDefinitions)
- ..\..\scripting\javascript\spidermonkey-win32\include;%(AdditionalIncludeDirectories)
-
-
- Console
- true
- ..\..\scripting\javascript\spidermonkey-win32\lib;%(AdditionalLibraryDirectories)
- Ws2_32.lib;mozjs.lib
-
-
- copy "$(ProjectDir)..\..\scripting\javascript\spidermonkey-win32\lib\mozjs.dll" "$(TargetDir)"
-copy "$(ProjectDir)src\jsbcc.bat" "$(TargetDir)"
-
-
-
-
- Level3
-
-
- MaxSpeed
- true
- true
- WIN32;NDEBUG;_CONSOLE;XP_WIN;%(PreprocessorDefinitions)
- ..\..\scripting\javascript\spidermonkey-win32\include;%(AdditionalIncludeDirectories)
-
-
- Console
- true
- true
- true
- ..\..\scripting\javascript\spidermonkey-win32\lib;%(AdditionalLibraryDirectories)
- Ws2_32.lib;mozjs.lib
-
-
- copy "$(ProjectDir)..\..\scripting\javascript\spidermonkey-win32\lib\mozjs.dll" "$(TargetDir)"
-copy "$(ProjectDir)src\jsbcc.bat" "$(TargetDir)"
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tools/jsbcc/jsbcc-vc2010.vcxproj.filters b/tools/jsbcc/jsbcc-vc2010.vcxproj.filters
deleted file mode 100644
index 9f88da1bc4..0000000000
--- a/tools/jsbcc/jsbcc-vc2010.vcxproj.filters
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hpp;hxx;hm;inl;inc;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Source Files
-
-
-
\ No newline at end of file
diff --git a/tools/jsbcc/jsbcc.xcodeproj/project.pbxproj b/tools/jsbcc/jsbcc.xcodeproj/project.pbxproj
deleted file mode 100644
index ba9449fda3..0000000000
--- a/tools/jsbcc/jsbcc.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,396 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 6579750B172D6EBE000DDA7A /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6579750A172D6EBE000DDA7A /* main.cpp */; };
- 65797553172D7244000DDA7A /* libjs_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 65797552172D722A000DDA7A /* libjs_static.a */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 65797507172D6EBE000DDA7A /* jsbcc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jsbcc; sourceTree = BUILT_PRODUCTS_DIR; };
- 6579750A172D6EBE000DDA7A /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
- 65797516172D722A000DDA7A /* BitArray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BitArray.h; sourceTree = ""; };
- 65797518172D722A000DDA7A /* Root.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Root.h; sourceTree = ""; };
- 6579751A172D722A000DDA7A /* HashTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HashTable.h; sourceTree = ""; };
- 6579751B172D722A000DDA7A /* HeapAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HeapAPI.h; sourceTree = ""; };
- 6579751C172D722A000DDA7A /* LegacyIntTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LegacyIntTypes.h; sourceTree = ""; };
- 6579751D172D722A000DDA7A /* MemoryMetrics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MemoryMetrics.h; sourceTree = ""; };
- 6579751E172D722A000DDA7A /* TemplateLib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TemplateLib.h; sourceTree = ""; };
- 6579751F172D722A000DDA7A /* Utility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Utility.h; sourceTree = ""; };
- 65797520172D722A000DDA7A /* Vector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = ""; };
- 65797521172D722A000DDA7A /* js-config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "js-config.h"; sourceTree = ""; };
- 65797522172D722A000DDA7A /* js.msg */ = {isa = PBXFileReference; lastKnownFileType = text; path = js.msg; sourceTree = ""; };
- 65797523172D722A000DDA7A /* jsalloc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsalloc.h; sourceTree = ""; };
- 65797524172D722A000DDA7A /* jsapi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsapi.h; sourceTree = ""; };
- 65797525172D722A000DDA7A /* jsclass.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsclass.h; sourceTree = ""; };
- 65797526172D722A000DDA7A /* jsclist.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsclist.h; sourceTree = ""; };
- 65797527172D722A000DDA7A /* jscpucfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jscpucfg.h; sourceTree = ""; };
- 65797528172D722A000DDA7A /* jsdbgapi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsdbgapi.h; sourceTree = ""; };
- 65797529172D722A000DDA7A /* jsdhash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsdhash.h; sourceTree = ""; };
- 6579752A172D722A000DDA7A /* jsfriendapi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsfriendapi.h; sourceTree = ""; };
- 6579752B172D722A000DDA7A /* jslock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jslock.h; sourceTree = ""; };
- 6579752C172D722A000DDA7A /* json.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = json.h; sourceTree = ""; };
- 6579752D172D722A000DDA7A /* jsperf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsperf.h; sourceTree = ""; };
- 6579752E172D722A000DDA7A /* jsprf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsprf.h; sourceTree = ""; };
- 6579752F172D722A000DDA7A /* jsprototypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsprototypes.h; sourceTree = ""; };
- 65797530172D722A000DDA7A /* jsproxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsproxy.h; sourceTree = ""; };
- 65797531172D722A000DDA7A /* jsprvtd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsprvtd.h; sourceTree = ""; };
- 65797532172D722A000DDA7A /* jspubtd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jspubtd.h; sourceTree = ""; };
- 65797533172D722A000DDA7A /* jstypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jstypes.h; sourceTree = ""; };
- 65797534172D722A000DDA7A /* jsutil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsutil.h; sourceTree = ""; };
- 65797535172D722A000DDA7A /* jsval.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsval.h; sourceTree = ""; };
- 65797536172D722A000DDA7A /* jsversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jsversion.h; sourceTree = ""; };
- 65797537172D722A000DDA7A /* jswrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = jswrapper.h; sourceTree = ""; };
- 65797539172D722A000DDA7A /* Assertions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Assertions.h; sourceTree = ""; };
- 6579753A172D722A000DDA7A /* Attributes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Attributes.h; sourceTree = ""; };
- 6579753B172D722A000DDA7A /* BloomFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BloomFilter.h; sourceTree = ""; };
- 6579753C172D722A000DDA7A /* CheckedInt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CheckedInt.h; sourceTree = ""; };
- 6579753D172D722A000DDA7A /* Constants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; };
- 6579753E172D722A000DDA7A /* EnumSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnumSet.h; sourceTree = ""; };
- 6579753F172D722A000DDA7A /* FloatingPoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FloatingPoint.h; sourceTree = ""; };
- 65797540172D722A000DDA7A /* GuardObjects.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GuardObjects.h; sourceTree = ""; };
- 65797541172D722A000DDA7A /* HashFunctions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HashFunctions.h; sourceTree = ""; };
- 65797542172D722A000DDA7A /* Likely.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Likely.h; sourceTree = ""; };
- 65797543172D722A000DDA7A /* LinkedList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LinkedList.h; sourceTree = ""; };
- 65797544172D722A000DDA7A /* MathAlgorithms.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MathAlgorithms.h; sourceTree = ""; };
- 65797545172D722A000DDA7A /* MSStdInt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSStdInt.h; sourceTree = ""; };
- 65797546172D722A000DDA7A /* NullPtr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NullPtr.h; sourceTree = ""; };
- 65797547172D722A000DDA7A /* RangedPtr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RangedPtr.h; sourceTree = ""; };
- 65797548172D722A000DDA7A /* RefPtr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RefPtr.h; sourceTree = ""; };
- 65797549172D722A000DDA7A /* Scoped.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Scoped.h; sourceTree = ""; };
- 6579754A172D722A000DDA7A /* SHA1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SHA1.h; sourceTree = ""; };
- 6579754B172D722A000DDA7A /* StandardInteger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StandardInteger.h; sourceTree = ""; };
- 6579754C172D722A000DDA7A /* ThreadLocal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ThreadLocal.h; sourceTree = ""; };
- 6579754D172D722A000DDA7A /* Types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Types.h; sourceTree = ""; };
- 6579754E172D722A000DDA7A /* TypeTraits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeTraits.h; sourceTree = ""; };
- 6579754F172D722A000DDA7A /* Util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Util.h; sourceTree = ""; };
- 65797550172D722A000DDA7A /* WeakPtr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeakPtr.h; sourceTree = ""; };
- 65797552172D722A000DDA7A /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libjs_static.a; sourceTree = ""; };
- 65AE5C7B172E654500157241 /* jsbcc.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = jsbcc.sh; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 65797504172D6EBE000DDA7A /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 65797553172D7244000DDA7A /* libjs_static.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 657974FE172D6EBD000DDA7A = {
- isa = PBXGroup;
- children = (
- 65797513172D722A000DDA7A /* spidermonkey-ios */,
- 65797509172D6EBE000DDA7A /* src */,
- 65797508172D6EBE000DDA7A /* Products */,
- );
- sourceTree = "";
- };
- 65797508172D6EBE000DDA7A /* Products */ = {
- isa = PBXGroup;
- children = (
- 65797507172D6EBE000DDA7A /* jsbcc */,
- );
- name = Products;
- sourceTree = "";
- };
- 65797509172D6EBE000DDA7A /* src */ = {
- isa = PBXGroup;
- children = (
- 65AE5C7B172E654500157241 /* jsbcc.sh */,
- 6579750A172D6EBE000DDA7A /* main.cpp */,
- );
- path = src;
- sourceTree = "";
- };
- 65797513172D722A000DDA7A /* spidermonkey-ios */ = {
- isa = PBXGroup;
- children = (
- 65797514172D722A000DDA7A /* include */,
- 65797551172D722A000DDA7A /* lib */,
- );
- name = "spidermonkey-ios";
- path = "../../scripting/javascript/spidermonkey-ios";
- sourceTree = "";
- };
- 65797514172D722A000DDA7A /* include */ = {
- isa = PBXGroup;
- children = (
- 65797515172D722A000DDA7A /* ds */,
- 65797517172D722A000DDA7A /* gc */,
- 65797519172D722A000DDA7A /* js */,
- 65797521172D722A000DDA7A /* js-config.h */,
- 65797522172D722A000DDA7A /* js.msg */,
- 65797523172D722A000DDA7A /* jsalloc.h */,
- 65797524172D722A000DDA7A /* jsapi.h */,
- 65797525172D722A000DDA7A /* jsclass.h */,
- 65797526172D722A000DDA7A /* jsclist.h */,
- 65797527172D722A000DDA7A /* jscpucfg.h */,
- 65797528172D722A000DDA7A /* jsdbgapi.h */,
- 65797529172D722A000DDA7A /* jsdhash.h */,
- 6579752A172D722A000DDA7A /* jsfriendapi.h */,
- 6579752B172D722A000DDA7A /* jslock.h */,
- 6579752C172D722A000DDA7A /* json.h */,
- 6579752D172D722A000DDA7A /* jsperf.h */,
- 6579752E172D722A000DDA7A /* jsprf.h */,
- 6579752F172D722A000DDA7A /* jsprototypes.h */,
- 65797530172D722A000DDA7A /* jsproxy.h */,
- 65797531172D722A000DDA7A /* jsprvtd.h */,
- 65797532172D722A000DDA7A /* jspubtd.h */,
- 65797533172D722A000DDA7A /* jstypes.h */,
- 65797534172D722A000DDA7A /* jsutil.h */,
- 65797535172D722A000DDA7A /* jsval.h */,
- 65797536172D722A000DDA7A /* jsversion.h */,
- 65797537172D722A000DDA7A /* jswrapper.h */,
- 65797538172D722A000DDA7A /* mozilla */,
- );
- path = include;
- sourceTree = "";
- };
- 65797515172D722A000DDA7A /* ds */ = {
- isa = PBXGroup;
- children = (
- 65797516172D722A000DDA7A /* BitArray.h */,
- );
- path = ds;
- sourceTree = "";
- };
- 65797517172D722A000DDA7A /* gc */ = {
- isa = PBXGroup;
- children = (
- 65797518172D722A000DDA7A /* Root.h */,
- );
- path = gc;
- sourceTree = "";
- };
- 65797519172D722A000DDA7A /* js */ = {
- isa = PBXGroup;
- children = (
- 6579751A172D722A000DDA7A /* HashTable.h */,
- 6579751B172D722A000DDA7A /* HeapAPI.h */,
- 6579751C172D722A000DDA7A /* LegacyIntTypes.h */,
- 6579751D172D722A000DDA7A /* MemoryMetrics.h */,
- 6579751E172D722A000DDA7A /* TemplateLib.h */,
- 6579751F172D722A000DDA7A /* Utility.h */,
- 65797520172D722A000DDA7A /* Vector.h */,
- );
- path = js;
- sourceTree = "";
- };
- 65797538172D722A000DDA7A /* mozilla */ = {
- isa = PBXGroup;
- children = (
- 65797539172D722A000DDA7A /* Assertions.h */,
- 6579753A172D722A000DDA7A /* Attributes.h */,
- 6579753B172D722A000DDA7A /* BloomFilter.h */,
- 6579753C172D722A000DDA7A /* CheckedInt.h */,
- 6579753D172D722A000DDA7A /* Constants.h */,
- 6579753E172D722A000DDA7A /* EnumSet.h */,
- 6579753F172D722A000DDA7A /* FloatingPoint.h */,
- 65797540172D722A000DDA7A /* GuardObjects.h */,
- 65797541172D722A000DDA7A /* HashFunctions.h */,
- 65797542172D722A000DDA7A /* Likely.h */,
- 65797543172D722A000DDA7A /* LinkedList.h */,
- 65797544172D722A000DDA7A /* MathAlgorithms.h */,
- 65797545172D722A000DDA7A /* MSStdInt.h */,
- 65797546172D722A000DDA7A /* NullPtr.h */,
- 65797547172D722A000DDA7A /* RangedPtr.h */,
- 65797548172D722A000DDA7A /* RefPtr.h */,
- 65797549172D722A000DDA7A /* Scoped.h */,
- 6579754A172D722A000DDA7A /* SHA1.h */,
- 6579754B172D722A000DDA7A /* StandardInteger.h */,
- 6579754C172D722A000DDA7A /* ThreadLocal.h */,
- 6579754D172D722A000DDA7A /* Types.h */,
- 6579754E172D722A000DDA7A /* TypeTraits.h */,
- 6579754F172D722A000DDA7A /* Util.h */,
- 65797550172D722A000DDA7A /* WeakPtr.h */,
- );
- path = mozilla;
- sourceTree = "";
- };
- 65797551172D722A000DDA7A /* lib */ = {
- isa = PBXGroup;
- children = (
- 65797552172D722A000DDA7A /* libjs_static.a */,
- );
- path = lib;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 65797506172D6EBE000DDA7A /* jsbcc */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 65797510172D6EBE000DDA7A /* Build configuration list for PBXNativeTarget "jsbcc" */;
- buildPhases = (
- 65797503172D6EBE000DDA7A /* Sources */,
- 65797504172D6EBE000DDA7A /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = jsbcc;
- productName = jsbcc;
- productReference = 65797507172D6EBE000DDA7A /* jsbcc */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 657974FF172D6EBD000DDA7A /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0460;
- ORGANIZATIONNAME = sunzhuoshi;
- };
- buildConfigurationList = 65797502172D6EBD000DDA7A /* Build configuration list for PBXProject "jsbcc" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 657974FE172D6EBD000DDA7A;
- productRefGroup = 65797508172D6EBE000DDA7A /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 65797506172D6EBE000DDA7A /* jsbcc */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 65797503172D6EBE000DDA7A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 6579750B172D6EBE000DDA7A /* main.cpp in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 6579750E172D6EBE000DDA7A /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.7;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 6579750F172D6EBE000DDA7A /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.7;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 65797511172D6EBE000DDA7A /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- HEADER_SEARCH_PATHS = "";
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/../../scripting/javascript/spidermonkey-ios/lib\"",
- );
- OTHER_LDFLAGS = "-lz";
- PRODUCT_NAME = "$(TARGET_NAME)";
- USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../scripting/javascript/spidermonkey-ios/include\"";
- };
- name = Debug;
- };
- 65797512172D6EBE000DDA7A /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- HEADER_SEARCH_PATHS = "";
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/../../scripting/javascript/spidermonkey-ios/lib\"",
- );
- OTHER_LDFLAGS = "-lz";
- PRODUCT_NAME = "$(TARGET_NAME)";
- USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../scripting/javascript/spidermonkey-ios/include\"";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 65797502172D6EBD000DDA7A /* Build configuration list for PBXProject "jsbcc" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 6579750E172D6EBE000DDA7A /* Debug */,
- 6579750F172D6EBE000DDA7A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 65797510172D6EBE000DDA7A /* Build configuration list for PBXNativeTarget "jsbcc" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 65797511172D6EBE000DDA7A /* Debug */,
- 65797512172D6EBE000DDA7A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 657974FF172D6EBD000DDA7A /* Project object */;
-}
diff --git a/tools/jsbcc/src/jsbcc.bat b/tools/jsbcc/src/jsbcc.bat
deleted file mode 100644
index b9c09ac3d4..0000000000
--- a/tools/jsbcc/src/jsbcc.bat
+++ /dev/null
@@ -1 +0,0 @@
-for /f %%f in ('dir %1\*.js /s/b') do jsbcc.exe %%f
\ No newline at end of file
diff --git a/tools/jsbcc/src/jsbcc.sh b/tools/jsbcc/src/jsbcc.sh
deleted file mode 100755
index 2e07c01459..0000000000
--- a/tools/jsbcc/src/jsbcc.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#/bin/bash
-USAGE="Usage: $0 dir"
-sh_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-old_pwd=$PWD
-if [ $# -lt 1 ]
-then
- echo $USAGE
- exit 1
-fi
-if [ ! -d $1 ]
-then
- echo "Invalid directory: $1"
- exit 1
-fi
-script_dir=$1
-ok_count=0
-error_count=0
-# check shell directory first
-cmd="$sh_dir/jsbcc"
-if [ ! -f $cmd ]
-then
-# not found in shell directory, check global
- type "jsbcc"
- if [ 0 -eq $? ]
- then
- cmd="jsbcc"
- else
- echo "jsbcc execuable NOT found"
- exit 1
- fi
-fi
-cd $script_dir
-for file in *.js
-do
- [ -f "$file" ] || continue
- $cmd $file
- ret=$?
- if [ "$ret" == 0 ]
- then
- ok_count=`expr $ok_count + 1`
- else
- error_count=`expr $error_count + 1`
- fi
-done
-cd $old_pwd
-echo "$ok_count file(s) compiled, $error_count file(s) failed"
diff --git a/tools/jsbcc/src/main.cpp b/tools/jsbcc/src/main.cpp
deleted file mode 100644
index 8dafb95b91..0000000000
--- a/tools/jsbcc/src/main.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-//
-// main.cpp
-// jsbcc
-//
-// Created by sun zhuoshi on 4/28/13.
-// Copyright (c) 2013 sunzhuoshi. All rights reserved.
-//
-
-#include
-#include
-
-#include
-
-#ifdef WIN32
-#include
-#define STDIN_FILENO 0
-#else
-#include
-#include
-#endif
-
-#include "jsapi.h"
-
-#ifdef WIN32
-const char *USAGE = "Usage: jsbcc input_js_file [byte_code_file]";
-#else
-const char *USAGE = "Usage: jsbcc input_js_file [byte_code_file]\n"\
- " Or\n"\
- " ls *.js | jsbcc -p";
-#endif
-const char *BYTE_CODE_FILE_EXT = ".jsc";
-
-enum ErrorCode {
- EC_OK = 0,
- EC_ERROR = 1
-};
-
-void Finalize(JSFreeOp *freeOp, JSObject *obj) {
-}
-
-void ReportError(JSContext *cx, const char *message, JSErrorReport *report) {
- std::cerr << "Error! " << message << std::endl;
-}
-
-JSClass GlobalClass = {
- "global", JSCLASS_GLOBAL_FLAGS,
- JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
- JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Finalize,
- JSCLASS_NO_OPTIONAL_MEMBERS
-};
-
-bool WriteFile(const std::string &filePath, void *data, uint32_t length) {
- FILE *file = fopen(filePath.c_str(), "wb");
- if (file) {
- size_t ret = fwrite(data, 1, length, file);
- fclose(file);
- if (ret == length) {
- return true;
- }
- }
- return false;
-}
-
-std::string RemoveFileExt(const std::string &filePath) {
- size_t pos = filePath.rfind('.');
- if (0 < pos) {
- return filePath.substr(0, pos);
- }
- else {
- return filePath;
- }
-}
-
-bool CompileFile(const std::string &inputFilePath, const std::string &outputFilePath) {
- bool result = false;
- std::string ofp;
- if (!outputFilePath.empty()) {
- ofp = outputFilePath;
- }
- else {
- ofp = RemoveFileExt(inputFilePath) + BYTE_CODE_FILE_EXT;
- }
- std::cout << "Input file: " << inputFilePath << std::endl;
- JSRuntime * runtime = JS_NewRuntime(10 * 1024 * 1024, JS_NO_HELPER_THREADS);
- JSContext *context = JS_NewContext(runtime, 10240);
- JS_SetOptions(context, JSOPTION_TYPE_INFERENCE);
- JS_SetVersion(context, JSVERSION_LATEST);
- JS_SetOptions(context, JS_GetOptions(context) & ~JSOPTION_METHODJIT);
- JS_SetOptions(context, JS_GetOptions(context) & ~JSOPTION_METHODJIT_ALWAYS);
- JSObject* global = JS_NewGlobalObject(context, &GlobalClass, NULL);
- JS_SetErrorReporter(context, &ReportError);
- if (JS_InitStandardClasses(context, global)) {
-
- JS::CompileOptions options(context);
- options.setUTF8(true);
- options.setSourcePolicy(JS::CompileOptions::NO_SOURCE);
- js::RootedObject rootedObject(context, global);
- std::cout << "Compiling ..." << std::endl;
- JSScript *script = JS::Compile(context, rootedObject, options, inputFilePath.c_str());
- if (script) {
- void *data = NULL;
- uint32_t length = 0;
- std::cout << "Encoding ..." << std::endl;
- data = JS_EncodeScript(context, script, &length);
- if (data) {
- if (WriteFile(ofp, data, length)) {
- std::cout << "Done! " << "Output file: " << ofp << std::endl;
- result = true;
- }
- }
- }
-
- }
- if (context) {
- JS_DestroyContext(context);
- context = NULL;
- }
- if (runtime) {
- JS_DestroyRuntime(runtime);
- runtime = NULL;
- }
- return result;
-}
-
-int main(int argc, const char * argv[])
-{
- std::string inputFilePath, outputFilePath;
- if (1 == argc) {
- std::cerr << USAGE << std::endl;
- return EC_ERROR;
- }
- else {
- if (1 < argc) {
- if (std::string(argv[1]) == "-p") { // pipe mode
- fd_set fds;
- FD_ZERO (&fds);
- FD_SET (STDIN_FILENO, &fds);
- int result = select (STDIN_FILENO + 1, &fds, NULL, NULL, NULL); // infinite wait
- if (result) { // STDIN ready to read
- std::string line;
- while (std::getline(std::cin, line)) {
- if (!line.empty()) {
- CompileFile(line, "");
- }
- }
- return EC_OK;
- }
- else {
- std::cerr << "Failed to read from pipe" << std::endl;
- return EC_ERROR;
- }
- }
- else {
- inputFilePath = argv[1];
- }
- }
- if (2 < argc) {
- outputFilePath = argv[2];
- }
- if (CompileFile(inputFilePath, outputFilePath)) {
- return EC_OK;
- }
- return EC_ERROR;
- }
-}