diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-01-22 13:29:09 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:27 -0400 |
commit | dea4db16c03b3befc14a0de9b51489d9382258a3 (patch) | |
tree | de602f107bff3e0a7a70bc2716c8009ca4e84932 /ujit_codegen.c | |
parent | d528cf4fd5551c323484c2ffb79b56af0c6f50c4 (diff) |
Add support for multiple versions per block
Diffstat (limited to 'ujit_codegen.c')
-rw-r--r-- | ujit_codegen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ujit_codegen.c b/ujit_codegen.c index 5b9372c6ff..9ecf636dc3 100644 --- a/ujit_codegen.c +++ b/ujit_codegen.c @@ -44,7 +44,7 @@ jit_next_idx(jitstate_t* jit) static VALUE jit_get_arg(jitstate_t* jit, size_t arg_idx) { - assert (arg_idx + 1 < insn_len(jit_get_opcode(jit))); + RUBY_ASSERT(arg_idx + 1 < (size_t)insn_len(jit_get_opcode(jit))); return *(jit->pc + arg_idx + 1); } @@ -107,7 +107,7 @@ Returns `NULL` if compilation fails. uint8_t* ujit_entry_prologue() { - assert (cb != NULL); + RUBY_ASSERT(cb != NULL); if (cb->write_pos + 1024 >= cb->mem_size) { rb_bug("out of executable memory"); @@ -133,8 +133,8 @@ Compile a sequence of bytecode instructions for a given basic block version void ujit_gen_block(ctx_t* ctx, block_t* block) { - assert (cb != NULL); - assert (block != NULL); + RUBY_ASSERT(cb != NULL); + RUBY_ASSERT(block != NULL); const rb_iseq_t *iseq = block->blockid.iseq; uint32_t insn_idx = block->blockid.idx; |