summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-06-27 19:24:58 (GMT)
committerGitHub <noreply@github.com>2023-06-27 19:24:58 (GMT)
commit529088100952b31797a29ef7e0f5716613b32d66 (patch)
treead6c08c0f5d4a3435b4be33eb44dd132a4f832cc /Include
parenteaa1eae55ea66d74c5303924320185dac74d4eb1 (diff)
downloadcpython-529088100952b31797a29ef7e0f5716613b32d66.zip
cpython-529088100952b31797a29ef7e0f5716613b32d66.tar.gz
cpython-529088100952b31797a29ef7e0f5716613b32d66.tar.bz2
gh-106149: move jump target resolution from optimizer to assembler (#106150)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_compile.h8
-rw-r--r--Include/internal/pycore_flowgraph.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/Include/internal/pycore_compile.h b/Include/internal/pycore_compile.h
index e648173..e204d4d 100644
--- a/Include/internal/pycore_compile.h
+++ b/Include/internal/pycore_compile.h
@@ -28,7 +28,7 @@ extern int _PyAST_Optimize(
int ff_features);
typedef struct {
- int h_offset;
+ int h_label;
int h_startdepth;
int h_preserve_lasti;
} _PyCompile_ExceptHandlerInfo;
@@ -38,6 +38,10 @@ typedef struct {
int i_oparg;
_PyCompilerSrcLocation i_loc;
_PyCompile_ExceptHandlerInfo i_except_handler_info;
+
+ /* Used by the assembler */
+ int i_target;
+ int i_offset;
} _PyCompile_Instruction;
typedef struct {
@@ -85,8 +89,6 @@ int _PyCompile_EnsureArrayLargeEnough(
int _PyCompile_ConstCacheMergeOne(PyObject *const_cache, PyObject **obj);
-int _PyCompile_InstrSize(int opcode, int oparg);
-
/* Access compiler internals for unit testing */
PyAPI_FUNC(PyObject*) _PyCompile_CodeGen(
diff --git a/Include/internal/pycore_flowgraph.h b/Include/internal/pycore_flowgraph.h
index 720feb1..4a01574 100644
--- a/Include/internal/pycore_flowgraph.h
+++ b/Include/internal/pycore_flowgraph.h
@@ -55,8 +55,6 @@ typedef struct _PyCfgBasicblock_ {
int b_predecessors;
/* depth of stack upon entry of block, computed by stackdepth() */
int b_startdepth;
- /* instruction offset for block, computed by assemble_jump_offsets() */
- int b_offset;
/* Basic block is an exception handler that preserves lasti */
unsigned b_preserve_lasti : 1;
/* Used by compiler passes to mark whether they have visited a basic block. */