示例#1
0
 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
示例#2
0
文件: jit.py 项目: SOM-st/RTruffleSOM
 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