This commit is contained in:
blueloveTH 2023-11-29 15:31:28 +08:00
parent 54b1ce3a3a
commit 438857a1f5
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@
**English |** [**简体中文**](README_zh.md) **English |** [**简体中文**](README_zh.md)
pkpy is a lightweight(~14K LOC) Python interpreter for game scripting, built on C++17 with STL. pkpy is a lightweight(~15K LOC) Python interpreter for game scripting, built on C++17 with STL.
It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance. It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance.
pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies. pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.

View File

@ -5,7 +5,7 @@ label: Welcome
# Welcome to pocketpy # Welcome to pocketpy
pkpy is a lightweight(~14K LOC) Python interpreter for game scripting, built on C++17 with STL. pkpy is a lightweight(~15K LOC) Python interpreter for game scripting, built on C++17 with STL.
It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance. It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance.
pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies. pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies.

View File

@ -609,7 +609,7 @@ Str VM::disassemble(CodeObject_ co){
std::vector<int> jumpTargets; std::vector<int> jumpTargets;
for(auto byte : co->codes){ for(auto byte : co->codes){
if(byte.op == OP_JUMP_ABSOLUTE || byte.op == OP_POP_JUMP_IF_FALSE || byte.op == OP_SHORTCUT_IF_FALSE_OR_POP){ if(byte.op == OP_JUMP_ABSOLUTE || byte.op == OP_POP_JUMP_IF_FALSE || byte.op == OP_SHORTCUT_IF_FALSE_OR_POP || byte.op == OP_FOR_ITER){
jumpTargets.push_back(byte.arg); jumpTargets.push_back(byte.arg);
} }
if(byte.op == OP_GOTO){ if(byte.op == OP_GOTO){