scope = IRBuilder.createIRBuilder(runtime, runtime.getIRManager()).buildRoot((RootNode) result);
scope.setTopLevelBindingScope(((RootNode)result).getScope());
if (RubyInstanceConfig.IR_WRITING) {
try {
IRWriter.persist(new IRWriterFile(IRFileExpert.getIRPersistedFile(scope.getFileName())), scope);
} catch (IOException ex) {
ex.printStackTrace(); // FIXME: Handle errors better
return null;
}
}