Minor bugfixes

This commit is contained in:
Alexey Andreev 2015-11-08 23:52:40 +03:00
parent 6d45f57a39
commit 7fd414c84e
4 changed files with 8 additions and 5 deletions

View File

@ -312,9 +312,6 @@ public class DependencyChecker implements DependencyInfo {
private Set<MethodReference> methodsAddedByRoot = new HashSet<>(); private Set<MethodReference> methodsAddedByRoot = new HashSet<>();
public MethodDependency linkMethod(MethodReference methodRef, CallLocation callLocation) { public MethodDependency linkMethod(MethodReference methodRef, CallLocation callLocation) {
if (completing && getMethod(methodRef) == null) {
throw new IllegalStateException("Can't submit class during completion phase");
}
if (methodRef == null) { if (methodRef == null) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
@ -322,6 +319,10 @@ public class DependencyChecker implements DependencyInfo {
if (methodReader != null) { if (methodReader != null) {
methodRef = methodReader.getReference(); methodRef = methodReader.getReference();
} }
if (completing && getMethod(methodRef) == null) {
throw new IllegalStateException("Can't submit class during completion phase");
}
callGraph.getNode(methodRef); callGraph.getNode(methodRef);
boolean added = true; boolean added = true;
if (callLocation != null && callLocation.getMethod() != null) { if (callLocation != null && callLocation.getMethod() != null) {

View File

@ -196,7 +196,9 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext
@Override @Override
public Properties getProperties() { public Properties getProperties() {
return new Properties(properties); Properties properties = new Properties();
properties.putAll(this.properties);
return properties;
} }
public DebugInformationEmitter getDebugEmitter() { public DebugInformationEmitter getDebugEmitter() {

View File

@ -68,6 +68,7 @@ public interface Location extends JSObject {
@JSProperty @JSProperty
String getHash(); String getHash();
@JSProperty
void setHash(String hash); void setHash(String hash);
void assign(String url); void assign(String url);

View File

@ -34,7 +34,6 @@ import org.teavm.jso.dom.xml.NodeList;
public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget, FocusEventTarget, MouseEventTarget, public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget, FocusEventTarget, MouseEventTarget,
KeyboardEventTarget, LoadEventTarget { KeyboardEventTarget, LoadEventTarget {
@Override @Override
@JSProperty
NodeList<? extends HTMLElement> getElementsByTagName(String name); NodeList<? extends HTMLElement> getElementsByTagName(String name);
@JSProperty @JSProperty