summaryrefslogtreecommitdiff
path: root/yjit_core.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2021-04-20 16:14:35 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:34 -0400
commit60496b6666765ab8cb63816ca1d525fcfbcf7abc (patch)
tree62c62a60774f299a0e008997addcd1ea496a7f1d /yjit_core.c
parentef5cfcae0dd8de244333b52ff3cc80afb8ddbcb4 (diff)
Pass self type through method calls
Diffstat (limited to 'yjit_core.c')
-rw-r--r--yjit_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/yjit_core.c b/yjit_core.c
index 56450840cd..31ee57baf4 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -160,8 +160,6 @@ Set the type of an instruction operand
*/
void ctx_set_opnd_type(ctx_t* ctx, insn_opnd_t opnd, val_type_t type)
{
- RUBY_ASSERT(opnd.idx < ctx->stack_size);
-
if (opnd.is_self) {
ctx->self_type = type;
return;
@@ -170,6 +168,7 @@ void ctx_set_opnd_type(ctx_t* ctx, insn_opnd_t opnd, val_type_t type)
if (ctx->stack_size > MAX_TEMP_TYPES)
return;
+ RUBY_ASSERT(opnd.idx < ctx->stack_size);
temp_mapping_t mapping = ctx->temp_mapping[ctx->stack_size - 1 - opnd.idx];
switch (mapping.kind)