Permalink
Browse files

Initial commit, including Rhino.

  • Loading branch information...
0 parents commit 527c5ce8d5e8042c0a7aa8fa85930a23335edcb4 Nicolas Gramlich committed Jan 20, 2012
Showing with 64,973 additions and 0 deletions.
  1. +8 −0 .classpath
  2. +13 −0 .gitignore
  3. +33 −0 .project
  4. +10 −0 AndroidManifest.xml
  5. +40 −0 proguard.cfg
  6. +13 −0 project.properties
  7. +274 −0 src/org/mozilla/classfile/ByteCode.java
  8. +3,043 −0 src/org/mozilla/classfile/ClassFileWriter.java
  9. +322 −0 src/org/mozilla/javascript/Arguments.java
  10. +564 −0 src/org/mozilla/javascript/BaseFunction.java
  11. +59 −0 src/org/mozilla/javascript/Callable.java
  12. +223 −0 src/org/mozilla/javascript/ClassCache.java
  13. +89 −0 src/org/mozilla/javascript/ClassShutter.java
  14. +233 −0 src/org/mozilla/javascript/CompilerEnvirons.java
  15. +109 −0 src/org/mozilla/javascript/ConstProperties.java
  16. +2,639 −0 src/org/mozilla/javascript/Context.java
  17. +58 −0 src/org/mozilla/javascript/ContextAction.java
  18. +590 −0 src/org/mozilla/javascript/ContextFactory.java
  19. +60 −0 src/org/mozilla/javascript/ContextListener.java
  20. +99 −0 src/org/mozilla/javascript/ContinuationPending.java
  21. +1,271 −0 src/org/mozilla/javascript/DToA.java
  22. +918 −0 src/org/mozilla/javascript/Decompiler.java
  23. +113 −0 src/org/mozilla/javascript/DefaultErrorReporter.java
  24. +89 −0 src/org/mozilla/javascript/DefiningClassLoader.java
  25. +266 −0 src/org/mozilla/javascript/Delegator.java
  26. +161 −0 src/org/mozilla/javascript/EcmaError.java
  27. +106 −0 src/org/mozilla/javascript/ErrorReporter.java
  28. +118 −0 src/org/mozilla/javascript/Evaluator.java
  29. +123 −0 src/org/mozilla/javascript/EvaluatorException.java
  30. +84 −0 src/org/mozilla/javascript/Function.java
  31. +117 −0 src/org/mozilla/javascript/FunctionNode.java
  32. +572 −0 src/org/mozilla/javascript/FunctionObject.java
  33. +66 −0 src/org/mozilla/javascript/GeneratedClassLoader.java
  34. +1,607 −0 src/org/mozilla/javascript/IRFactory.java
  35. +55 −0 src/org/mozilla/javascript/IdFunctionCall.java
  36. +196 −0 src/org/mozilla/javascript/IdFunctionObject.java
  37. +741 −0 src/org/mozilla/javascript/IdScriptableObject.java
  38. +324 −0 src/org/mozilla/javascript/ImporterTopLevel.java
  39. +156 −0 src/org/mozilla/javascript/InterfaceAdapter.java
  40. +235 −0 src/org/mozilla/javascript/InterpretedFunction.java
  41. +4,740 −0 src/org/mozilla/javascript/Interpreter.java
  42. +192 −0 src/org/mozilla/javascript/InterpreterData.java
  43. +1,140 −0 src/org/mozilla/javascript/JavaAdapter.java
  44. +933 −0 src/org/mozilla/javascript/JavaMembers.java
  45. +118 −0 src/org/mozilla/javascript/JavaScriptException.java
  46. +455 −0 src/org/mozilla/javascript/Kit.java
  47. +141 −0 src/org/mozilla/javascript/LazilyLoadedCtor.java
  48. +372 −0 src/org/mozilla/javascript/MemberBox.java
  49. +1,745 −0 src/org/mozilla/javascript/NativeArray.java
  50. +175 −0 src/org/mozilla/javascript/NativeBoolean.java
  51. +158 −0 src/org/mozilla/javascript/NativeCall.java
  52. +139 −0 src/org/mozilla/javascript/NativeContinuation.java
  53. +1,610 −0 src/org/mozilla/javascript/NativeDate.java
  54. +232 −0 src/org/mozilla/javascript/NativeError.java
  55. +172 −0 src/org/mozilla/javascript/NativeFunction.java
  56. +288 −0 src/org/mozilla/javascript/NativeGenerator.java
  57. +795 −0 src/org/mozilla/javascript/NativeGlobal.java
  58. +269 −0 src/org/mozilla/javascript/NativeIterator.java
  59. +180 −0 src/org/mozilla/javascript/NativeJavaArray.java
  60. +329 −0 src/org/mozilla/javascript/NativeJavaClass.java
  61. +88 −0 src/org/mozilla/javascript/NativeJavaConstructor.java
  62. +580 −0 src/org/mozilla/javascript/NativeJavaMethod.java
  63. +1,002 −0 src/org/mozilla/javascript/NativeJavaObject.java
  64. +218 −0 src/org/mozilla/javascript/NativeJavaPackage.java
  65. +186 −0 src/org/mozilla/javascript/NativeJavaTopPackage.java
  66. +403 −0 src/org/mozilla/javascript/NativeMath.java
  67. +250 −0 src/org/mozilla/javascript/NativeNumber.java
  68. +321 −0 src/org/mozilla/javascript/NativeObject.java
  69. +230 −0 src/org/mozilla/javascript/NativeScript.java
  70. +995 −0 src/org/mozilla/javascript/NativeString.java
  71. +207 −0 src/org/mozilla/javascript/NativeWith.java
  72. +1,399 −0 src/org/mozilla/javascript/Node.java
  73. +565 −0 src/org/mozilla/javascript/NodeTransformer.java
  74. +388 −0 src/org/mozilla/javascript/ObjArray.java
  75. +697 −0 src/org/mozilla/javascript/ObjToIntMap.java
  76. +2,507 −0 src/org/mozilla/javascript/Parser.java
  77. +223 −0 src/org/mozilla/javascript/PolicySecurityController.java
  78. +64 −0 src/org/mozilla/javascript/Ref.java
  79. +59 −0 src/org/mozilla/javascript/RefCallable.java
  80. +71 −0 src/org/mozilla/javascript/RegExpProxy.java
  81. +308 −0 src/org/mozilla/javascript/RhinoException.java
  82. +73 −0 src/org/mozilla/javascript/Script.java
  83. +230 −0 src/org/mozilla/javascript/ScriptOrFnNode.java
  84. +3,925 −0 src/org/mozilla/javascript/ScriptRuntime.java
  85. +342 −0 src/org/mozilla/javascript/Scriptable.java
  86. +2,522 −0 src/org/mozilla/javascript/ScriptableObject.java
  87. +196 −0 src/org/mozilla/javascript/SecureCaller.java
  88. +211 −0 src/org/mozilla/javascript/SecurityController.java
  89. +80 −0 src/org/mozilla/javascript/SecurityUtilities.java
  90. +155 −0 src/org/mozilla/javascript/SpecialRef.java
  91. +82 −0 src/org/mozilla/javascript/Synchronizer.java
  92. +434 −0 src/org/mozilla/javascript/Token.java
  93. +1,463 −0 src/org/mozilla/javascript/TokenStream.java
  94. +659 −0 src/org/mozilla/javascript/UintMap.java
  95. +60 −0 src/org/mozilla/javascript/Undefined.java
  96. +121 −0 src/org/mozilla/javascript/UniqueTag.java
  97. +183 −0 src/org/mozilla/javascript/VMBridge.java
  98. +183 −0 src/org/mozilla/javascript/WrapFactory.java
  99. +93 −0 src/org/mozilla/javascript/WrappedException.java
  100. +58 −0 src/org/mozilla/javascript/Wrapper.java
  101. +91 −0 src/org/mozilla/javascript/debug/DebugFrame.java
  102. +61 −0 src/org/mozilla/javascript/debug/DebuggableObject.java
  103. +119 −0 src/org/mozilla/javascript/debug/DebuggableScript.java
  104. +69 −0 src/org/mozilla/javascript/debug/Debugger.java
  105. +165 −0 src/org/mozilla/javascript/jdk13/VMBridge_jdk13.java
  106. +89 −0 src/org/mozilla/javascript/jdk15/VMBridge_jdk15.java
  107. +619 −0 src/org/mozilla/javascript/optimizer/Block.java
  108. +211 −0 src/org/mozilla/javascript/optimizer/ClassCompiler.java
  109. +5,048 −0 src/org/mozilla/javascript/optimizer/Codegen.java
  110. +135 −0 src/org/mozilla/javascript/optimizer/DataFlowBitSet.java
  111. +149 −0 src/org/mozilla/javascript/optimizer/OptFunctionNode.java
  112. +311 −0 src/org/mozilla/javascript/optimizer/OptRuntime.java
  113. +135 −0 src/org/mozilla/javascript/optimizer/OptTransformer.java
  114. +509 −0 src/org/mozilla/javascript/optimizer/Optimizer.java
  115. +2,792 −0 src/org/mozilla/javascript/regexp/NativeRegExp.java
  116. +297 −0 src/org/mozilla/javascript/regexp/NativeRegExpCtor.java
  117. +541 −0 src/org/mozilla/javascript/regexp/RegExpImpl.java
  118. +76 −0 src/org/mozilla/javascript/regexp/SubString.java
  119. +781 −0 src/org/mozilla/javascript/resources/Messages.properties
  120. +329 −0 src/org/mozilla/javascript/resources/Messages_fr.properties
  121. +114 −0 src/org/mozilla/javascript/serialize/ScriptableInputStream.java
  122. +220 −0 src/org/mozilla/javascript/serialize/ScriptableOutputStream.java
  123. +173 −0 src/org/mozilla/javascript/xml/XMLLib.java
  124. +128 −0 src/org/mozilla/javascript/xml/XMLObject.java
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
@@ -0,0 +1,13 @@
+target/**
+bin/**
+doc/**
+gen/**
+.DS_Store
+Thumbs.db
+gdb.setup
+gdbserver
+.svn
+.hg
+local.properties
+.settings
+AndEngineScriptingExtension.iml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>AndEngineScriptingExtension</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.andengine.extension.scripting"
+ android:versionCode="1"
+ android:versionName="1.0">
+
+ <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
+
+ <application android:debuggable="true"/>
+</manifest>
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+ native <methods>;
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+ public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+ public static final android.os.Parcelable$Creator *;
+}
@@ -0,0 +1,13 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-15
+android.library=true
+android.library.reference.1=../AndEngine
@@ -0,0 +1,274 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (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.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-1999
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Roger Lawrence
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * the GNU General Public License Version 2 or later (the "GPL"), in which
+ * case the provisions of the GPL are applicable instead of those above. If
+ * you wish to allow use of your version of this file only under the terms of
+ * the GPL and not to allow others to use your version of this file under the
+ * MPL, indicate your decision by deleting the provisions above and replacing
+ * them with the notice and other provisions required by the GPL. If you do
+ * not delete the provisions above, a recipient may use your version of this
+ * file under either the MPL or the GPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package org.mozilla.classfile;
+
+/**
+ * This class provides opcode values expected by the JVM in Java class files.
+ *
+ * It also provides tables for internal use by the ClassFileWriter.
+ *
+ * @author Roger Lawrence
+ */
+public class ByteCode {
+
+ /**
+ * The byte opcodes defined by the Java Virtual Machine.
+ */
+ public static final int
+ NOP = 0x00,
+ ACONST_NULL = 0x01,
+ ICONST_M1 = 0x02,
+ ICONST_0 = 0x03,
+ ICONST_1 = 0x04,
+ ICONST_2 = 0x05,
+ ICONST_3 = 0x06,
+ ICONST_4 = 0x07,
+ ICONST_5 = 0x08,
+ LCONST_0 = 0x09,
+ LCONST_1 = 0x0A,
+ FCONST_0 = 0x0B,
+ FCONST_1 = 0x0C,
+ FCONST_2 = 0x0D,
+ DCONST_0 = 0x0E,
+ DCONST_1 = 0x0F,
+ BIPUSH = 0x10,
+ SIPUSH = 0x11,
+ LDC = 0x12,
+ LDC_W = 0x13,
+ LDC2_W = 0x14,
+ ILOAD = 0x15,
+ LLOAD = 0x16,
+ FLOAD = 0x17,
+ DLOAD = 0x18,
+ ALOAD = 0x19,
+ ILOAD_0 = 0x1A,
+ ILOAD_1 = 0x1B,
+ ILOAD_2 = 0x1C,
+ ILOAD_3 = 0x1D,
+ LLOAD_0 = 0x1E,
+ LLOAD_1 = 0x1F,
+ LLOAD_2 = 0x20,
+ LLOAD_3 = 0x21,
+ FLOAD_0 = 0x22,
+ FLOAD_1 = 0x23,
+ FLOAD_2 = 0x24,
+ FLOAD_3 = 0x25,
+ DLOAD_0 = 0x26,
+ DLOAD_1 = 0x27,
+ DLOAD_2 = 0x28,
+ DLOAD_3 = 0x29,
+ ALOAD_0 = 0x2A,
+ ALOAD_1 = 0x2B,
+ ALOAD_2 = 0x2C,
+ ALOAD_3 = 0x2D,
+ IALOAD = 0x2E,
+ LALOAD = 0x2F,
+ FALOAD = 0x30,
+ DALOAD = 0x31,
+ AALOAD = 0x32,
+ BALOAD = 0x33,
+ CALOAD = 0x34,
+ SALOAD = 0x35,
+ ISTORE = 0x36,
+ LSTORE = 0x37,
+ FSTORE = 0x38,
+ DSTORE = 0x39,
+ ASTORE = 0x3A,
+ ISTORE_0 = 0x3B,
+ ISTORE_1 = 0x3C,
+ ISTORE_2 = 0x3D,
+ ISTORE_3 = 0x3E,
+ LSTORE_0 = 0x3F,
+ LSTORE_1 = 0x40,
+ LSTORE_2 = 0x41,
+ LSTORE_3 = 0x42,
+ FSTORE_0 = 0x43,
+ FSTORE_1 = 0x44,
+ FSTORE_2 = 0x45,
+ FSTORE_3 = 0x46,
+ DSTORE_0 = 0x47,
+ DSTORE_1 = 0x48,
+ DSTORE_2 = 0x49,
+ DSTORE_3 = 0x4A,
+ ASTORE_0 = 0x4B,
+ ASTORE_1 = 0x4C,
+ ASTORE_2 = 0x4D,
+ ASTORE_3 = 0x4E,
+ IASTORE = 0x4F,
+ LASTORE = 0x50,
+ FASTORE = 0x51,
+ DASTORE = 0x52,
+ AASTORE = 0x53,
+ BASTORE = 0x54,
+ CASTORE = 0x55,
+ SASTORE = 0x56,
+ POP = 0x57,
+ POP2 = 0x58,
+ DUP = 0x59,
+ DUP_X1 = 0x5A,
+ DUP_X2 = 0x5B,
+ DUP2 = 0x5C,
+ DUP2_X1 = 0x5D,
+ DUP2_X2 = 0x5E,
+ SWAP = 0x5F,
+ IADD = 0x60,
+ LADD = 0x61,
+ FADD = 0x62,
+ DADD = 0x63,
+ ISUB = 0x64,
+ LSUB = 0x65,
+ FSUB = 0x66,
+ DSUB = 0x67,
+ IMUL = 0x68,
+ LMUL = 0x69,
+ FMUL = 0x6A,
+ DMUL = 0x6B,
+ IDIV = 0x6C,
+ LDIV = 0x6D,
+ FDIV = 0x6E,
+ DDIV = 0x6F,
+ IREM = 0x70,
+ LREM = 0x71,
+ FREM = 0x72,
+ DREM = 0x73,
+ INEG = 0x74,
+ LNEG = 0x75,
+ FNEG = 0x76,
+ DNEG = 0x77,
+ ISHL = 0x78,
+ LSHL = 0x79,
+ ISHR = 0x7A,
+ LSHR = 0x7B,
+ IUSHR = 0x7C,
+ LUSHR = 0x7D,
+ IAND = 0x7E,
+ LAND = 0x7F,
+ IOR = 0x80,
+ LOR = 0x81,
+ IXOR = 0x82,
+ LXOR = 0x83,
+ IINC = 0x84,
+ I2L = 0x85,
+ I2F = 0x86,
+ I2D = 0x87,
+ L2I = 0x88,
+ L2F = 0x89,
+ L2D = 0x8A,
+ F2I = 0x8B,
+ F2L = 0x8C,
+ F2D = 0x8D,
+ D2I = 0x8E,
+ D2L = 0x8F,
+ D2F = 0x90,
+ I2B = 0x91,
+ I2C = 0x92,
+ I2S = 0x93,
+ LCMP = 0x94,
+ FCMPL = 0x95,
+ FCMPG = 0x96,
+ DCMPL = 0x97,
+ DCMPG = 0x98,
+ IFEQ = 0x99,
+ IFNE = 0x9A,
+ IFLT = 0x9B,
+ IFGE = 0x9C,
+ IFGT = 0x9D,
+ IFLE = 0x9E,
+ IF_ICMPEQ = 0x9F,
+ IF_ICMPNE = 0xA0,
+ IF_ICMPLT = 0xA1,
+ IF_ICMPGE = 0xA2,
+ IF_ICMPGT = 0xA3,
+ IF_ICMPLE = 0xA4,
+ IF_ACMPEQ = 0xA5,
+ IF_ACMPNE = 0xA6,
+ GOTO = 0xA7,
+ JSR = 0xA8,
+ RET = 0xA9,
+ TABLESWITCH = 0xAA,
+ LOOKUPSWITCH = 0xAB,
+ IRETURN = 0xAC,
+ LRETURN = 0xAD,
+ FRETURN = 0xAE,
+ DRETURN = 0xAF,
+ ARETURN = 0xB0,
+ RETURN = 0xB1,
+ GETSTATIC = 0xB2,
+ PUTSTATIC = 0xB3,
+ GETFIELD = 0xB4,
+ PUTFIELD = 0xB5,
+ INVOKEVIRTUAL = 0xB6,
+ INVOKESPECIAL = 0xB7,
+ INVOKESTATIC = 0xB8,
+ INVOKEINTERFACE = 0xB9,
+ NEW = 0xBB,
+ NEWARRAY = 0xBC,
+ ANEWARRAY = 0xBD,
+ ARRAYLENGTH = 0xBE,
+ ATHROW = 0xBF,
+ CHECKCAST = 0xC0,
+ INSTANCEOF = 0xC1,
+ MONITORENTER = 0xC2,
+ MONITOREXIT = 0xC3,
+ WIDE = 0xC4,
+ MULTIANEWARRAY = 0xC5,
+ IFNULL = 0xC6,
+ IFNONNULL = 0xC7,
+ GOTO_W = 0xC8,
+ JSR_W = 0xC9,
+ BREAKPOINT = 0xCA,
+
+ IMPDEP1 = 0xFE,
+ IMPDEP2 = 0xFF;
+
+ /**
+ * Types for the NEWARRAY opcode.
+ */
+ public static final byte
+ T_BOOLEAN = 4,
+ T_CHAR = 5,
+ T_FLOAT = 6,
+ T_DOUBLE = 7,
+ T_BYTE = 8,
+ T_SHORT = 9,
+ T_INT = 10,
+ T_LONG = 11;
+
+
+}
Oops, something went wrong.

0 comments on commit 527c5ce

Please sign in to comment.