Merge branch 'lazy' into fruit

This commit is contained in:
Michael Bebenita 2015-03-13 17:21:47 -07:00
Родитель 4375872d8c a9e206c8ff
Коммит 664b62416d
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -342,7 +342,7 @@ Native["java/lang/Class.newInstance0.()Ljava/lang/Object;"] = function() {
Native["java/lang/Class.newInstance1.(Ljava/lang/Object;)V"] = function(o) {
// The following can trigger an unwind.
var methodInfo = o.klass.classInfo.getMethodByNameString("<init>", "()V", false);
var methodInfo = o.klass.classInfo.getLocalMethodByNameString("<init>", "()V", false);
if (!methodInfo) {
throw $.newInstantiationException("Can't instantiate classes without a nullary constructor");
}

Просмотреть файл

@ -1033,6 +1033,11 @@ module J2ME {
return this.getMethodByName(cacheUTF8(name), cacheUTF8(signature));
}
// This should only ever be used from code where the name and signature originate from JS strings.
getLocalMethodByNameString(name: string, signature: string): MethodInfo {
return this.getLocalMethodByName(toUTF8(name), toUTF8(signature));
}
getLocalMethodByName(utf8Name: Uint8Array, utf8Signature: Uint8Array): MethodInfo {
var i = this.indexOfMethod(utf8Name, utf8Signature);
if (i >= 0) {