From 841be061e07759db4ca2789b5fcb633793323584 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 22 Jun 2024 15:07:06 +0800 Subject: [PATCH] some move --- include/pocketpy/interpreter/frame.hpp | 2 +- include/pocketpy/objects/codeobject.hpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/pocketpy/interpreter/frame.hpp b/include/pocketpy/interpreter/frame.hpp index 5f3dc14a..0fa99c4f 100644 --- a/include/pocketpy/interpreter/frame.hpp +++ b/include/pocketpy/interpreter/frame.hpp @@ -143,7 +143,7 @@ struct Frame { int _exit_block(ValueStack*, int); [[nodiscard]] int prepare_loop_break(ValueStack* s_data) { - int target = co->_get_block_codei(ip()).end; + int target = co->blocks[co->lines[ip()].iblock].end; prepare_jump_break(s_data, target); return target; } diff --git a/include/pocketpy/objects/codeobject.hpp b/include/pocketpy/objects/codeobject.hpp index 6231d03e..900abc21 100644 --- a/include/pocketpy/objects/codeobject.hpp +++ b/include/pocketpy/objects/codeobject.hpp @@ -44,8 +44,6 @@ struct CodeObject { int start_line; int end_line; - const CodeBlock& _get_block_codei(int codei) const { return blocks[lines[codei].iblock]; } - void _gc_mark(VM*) const; CodeObject(pkpy_SourceData_ src, const Str& name) :