From 4cc484729f3fadde3eb80b682c4f0b820e4896b9 Mon Sep 17 00:00:00 2001 From: konsoletyper Date: Sat, 15 Mar 2014 15:10:54 +0400 Subject: [PATCH] Moves JSO classes into org.teavm.jso. Fixes bug in StringBuilder --- .../teavm/classlib/java/lang/TAbstractStringBuilder.java | 2 +- .../src/main/java/org/teavm/dom/browser/TimerHandler.java | 4 ++-- teavm-dom/src/main/java/org/teavm/dom/browser/Window.java | 6 +++--- teavm-dom/src/main/java/org/teavm/dom/core/Attr.java | 2 +- .../src/main/java/org/teavm/dom/core/CharacterData.java | 2 +- .../src/main/java/org/teavm/dom/core/DOMImplementation.java | 2 +- teavm-dom/src/main/java/org/teavm/dom/core/Document.java | 2 +- .../src/main/java/org/teavm/dom/core/NamedNodeMap.java | 6 +++--- teavm-dom/src/main/java/org/teavm/dom/core/Node.java | 4 ++-- teavm-dom/src/main/java/org/teavm/dom/core/NodeList.java | 4 ++-- teavm-dom/src/main/java/org/teavm/dom/events/Event.java | 4 ++-- .../src/main/java/org/teavm/dom/events/EventListener.java | 4 ++-- .../src/main/java/org/teavm/dom/events/EventTarget.java | 2 +- .../src/main/java/org/teavm/{javascript/ni => jso}/JS.java | 4 +++- .../main/java/org/teavm/{javascript/ni => jso}/JSArray.java | 2 +- .../org/teavm/{javascript/ni => jso}/JSConstructor.java | 2 +- .../java/org/teavm/{javascript/ni => jso}/JSFunction.java | 2 +- .../java/org/teavm/{javascript/ni => jso}/JSFunctor.java | 2 +- .../java/org/teavm/{javascript/ni => jso}/JSGlobal.java | 2 +- .../java/org/teavm/{javascript/ni => jso}/JSIndexer.java | 2 +- .../java/org/teavm/{javascript/ni => jso}/JSMethod.java | 2 +- .../org/teavm/{javascript/ni => jso}/JSNativeGenerator.java | 6 +++++- .../java/org/teavm/{javascript/ni => jso}/JSNumber.java | 2 +- .../java/org/teavm/{javascript/ni => jso}/JSObject.java | 2 +- .../java/org/teavm/{javascript/ni => jso}/JSProperty.java | 2 +- .../main/java/org/teavm/{javascript/ni => jso}/JSType.java | 2 +- .../ni => jso}/plugin/JSObjectBuilderPlugin.java | 2 +- .../ni => jso}/plugin/JSObjectClassTransformer.java | 2 +- .../ni => jso}/plugin/JavascriptNativeProcessor.java | 5 +++-- .../ni => jso}/plugin/NativeJavascriptClassRepository.java | 4 ++-- .../META-INF/services/org.teavm.vm.spi.TeaVMPlugin | 2 +- .../src/main/java/org/teavm/samples/HelloWorld.java | 2 +- 32 files changed, 50 insertions(+), 43 deletions(-) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JS.java (98%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSArray.java (96%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSConstructor.java (97%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSFunction.java (98%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSFunctor.java (96%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSGlobal.java (96%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSIndexer.java (96%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSMethod.java (96%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSNativeGenerator.java (97%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSNumber.java (95%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSObject.java (95%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSProperty.java (96%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/JSType.java (95%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/plugin/JSObjectBuilderPlugin.java (95%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/plugin/JSObjectClassTransformer.java (97%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/plugin/JavascriptNativeProcessor.java (99%) rename teavm-jso/src/main/java/org/teavm/{javascript/ni => jso}/plugin/NativeJavascriptClassRepository.java (95%) diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TAbstractStringBuilder.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TAbstractStringBuilder.java index 3040bbdfc..584a2f0cb 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TAbstractStringBuilder.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/TAbstractStringBuilder.java @@ -623,7 +623,7 @@ class TAbstractStringBuilder extends TObject implements TSerializable, TCharSequ if (start > end || end > s.length() || start < 0) { throw new TIndexOutOfBoundsException(); } - insertSpace(index, index + end - start + length); + insertSpace(index, index + end - start); for (int i = start; i < end; ++i) { buffer[index++] = s.charAt(i); } diff --git a/teavm-dom/src/main/java/org/teavm/dom/browser/TimerHandler.java b/teavm-dom/src/main/java/org/teavm/dom/browser/TimerHandler.java index fa6576cf5..a381b12ed 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/browser/TimerHandler.java +++ b/teavm-dom/src/main/java/org/teavm/dom/browser/TimerHandler.java @@ -15,8 +15,8 @@ */ package org.teavm.dom.browser; -import org.teavm.javascript.ni.JSFunctor; -import org.teavm.javascript.ni.JSObject; +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSObject; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/browser/Window.java b/teavm-dom/src/main/java/org/teavm/dom/browser/Window.java index bff2e1f7e..724fea09c 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/browser/Window.java +++ b/teavm-dom/src/main/java/org/teavm/dom/browser/Window.java @@ -17,9 +17,9 @@ package org.teavm.dom.browser; import org.teavm.dom.core.Document; import org.teavm.dom.core.Element; -import org.teavm.javascript.ni.JSGlobal; -import org.teavm.javascript.ni.JSObject; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSGlobal; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/core/Attr.java b/teavm-dom/src/main/java/org/teavm/dom/core/Attr.java index 50d898b31..f22f3ba5d 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/core/Attr.java +++ b/teavm-dom/src/main/java/org/teavm/dom/core/Attr.java @@ -15,7 +15,7 @@ */ package org.teavm.dom.core; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/core/CharacterData.java b/teavm-dom/src/main/java/org/teavm/dom/core/CharacterData.java index b38cd64be..ec86d201c 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/core/CharacterData.java +++ b/teavm-dom/src/main/java/org/teavm/dom/core/CharacterData.java @@ -15,7 +15,7 @@ */ package org.teavm.dom.core; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/core/DOMImplementation.java b/teavm-dom/src/main/java/org/teavm/dom/core/DOMImplementation.java index 36488a5de..ae3a70739 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/core/DOMImplementation.java +++ b/teavm-dom/src/main/java/org/teavm/dom/core/DOMImplementation.java @@ -15,7 +15,7 @@ */ package org.teavm.dom.core; -import org.teavm.javascript.ni.JSObject; +import org.teavm.jso.JSObject; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/core/Document.java b/teavm-dom/src/main/java/org/teavm/dom/core/Document.java index ce4ad539b..057c63494 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/core/Document.java +++ b/teavm-dom/src/main/java/org/teavm/dom/core/Document.java @@ -15,7 +15,7 @@ */ package org.teavm.dom.core; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/core/NamedNodeMap.java b/teavm-dom/src/main/java/org/teavm/dom/core/NamedNodeMap.java index b15c815a2..b893cfa82 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/core/NamedNodeMap.java +++ b/teavm-dom/src/main/java/org/teavm/dom/core/NamedNodeMap.java @@ -15,9 +15,9 @@ */ package org.teavm.dom.core; -import org.teavm.javascript.ni.JSArray; -import org.teavm.javascript.ni.JSObject; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSArray; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/core/Node.java b/teavm-dom/src/main/java/org/teavm/dom/core/Node.java index 947aa1a44..12be59886 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/core/Node.java +++ b/teavm-dom/src/main/java/org/teavm/dom/core/Node.java @@ -15,8 +15,8 @@ */ package org.teavm.dom.core; -import org.teavm.javascript.ni.JSObject; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/core/NodeList.java b/teavm-dom/src/main/java/org/teavm/dom/core/NodeList.java index f1246cb76..75d1d2cf6 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/core/NodeList.java +++ b/teavm-dom/src/main/java/org/teavm/dom/core/NodeList.java @@ -15,8 +15,8 @@ */ package org.teavm.dom.core; -import org.teavm.javascript.ni.JSArray; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSArray; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/events/Event.java b/teavm-dom/src/main/java/org/teavm/dom/events/Event.java index 923e9c71e..6bb5935f8 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/events/Event.java +++ b/teavm-dom/src/main/java/org/teavm/dom/events/Event.java @@ -15,8 +15,8 @@ */ package org.teavm.dom.events; -import org.teavm.javascript.ni.JSObject; -import org.teavm.javascript.ni.JSProperty; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/events/EventListener.java b/teavm-dom/src/main/java/org/teavm/dom/events/EventListener.java index 64c89f206..cc0b6c491 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/events/EventListener.java +++ b/teavm-dom/src/main/java/org/teavm/dom/events/EventListener.java @@ -15,8 +15,8 @@ */ package org.teavm.dom.events; -import org.teavm.javascript.ni.JSFunctor; -import org.teavm.javascript.ni.JSObject; +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSObject; /** * diff --git a/teavm-dom/src/main/java/org/teavm/dom/events/EventTarget.java b/teavm-dom/src/main/java/org/teavm/dom/events/EventTarget.java index 3db94bd7d..a9d833adf 100644 --- a/teavm-dom/src/main/java/org/teavm/dom/events/EventTarget.java +++ b/teavm-dom/src/main/java/org/teavm/dom/events/EventTarget.java @@ -15,7 +15,7 @@ */ package org.teavm.dom.events; -import org.teavm.javascript.ni.JSObject; +import org.teavm.jso.JSObject; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JS.java b/teavm-jso/src/main/java/org/teavm/jso/JS.java similarity index 98% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JS.java rename to teavm-jso/src/main/java/org/teavm/jso/JS.java index 916794a3b..4bf0ae9d4 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JS.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JS.java @@ -13,10 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; import java.util.Iterator; import org.teavm.dependency.PluggableDependency; +import org.teavm.javascript.ni.GeneratedBy; +import org.teavm.javascript.ni.InjectedBy; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSArray.java b/teavm-jso/src/main/java/org/teavm/jso/JSArray.java similarity index 96% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSArray.java rename to teavm-jso/src/main/java/org/teavm/jso/JSArray.java index 21c06ed45..ab175dab2 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSArray.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSArray.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSConstructor.java b/teavm-jso/src/main/java/org/teavm/jso/JSConstructor.java similarity index 97% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSConstructor.java rename to teavm-jso/src/main/java/org/teavm/jso/JSConstructor.java index 0668788e4..e95bbb132 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSConstructor.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSConstructor.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSFunction.java b/teavm-jso/src/main/java/org/teavm/jso/JSFunction.java similarity index 98% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSFunction.java rename to teavm-jso/src/main/java/org/teavm/jso/JSFunction.java index 873382735..9f0a228e8 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSFunction.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSFunction.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSFunctor.java b/teavm-jso/src/main/java/org/teavm/jso/JSFunctor.java similarity index 96% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSFunctor.java rename to teavm-jso/src/main/java/org/teavm/jso/JSFunctor.java index 531751f31..8cd7c904c 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSFunctor.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSFunctor.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSGlobal.java b/teavm-jso/src/main/java/org/teavm/jso/JSGlobal.java similarity index 96% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSGlobal.java rename to teavm-jso/src/main/java/org/teavm/jso/JSGlobal.java index e7dc3de87..cb3334673 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSGlobal.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSGlobal.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSIndexer.java b/teavm-jso/src/main/java/org/teavm/jso/JSIndexer.java similarity index 96% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSIndexer.java rename to teavm-jso/src/main/java/org/teavm/jso/JSIndexer.java index 0b13c18ce..18bdf0e8a 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSIndexer.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSIndexer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSMethod.java b/teavm-jso/src/main/java/org/teavm/jso/JSMethod.java similarity index 96% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSMethod.java rename to teavm-jso/src/main/java/org/teavm/jso/JSMethod.java index 6925983e4..185ea626f 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSMethod.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSMethod.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSNativeGenerator.java b/teavm-jso/src/main/java/org/teavm/jso/JSNativeGenerator.java similarity index 97% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSNativeGenerator.java rename to teavm-jso/src/main/java/org/teavm/jso/JSNativeGenerator.java index d21f5e80f..2df9b4b32 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSNativeGenerator.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSNativeGenerator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; import java.io.IOException; import org.teavm.codegen.SourceWriter; @@ -24,6 +24,10 @@ import org.teavm.dependency.MethodDependency; import org.teavm.javascript.ast.ConstantExpr; import org.teavm.javascript.ast.Expr; import org.teavm.javascript.ast.InvocationExpr; +import org.teavm.javascript.ni.Generator; +import org.teavm.javascript.ni.GeneratorContext; +import org.teavm.javascript.ni.Injector; +import org.teavm.javascript.ni.InjectorContext; import org.teavm.model.*; /** diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSNumber.java b/teavm-jso/src/main/java/org/teavm/jso/JSNumber.java similarity index 95% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSNumber.java rename to teavm-jso/src/main/java/org/teavm/jso/JSNumber.java index 60862b353..b9f6ad434 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSNumber.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSNumber.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSObject.java b/teavm-jso/src/main/java/org/teavm/jso/JSObject.java similarity index 95% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSObject.java rename to teavm-jso/src/main/java/org/teavm/jso/JSObject.java index 63a2428a5..a27ed8774 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSObject.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSObject.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSProperty.java b/teavm-jso/src/main/java/org/teavm/jso/JSProperty.java similarity index 96% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSProperty.java rename to teavm-jso/src/main/java/org/teavm/jso/JSProperty.java index df49ea071..c61a89ebe 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSProperty.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSProperty.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSType.java b/teavm-jso/src/main/java/org/teavm/jso/JSType.java similarity index 95% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/JSType.java rename to teavm-jso/src/main/java/org/teavm/jso/JSType.java index c056d1557..c82fc6399 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/JSType.java +++ b/teavm-jso/src/main/java/org/teavm/jso/JSType.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni; +package org.teavm.jso; /** * diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JSObjectBuilderPlugin.java b/teavm-jso/src/main/java/org/teavm/jso/plugin/JSObjectBuilderPlugin.java similarity index 95% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JSObjectBuilderPlugin.java rename to teavm-jso/src/main/java/org/teavm/jso/plugin/JSObjectBuilderPlugin.java index b98a72b35..97672e804 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JSObjectBuilderPlugin.java +++ b/teavm-jso/src/main/java/org/teavm/jso/plugin/JSObjectBuilderPlugin.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni.plugin; +package org.teavm.jso.plugin; import org.teavm.vm.spi.TeaVMHost; import org.teavm.vm.spi.TeaVMPlugin; diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JSObjectClassTransformer.java b/teavm-jso/src/main/java/org/teavm/jso/plugin/JSObjectClassTransformer.java similarity index 97% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JSObjectClassTransformer.java rename to teavm-jso/src/main/java/org/teavm/jso/plugin/JSObjectClassTransformer.java index 393d0f19a..6af34c710 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JSObjectClassTransformer.java +++ b/teavm-jso/src/main/java/org/teavm/jso/plugin/JSObjectClassTransformer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni.plugin; +package org.teavm.jso.plugin; import org.teavm.model.ClassHolder; import org.teavm.model.ClassHolderTransformer; diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JavascriptNativeProcessor.java b/teavm-jso/src/main/java/org/teavm/jso/plugin/JavascriptNativeProcessor.java similarity index 99% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JavascriptNativeProcessor.java rename to teavm-jso/src/main/java/org/teavm/jso/plugin/JavascriptNativeProcessor.java index 05459745a..fcf66b990 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/JavascriptNativeProcessor.java +++ b/teavm-jso/src/main/java/org/teavm/jso/plugin/JavascriptNativeProcessor.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni.plugin; +package org.teavm.jso.plugin; import java.util.*; -import org.teavm.javascript.ni.*; +import org.teavm.javascript.ni.PreserveOriginalName; +import org.teavm.jso.*; import org.teavm.model.*; import org.teavm.model.instructions.*; diff --git a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/NativeJavascriptClassRepository.java b/teavm-jso/src/main/java/org/teavm/jso/plugin/NativeJavascriptClassRepository.java similarity index 95% rename from teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/NativeJavascriptClassRepository.java rename to teavm-jso/src/main/java/org/teavm/jso/plugin/NativeJavascriptClassRepository.java index e76357a69..302b2ab34 100644 --- a/teavm-jso/src/main/java/org/teavm/javascript/ni/plugin/NativeJavascriptClassRepository.java +++ b/teavm-jso/src/main/java/org/teavm/jso/plugin/NativeJavascriptClassRepository.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ni.plugin; +package org.teavm.jso.plugin; import java.util.HashMap; import java.util.Map; -import org.teavm.javascript.ni.JSObject; +import org.teavm.jso.JSObject; import org.teavm.model.ClassReader; import org.teavm.model.ClassReaderSource; import org.teavm.model.ElementModifier; diff --git a/teavm-jso/src/main/resources/META-INF/services/org.teavm.vm.spi.TeaVMPlugin b/teavm-jso/src/main/resources/META-INF/services/org.teavm.vm.spi.TeaVMPlugin index 59e76871c..faefa2589 100644 --- a/teavm-jso/src/main/resources/META-INF/services/org.teavm.vm.spi.TeaVMPlugin +++ b/teavm-jso/src/main/resources/META-INF/services/org.teavm.vm.spi.TeaVMPlugin @@ -1 +1 @@ -org.teavm.javascript.ni.plugin.JSObjectBuilderPlugin \ No newline at end of file +org.teavm.jso.plugin.JSObjectBuilderPlugin \ No newline at end of file diff --git a/teavm-samples/src/main/java/org/teavm/samples/HelloWorld.java b/teavm-samples/src/main/java/org/teavm/samples/HelloWorld.java index dc0236720..fea65aa24 100644 --- a/teavm-samples/src/main/java/org/teavm/samples/HelloWorld.java +++ b/teavm-samples/src/main/java/org/teavm/samples/HelloWorld.java @@ -21,7 +21,7 @@ import org.teavm.dom.core.Element; import org.teavm.dom.events.Event; import org.teavm.dom.events.EventListener; import org.teavm.dom.events.EventTarget; -import org.teavm.javascript.ni.JS; +import org.teavm.jso.JS; /**