This commit is contained in:
blueloveTH 2023-04-08 16:22:41 +08:00
parent d4775a7016
commit 5e13149a4d
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# THIS SCRIPT IS NOT WORKING # THIS SCRIPT IS NOT WORKING
clang++ -pg -O2 -std=c++17 -fno-rtti -stdlib=libc++ -Wall -o pocketpy src/main.cpp clang++ -pg -O2 -std=c++17 -fno-rtti -stdlib=libc++ -Wall -o pocketpy src/main.cpp
time ./pocketpy benchmarks/fib.py time ./pocketpy benchmarks/fib.py
mv benchmarks/gmon.out .
gprof pocketpy gmon.out > gprof.txt gprof pocketpy gmon.out > gprof.txt
rm gmon.out rm gmon.out

View File

@ -601,7 +601,7 @@ inline Str VM::disassemble(CodeObject_ co){
case OP_LOAD_ATTR: case OP_LOAD_METHOD: case OP_STORE_ATTR: case OP_DELETE_ATTR: case OP_LOAD_ATTR: case OP_LOAD_METHOD: case OP_STORE_ATTR: case OP_DELETE_ATTR:
case OP_IMPORT_NAME: case OP_BEGIN_CLASS: case OP_IMPORT_NAME: case OP_BEGIN_CLASS:
case OP_DELETE_LOCAL: case OP_DELETE_GLOBAL: case OP_DELETE_LOCAL: case OP_DELETE_GLOBAL:
argStr += " (" + co->names[byte.arg].str().escape(true) + ")"; argStr += " (" + co->names[byte.arg].str() + ")";
break; break;
case OP_BINARY_OP: case OP_BINARY_OP:
argStr += " (" + BINARY_SPECIAL_METHODS[byte.arg].str() + ")"; argStr += " (" + BINARY_SPECIAL_METHODS[byte.arg].str() + ")";