These are chat archives for dropbox/pyston

Sep 2017
Stefan O'Neil
Sep 11 2017 14:09
Hi everyone! I have some questions about working with Pyston source code.
Is there any documentation about the command line arguments that Pyston accepts? I cannot find such documentation anywhere, and neither “-h” nor “--help" seem to be supported. However it would help me tremendously to know all the different options I can use with Pyston.
How can I inspect the assembly code that Pyston generates? Part of the project that I am working on requires building support into Pyston for generating ARM code, so being able to check the machine code that Pyston is generating will be pretty essential.
Finally, how can I check the virtual memory address for a given variable/object? Another aspect of the project I am working on requires that I am able to map memory regions from a Pyston process into kernel memory, and then externally access or modify values internal to that Pyston process (probably using mmap() from within a kernel module). Thus, being able to find exactly where in memory an object is stored would be very useful. I find that id() often returns negative values - is this still a memory address, perhaps using twos complement, or is id() not a reliable way to check addresses in Pyston?
My apologies if any of these questions are obvious or answered elsewhere already - I did search fairly extensively before asking, but I could easily have overlooked something. I am pretty new both to the world of compilers and to exploring large code bases. All help is deeply appreciated.
Kevin Modzelewski
Sep 11 2017 19:39
Our command line flags mostly follow CPython's; you can find them here:
I think you can pass the -j flag and Pyston will spit out a .o file for each function it compiles, which you can then disassemble with objdump
There was an old reason that it xor'd with a constant, which should no longer be necessary
ARM code would be awesome :) but I'm sure is a lot of work
and since things aren't being actively developed it might be hard to get help
We have two places we emit code: one is through the LLVM jit, which should have ARM support. the other is our jit (src/asm_writing), which is probably much harder to convert
Kevin Modzelewski
Sep 11 2017 19:44
You'll probably want to liberally deactivate features in order to get started
Chris Toshok
Sep 11 2017 20:32
hey all, this thing still on? :)
got pyston running on OSX (baseline jit only at the moment)
really, really rough at the moment.
Kevin Modzelewski
Sep 11 2017 20:35
oh whoa, cool!
Chris Toshok
Sep 11 2017 21:02
oh and absolutely nothing unwinding-related works :)
but that shouldn't be too hard to get working