ruby-changes:68692
From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:12:25 +0900 (JST)
Subject: [ruby-changes:68692] 79331368b9 (master): Added block end index
https://git.ruby-lang.org/ruby.git/commit/?id=79331368b9 From 79331368b94b297a0653152cb568a9b998af7fee Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...> Date: Thu, 14 Jan 2021 19:36:07 -0500 Subject: Added block end index --- ujit_codegen.c | 3 +++ ujit_core.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ujit_codegen.c b/ujit_codegen.c index 501254b2cc..24b0dab4b3 100644 --- a/ujit_codegen.c +++ b/ujit_codegen.c @@ -207,6 +207,9 @@ ujit_gen_code(block_t* block) https://github.com/ruby/ruby/blob/trunk/ujit_codegen.c#L207 } } + // Store the index of the last instruction in the block + block->end_idx = insn_idx; + // If the last instruction compiled did not terminate the block // Generate code to exit to the interpreter if (!p_last_op || !p_last_op->is_branch) { diff --git a/ujit_core.h b/ujit_core.h index 734981e9f4..218bcf6e38 100644 --- a/ujit_core.h +++ b/ujit_core.h @@ -87,6 +87,9 @@ typedef struct BlockVersion https://github.com/ruby/ruby/blob/trunk/ujit_core.h#L87 // Bytecode sequence (iseq, idx) this is a version of blockid_t blockid; + // Index just past the last instruction in the iseq + uint32_t end_idx; + // Context at the start of the block ctx_t ctx; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/