diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-04-06 11:03:50 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:32 -0400 |
commit | 131fc9c074d464c6baa548ab89a1d1d1dcc5c571 (patch) | |
tree | 55144ba2a297b4c668ca11fcb3adf9f7de234f58 /yjit_core.c | |
parent | 5b613938eb63d3dd82feb32b4eefbe345beaf199 (diff) |
Readd const arguments
Diffstat (limited to 'yjit_core.c')
-rw-r--r-- | yjit_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yjit_core.c b/yjit_core.c index 17006f7b2c..9add2b5f29 100644 --- a/yjit_core.c +++ b/yjit_core.c @@ -418,7 +418,7 @@ uint8_t* gen_entry_point(const rb_iseq_t *iseq, uint32_t insn_idx, rb_execution_ // Called by the generated code when a branch stub is executed // Triggers compilation of branches and code patching static uint8_t * -branch_stub_hit(uint32_t branch_idx, uint32_t target_idx, rb_execution_context_t* ec) +branch_stub_hit(const uint32_t branch_idx, const uint32_t target_idx, rb_execution_context_t* ec) { uint8_t* dst_addr; @@ -493,7 +493,7 @@ branch_stub_hit(uint32_t branch_idx, uint32_t target_idx, rb_execution_context_t uint32_t cur_pos = cb->write_pos; cb_set_pos(cb, branch->start_pos); branch->gen_fn(cb, branch->dst_addrs[0], branch->dst_addrs[1], branch->shape); - RUBY_ASSERT(cb->write_pos == branch->end_pos); + RUBY_ASSERT(cb->write_pos == branch->end_pos && "branch can't change size"); cb_set_pos(cb, cur_pos); // Restore interpreter sp, since the code hitting the stub expects the original. |