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 Disassembler Disassembler.dump(result) return result
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 Disassembler Disassembler.dump(result) return result
def _load_class(self, name, system_class): # Try loading the class from all different paths for cpEntry in self._classpath: try: # Load the class from a file and return the loaded class result = sourcecode_compiler.compile_class_from_file(cpEntry, name.get_string(), system_class, self) if self._dump_bytecodes: from som.compiler.disassembler import Disassembler Disassembler.dump(result.get_class()) Disassembler.dump(result) return result except IOError: # Continue trying different paths pass # The class could not be found. return None
def _load_class(self, name, system_class): # Try loading the class from all different paths for cpEntry in self._classpath: try: # Load the class from a file and return the loaded class result = sourcecode_compiler.compile_class_from_file( cpEntry, name.get_string(), system_class, self) if self._dump_bytecodes: from som.compiler.disassembler import Disassembler Disassembler.dump(result.get_class()) Disassembler.dump(result) return result except IOError: # Continue trying different paths pass # The class could not be found. return None