}
public ProtoObject loadSmalltalkBlock(String name, PrimContext context) {
if (blocks.containsKey(name))
return createBlockInstance(blocks.get(name), context);
Block block = (Block) blocksToBeCompiled.remove(name);
if (block == null)
throw new IllegalStateException("Block to be compiled '" + name + "' not found.");
block.accept(block.analyser());
try {
ProtoObject newblock = (ProtoObject) defineClass(block.classBytes()).newInstance();
blocks.put(name, newblock);
return createBlockInstance(newblock, context);
} catch (Exception e) {
throw new RuntimeException(e);
}