Previous chapters describe actual implementation experiments. This chapter is for stepping back from the realised code. Apart from analysis (of CPython etc.), it will collect together two broad kinds of idea about the architecture of a Java implementation of Python:
Ideas tested by the implementation experiments and shown to be useful.
Untested speculations. These may be tested in due course, in the experimental code of this project, quite likely resulting in some adjustment.
There will also be some issues we don’t know how to address (yet). Hopefully, these give rise to speculations and then tested ideas that address them.
- 4.1. Interpreter Structure
- 4.1.1. Introduction
- 4.1.2. Runtime, Thread and Interpreter (CPython)
- 4.1.3. Use cases
- 4.1.4. Proposed Model for Jython [untested]
- Critical Structures Revisited
Interpreterdoes not own objects [untested]
framereferences a particular interpreter [untested]
Threadalways has a
- The top frame designates the current interpreter [untested]
- A callable designates its defining interpreter [untested]
PyModuledesignates its defining interpreter [dubious]
- 4.2. Types of
- 4.3. Object Implementation
- 4.3.1. Type Slots
tp_newand Java Constructors
- 4.4. Compiled Code (Python to JVM)
- 4.5. Functions Defined in Java
This chapter has diagrams generated with PlantUML (if this diagnostic panel appears):