Hi Carl, Armin, William, I have thought about modifying the JIT code instruction set, descriptors and runtime rewrite etc. to encode the MuTyped CFG (which is a further type and ops specialisation towards the Mu MicroVM) for Mu back-end. But I presume this will involve a large amount of work? Would this be the case? And thus this wouldn’t be a good idea, right?
Regards, John Zhang ------------------------------------------------------ John Zhang Research Assistant Programming Languages, Design & Implementation Division Computer Systems Group ANU College of Engineering & Computer Science 108 North Rd The Australian National University Acton ACT 2601 john.zh...@anu.edu.au<mailto:john.zh...@anu.edu.au> On 15 Mar 2017, at 20:35, Carl Friedrich Bolz <cfb...@gmx.de<mailto:cfb...@gmx.de>> wrote: Hi John, As an aside, if you strictly need more information in your descrs, nobody stops you from using less of llsupport and instead writing or at least overriding your own descr infrastructure. I would imagine that a number of things from llsupport are not a perfect match for the mu backend. Cheers, Carl Friedrich On March 15, 2017 8:13:06 AM GMT+01:00, Armin Rigo <armin.r...@gmail.com<mailto:armin.r...@gmail.com>> wrote: Hi, On 15 March 2017 at 04:40, William ML Leslie <william.leslie....@gmail.com<mailto:william.leslie....@gmail.com>> wrote: The RTTI are a hook that the backend can implement, there is a fair bit of flexibility in what values they can take. That's right, but also, the RTTI is actually something from the early days of PyPy and not used any more nowadays. It is used with our test-only refcounting GC but not by "real code". I wouldn't start with that. It seems that by default the JIT transformer throws away the actual type information (GcStruct etc., which is not representable under RPython, I know) and only keeps the size. However, in Mu, memory allocation requires specific type information. That's not really true. We need to keep at least the typeid (a number, also called "tid") in addition to the size. This is stored in the SizeDescr, for GcStructs, which is a small piece of type information built at translation time by cpu.sizeof(). Look for get_size_descr() in jit/backend/llsupport/, and for init_size_descr() in jit/backend/llsupport/gc.py<http://gc.py/>. You can tweak SizeDescr to attach whatever info is needed there. As William said, depending on what exactly you need, you need to also tweak jit/codewriter/, which is the code that ultimately invokes the translation-time setting up of SizeDescr. Also, the same applies to the other Descr classes in llsupport/descr.py<http://descr.py/>, at least ArrayDescr. A bientôt, Armin. ________________________________ pypy-dev mailing list pypy-dev@python.org<mailto:pypy-dev@python.org> https://mail.python.org/mailman/listinfo/pypy-dev
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev