Cache class instance check map, and use lower case names to avoid any conflicts.

This commit is contained in:
Michael Bebenita 2015-08-19 14:15:56 -07:00
Родитель 97c1e6ec5a
Коммит 3e3f82e4a3
1 изменённых файлов: 6 добавлений и 5 удалений

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

@ -847,13 +847,13 @@ module J2ME {
}
runtimeClass(classInfo: ClassInfo) {
this.needsVariable("SA", "$.SA");
return "SA[" + classInfo.id + "]";
this.needsVariable("sa", "$.SA");
return "sa[" + classInfo.id + "]";
}
runtimeClassObject(classInfo: ClassInfo) {
this.needsVariable("CO", "$.CO");
return "CO[" + classInfo.id + "]";
this.needsVariable("co", "$.CO");
return "co[" + classInfo.id + "]";
}
emitClassInitializationCheck(classInfo: ClassInfo) {
@ -870,7 +870,8 @@ module J2ME {
(emitDebugInfoComments || baselineCounter) && (message = "Optimized ClassInitializationCheck: " + classInfo.getClassNameSlow() + ", base access.");
} else {
(emitDebugInfoComments || baselineCounter) && (message = "ClassInitializationCheck: " + classInfo.getClassNameSlow());
this.blockEmitter.writeLn("$.I[" + classInfo.id + "] || CIC(" + classConstant(classInfo) + ");");
this.needsVariable("ci", "$.I");
this.blockEmitter.writeLn("ci[" + classInfo.id + "] || CIC(" + classConstant(classInfo) + ");");
if (canStaticInitializerYield(classInfo)) {
this.emitUnwind(this.blockEmitter, String(this.pc));
} else {