Small doc corrections

This commit is contained in:
rocky
2022-04-27 05:07:07 -04:00
parent a356a8e0ee
commit cfd6166d8d
2 changed files with 3 additions and 5 deletions

View File

@@ -211,7 +211,7 @@ class Scanner3(Scanner):
self, insts: list, next_tokens: list, inst: Instruction, t: Token, i: int, collection_type: str self, insts: list, next_tokens: list, inst: Instruction, t: Token, i: int, collection_type: str
) -> Optional[list]: ) -> Optional[list]:
""" """
Try to a sequence of instruction that ends with a BUILD_xxx into a sequence that can Try to a replace sequence of instruction that ends with a BUILD_xxx with a sequence that can
be parsed much faster, but inserting the token boundary at the beginning of the sequence. be parsed much faster, but inserting the token boundary at the beginning of the sequence.
""" """
count = t.attr count = t.attr
@@ -375,8 +375,6 @@ class Scanner3(Scanner):
) )
return new_tokens return new_tokens
def ingest(self, co, classname=None, code_objects={}, show_asm=None def ingest(self, co, classname=None, code_objects={}, show_asm=None
) -> Tuple[list, dict]: ) -> Tuple[list, dict]:
""" """

View File

@@ -76,8 +76,8 @@ class Scanner37(Scanner37Base):
collection_enum = CONST_COLLECTIONS.index(collection_type) collection_enum = CONST_COLLECTIONS.index(collection_type)
# If we go there all instructions before tokens[i] are LOAD_CONST and we can replace # If we get here, all instructions before tokens[i] are LOAD_CONST and we can replace
# add a boundary marker and change LOAD_CONST to something else # add a boundary marker and change LOAD_CONST to something else.
new_tokens = next_tokens[:-count] new_tokens = next_tokens[:-count]
start_offset = tokens[collection_start].offset start_offset = tokens[collection_start].offset
new_tokens.append( new_tokens.append(