Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix typos
  • Loading branch information
StanFromIreland committed Dec 15, 2024
commit fa19dcfb5ef01e62b6c0538fda0c3e809d96de15
10 changes: 5 additions & 5 deletions Tools/cases_generator/interpreter_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ list of annotations and their meanings are as follows:
* `override`. For external use by other interpreter definitions to override the current
instruction definition.
* `pure`. This instruction has no side effects.
* 'tierN'. This instruction only used by tier N interpreter.
* 'tierN'. This instruction is only used by the tier N interpreter.

### Special functions/macros

Expand Down Expand Up @@ -309,7 +309,7 @@ This might become (if it was an instruction):

### More examples

For explanations see "Generating the interpreter" below.)
For explanations see "Generating the interpreter" below.
```C
op ( CHECK_HAS_INSTANCE_VALUES, (owner -- owner) ) {
PyDictOrValues dorv = *_PyObject_DictOrValuesPointer(owner);
Expand Down Expand Up @@ -371,7 +371,7 @@ For explanations see "Generating the interpreter" below.)

A _family_ maps a specializable instruction to its specializations.

Example: These opcodes all share the same instruction format):
Example: These opcodes all share the same instruction format:
```C
family(load_attr) = { LOAD_ATTR, LOAD_ATTR_INSTANCE_VALUE, LOAD_SLOT };
```
Expand All @@ -393,7 +393,7 @@ which can be easily inserted. What is more complex is ensuring the correct stack
and not generating excess pops and pushes.

For example, in `CHECK_HAS_INSTANCE_VALUES`, `owner` occurs in the input, so it cannot be
redefined. Thus it doesn't need to written and can be read without adjusting the stack pointer.
redefined. Thus, it doesn't need to be written and can be read without adjusting the stack pointer.
The C code generated for `CHECK_HAS_INSTANCE_VALUES` would look something like:

```C
Expand All @@ -404,7 +404,7 @@ The C code generated for `CHECK_HAS_INSTANCE_VALUES` would look something like:
}
```

When combining ops together to form instructions, temporary values should be used,
When combining ops to form instructions, temporary values should be used,
rather than popping and pushing, such that `LOAD_ATTR_SLOT` would look something like:

```C
Expand Down