summaryrefslogtreecommitdiff
path: root/yjit_core.h
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-04-05 17:59:25 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:32 -0400
commit21a63450236af6eaae954b367385c071231dc03f (patch)
treeed2bb1597f64e8331c16f04d249afa2189b50a66 /yjit_core.h
parente56bd95ca05fa8ff07455e62143b260bcda74926 (diff)
YJIT: adjust branch shape properly when target already exists
The old code decides branch->shape based on the write position of the native code block, which is unsound in case the block already exists and no new code is written to the write position. Make this decision with the start address of the target block instead. Also handle when the branch becomes smaller after patching.
Diffstat (limited to 'yjit_core.h')
-rw-r--r--yjit_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit_core.h b/yjit_core.h
index 1a55408a7b..658a0cc691 100644
--- a/yjit_core.h
+++ b/yjit_core.h
@@ -156,7 +156,7 @@ typedef void (*branchgen_fn)(codeblock_t* cb, uint8_t* target0, uint8_t* target1
Store info about an outgoing branch in a code segment
Note: care must be taken to minimize the size of branch_t objects
*/
-typedef struct BranchEntry
+typedef struct yjit_branch_entry
{
// Positions where the generated code starts and ends
uint32_t start_pos;