summaryrefslogtreecommitdiff
path: root/yjit_core.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-04-09 12:16:56 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:33 -0400
commit4442029ec496754fcad38fa05c3d03553a38107e (patch)
tree45cb8167de03dc0cd19c41acc3201f10e7a2da7e /yjit_core.c
parent4ea2e753f65e1e7f4c62330abda256b3b56e72d4 (diff)
move assert. opnd.idx doesn't make sense for OPND_SELF
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 68d4f976a3..8657f05ca3 100644
--- a/yjit_core.c
+++ b/yjit_core.c
@@ -137,14 +137,13 @@ Get the type of an instruction operand
val_type_t
ctx_get_opnd_type(const ctx_t* ctx, insn_opnd_t opnd)
{
- RUBY_ASSERT(opnd.idx < ctx->stack_size);
-
if (opnd.is_self)
return ctx->self_type;
if (ctx->stack_size > MAX_TEMP_TYPES)
return TYPE_UNKNOWN;
+ RUBY_ASSERT(opnd.idx < ctx->stack_size);
temp_mapping_t mapping = ctx->temp_mapping[ctx->stack_size - 1 - opnd.idx];
switch (mapping.kind)