def load_shell_class(self, stmt): # Load the class from a stream and return the loaded class result = sourcecode_compiler.compile_class_from_string(stmt, None, self) if self._dump_bytecodes: from som.compiler.disassembler import dump dump(result) return result
def _compile_and_lookup(self, source, start, classpath): u = get_current() u.setup_classpath(classpath) u._initialize_object_system() cls = sourcecode_compiler.compile_class_from_string(source, None, u) obj = u.new_instance(cls) invokable = cls.lookup_invokable(u.symbol_for(start)) return u, obj, invokable