Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.dynjs.compiler.bytecode.partial;
 
 import static me.qmx.jitescript.util.CodegenUtils.*;
 
 
 public class MultipleClassInitializer extends CodeBlock {
    public MultipleClassInitializer(final String classNamefinal int numChunks) {
        for (int i = 0; i < numChunks; ++i) {
            String chunkClassName = className + '$' + i;
            aload(.);
            // this
            newobj(chunkClassName.replace('.''/'));
            // this chunk
            dup();
            // this chunk chunk
            invokespecial(chunkClassName.replace('.''/'), "<init>"sig(void.class));
            // this chunk
            putfield(className.replace('.''/'), "chunk" + ici(BasicBlock.class));
            // <empty>
            voidreturn();
        }
    }
New to GrepCode? Check out our FAQ X