aosabook | The Architecture of Open Source Applications | Architecture library
kandi X-RAY | aosabook Summary
kandi X-RAY | aosabook Summary
The Architecture of Open Source Applications.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aosabook
aosabook Key Features
aosabook Examples and Code Snippets
Community Discussions
Trending Discussions on aosabook
QUESTION
I am confused over the difference between the root window, a figure, backends and the canvas when building Tkinter GUI's. As far as I can tell the canvas is something the Artist can draw on and is attached to a figure. This was helpful but I couldn't get my head around what the differences or hierarchy of window/fig/backends and canvas are: http://www.aosabook.org/en/matplotlib.html
...ANSWER
Answered 2020-Sep-23 at 13:02You start with the window.
QUESTION
I have skimmed through the PyPy implementation details and went through the source code as well, but PyPy's execution path is still not totally clear to me.
Sometimes Bytecode is produced, sometimes it is skipped for immediate machine-code compiling (interpreter level/app level code), But I can't figure out when and where exactly is the machine code produced, to be handed to the OS for binary execution through low-level instructions (RAM/CPU).
I managed to get that straight in the case of CPython, as there is a giant switch in ceval.c
- that is already compiled - which interprets bytecode and runs the corresponding code (in actual C actually). Makes sense.
But as far as PyPy is concerned, I did not manage to get a clear view on how this is done, specifically (I do not want to get into the various optimization details of PyPy, that's not what I am after here).
I would be satisfied with an answer that points to the PYPY source code, so to avoid "hearsay" and be able to see it "with my eyes" (I spotted the JIT backends part, under /rpython, with the various CPU architectures assemblers)
...ANSWER
Answered 2020-Aug-30 at 22:16Your best guide is the pypy architecture documentation, and the actual JIT documentation.
What jumped out the most for me is this:
we have a tracing JIT that traces the interpreter written in RPython, rather than the user program that it interprets.
This is covered in more detail in the JIT overview.
It seems to be that the "core" is this (from here):
Once the meta-interpreter has verified that it has traced a loop, it decides how to compile what it has. There is an optional optimization phase between these actions which is covered future down this page. The backend converts the trace operations into assembly for the particular machine. It then hands the compiled loop back to the frontend. The next time the loop is seen in application code, the optimized assembly can be run instead of the normal interpreter.
This paper (PDF) might also be helpful.
Edit: Looking at the x86 backend rpython/jit/backend/x86/rx86.py
, the backend doesn't so much as compile but spit out machine code directly. Look at the X86_64_CodeBuilder
and AbstractX86CodeBuilder
classes. One level higher is the Assembler386
class in rpython/jit/backend/x86/assembler.py
. This assembler uses the MachineCodeBlockWrapper
from rpython/jit/backend/x86/codebuf.py
which is based on the X86_64_CodeBuilder
for x86-64.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aosabook
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page