Skip to content

Commit

Permalink
Fix wrong labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
renpytom committed Dec 20, 2024
1 parent bfa5e92 commit 1a9f4ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 2 additions & 4 deletions tools/opfunc/opfunc_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def handle_target(lb):
lb.sub(r"\bDISPATCH\(\)", "return opfunc_goto_dispatch")
lb.sub(r"\bDISPATCH_GOTO\(\)", "return opfunc_goto_dispatch_goto")
lb.sub(r"\bDISPATCH_SAME_OPARG\(\)", "return opfunc_goto_dispatch_same_oparg")
lb.sub(r"\bTRACE_FUNCTION_EXIT\(\)", "if ((ctx->cframe).use_tracing && trace_function_exit(tstate, (ctx->frame), retval)) { Py_DECREF(retval); return opfunc_goto_exit_unwind; }")

lb.replace("call_function:", "")

Expand Down Expand Up @@ -396,7 +395,6 @@ def handle_eval_frame(lb, opfuncs):
dispatch_goto:
{
opfunc_return opcode_result = opfuncs[ctx->opcode](ctx, tstate);
switch (opcode_result) {
Expand All @@ -423,10 +421,10 @@ def handle_eval_frame(lb, opfuncs):
goto pop_3_error;
case opfunc_goto_pop_2_error:
goto pop_3_error;
goto pop_2_error;
case opfunc_goto_pop_1_error:
goto pop_3_error;
goto pop_1_error;
case opfunc_goto_error:
goto error;
Expand Down
10 changes: 8 additions & 2 deletions tools/opfunc/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ done
cd $(dirname $0)

rm -Rf Python-3.12.8
tar xaf ../../source/Python-3.12.8.tar.xz
# tar xaf ../../source/Python-3.12.8.tar.xz
cp -a Python-3.12.8-src Python-3.12.8

./opfunc_transform.py Python-3.12.8/Python/ceval.c

Expand All @@ -44,9 +45,14 @@ export LD="ccache clang"
if [ $BUILD = yes ]; then
pushd Python-3.12.8
./configure --with-pydebug --cache-file=../config.cache > python.log
nice make -j$(nproc) >> python.log
nice make -j$(nproc) >> python.log || true
echo "Python build complete."

echo "Running test.py..."

./_bootstrap_python ../test.py | python3.12 ../decodeop.py
exit 1

if [ $TEST = yes ]; then
make test
fi
Expand Down

0 comments on commit 1a9f4ab

Please sign in to comment.