blueloveTH 2 anni fa
parent
commit
5e13149a4d
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 1 0
      run_profile.sh
  2. 1 1
      src/vm.h

+ 1 - 0
run_profile.sh

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

+ 1 - 1
src/vm.h

@@ -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_IMPORT_NAME: case OP_BEGIN_CLASS:
             case OP_DELETE_LOCAL: case OP_DELETE_GLOBAL:
-                argStr += " (" + co->names[byte.arg].str().escape(true) + ")";
+                argStr += " (" + co->names[byte.arg].str() + ")";
                 break;
             case OP_BINARY_OP:
                 argStr += " (" + BINARY_SPECIAL_METHODS[byte.arg].str() + ")";