Skip to content

Latest commit

 

History

History
92 lines (83 loc) · 4.85 KB

TODO.md

File metadata and controls

92 lines (83 loc) · 4.85 KB

TODO

Important

  • The bytecode interpreter is a source of potential problems for us. Once the first few phases are in we need to really understand what it does and to what extent we need to enlighten it.

Phase 1

Notes

  • Add a field to the object header to store the immutable state (used in later phase, so make ptr size)
  • Make immortal
  • Freeze performs object graph traversal and freezes all reachable objects
    • Use tp_traverse to look at the fields of the object
    • Look at type, which may or may not be returned by tp_traverse
    • Look at mapping and list items if they have them
  • Numpy etc will require recompiling against the new runtime.
  • How do we use the flag in the object header to determine if a write is allowed?
    • We need to intercept all setattr calls and check the flag
    • Slice types in numpy will need to know about the underlying objects immutability
  • Exceptions can be raised as late as possible. i.e., to the actual point of mutation.
  • Places where Py_SET_TYPE() is called are worth keeping in mind when we add in regions. They are always places where weird things are happening.
  • ADD_TYPE() calls in various places designate places where special types are being created on the fly. We need to ensure we handle dependent type generation properly wrt regions

Questions

  • Do we need a new type flag to specify that the type supports deep immutability? tp_flags is a bitfield, so we could add a new flag.

Milestones