/** {@inheritDoc} */ public void convert(Klass klass) { lastClassNameStack.push(klass.getName()); int state = klass.getState(); if (state < Klass.STATE_CONVERTING) { if (klass.isArray()) { convert(Klass.OBJECT); klass.changeState(Klass.STATE_CONVERTED); } else { traceProgress(); ClassFile classFile = getClassFile(klass); classFile.convertPhase1(this, translationStrategy != BY_METHOD); if (klass.hasGlobalStatics()) { // record globals now. recordGlobalStatics(klass); } if (translationStrategy == BY_METHOD || translationStrategy == BY_CLASS) { // if NOT inlining, then generate squawk code now. classFile.convertPhase2(this, translationStrategy == BY_METHOD); classFiles.remove(klass.getName()); } } } lastClassNameStack.pop(); }
/** {@inheritDoc} */ public void load(Klass klass) { Assert.that(VM.isHosted() || VM.getCurrentIsolate().getLeafSuite() == suite); int state = klass.getState(); if (state < Klass.STATE_LOADED) { if (klass.isArray()) { load(klass.getComponentType()); } else { lastClassNameStack.push(klass.getName()); ClassFile classFile = getClassFile(klass); load(classFile); lastClassNameStack.pop(); } } }