@@ -33,7 +33,7 @@ Each activation record is laid out as:
33
33
* Stack
34
34
35
35
This seems to provide the best performance without excessive complexity.
36
- The specials have a fixed size, so the offset of the locals is know . The
36
+ The specials have a fixed size, so the offset of the locals is known . The
37
37
interpreter needs to hold two pointers, a frame pointer and a stack pointer.
38
38
39
39
#### Alternative layout
@@ -52,7 +52,7 @@ an extra pointer for the locals, which can hurt performance.
52
52
### Generators and Coroutines
53
53
54
54
Generators and coroutines contain a ` _PyInterpreterFrame `
55
- The specials sections contains the following pointers:
55
+ The specials section contains the following pointers:
56
56
57
57
* Globals dict
58
58
* Builtins dict
@@ -69,7 +69,7 @@ and builtins, than strong references to both globals and builtins.
69
69
70
70
When creating a backtrace or when calling ` sys._getframe() ` the frame becomes
71
71
visible to Python code. When this happens a new ` PyFrameObject ` is created
72
- and a strong reference to it placed in the ` frame_obj ` field of the specials
72
+ and a strong reference to it is placed in the ` frame_obj ` field of the specials
73
73
section. The ` frame_obj ` field is initially ` NULL ` .
74
74
75
75
The ` PyFrameObject ` may outlive a stack-allocated ` _PyInterpreterFrame ` .
@@ -128,7 +128,7 @@ The `return_offset` field determines where a `RETURN` should go in the caller,
128
128
relative to ` instr_ptr ` . It is only meaningful to the callee, so it needs to
129
129
be set in any instruction that implements a call (to a Python function),
130
130
including CALL, SEND and BINARY_SUBSCR_GETITEM, among others. If there is no
131
- callee, then return_offset is meaningless. It is necessary to have a separate
131
+ callee, then return_offset is meaningless. It is necessary to have a separate
132
132
field for the return offset because (1) if we apply this offset to ` instr_ptr `
133
133
while executing the ` RETURN ` , this is too early and would lose us information
134
134
about the previous instruction which we could need for introspecting and
0 commit comments