VM: shorter definition of emit_check

locals-and-roots
Björn Lindqvist 2016-05-29 04:55:11 +02:00
parent b027285b48
commit 4509371f7c
1 changed files with 2 additions and 7 deletions

View File

@ -47,13 +47,8 @@ struct inline_cache_jit : public jit {
/* Allocates memory */ /* Allocates memory */
void inline_cache_jit::emit_check(cell klass) { void inline_cache_jit::emit_check(cell klass) {
cell code_template; cell i = TAG(klass) == FIXNUM_TYPE ? PIC_CHECK_TAG : PIC_CHECK_TUPLE;
if (TAG(klass) == FIXNUM_TYPE) emit_with_literal(parent->special_objects[i], klass);
code_template = parent->special_objects[PIC_CHECK_TAG];
else
code_template = parent->special_objects[PIC_CHECK_TUPLE];
emit_with_literal(code_template, klass);
} }
/* index: 0 = top of stack, 1 = item underneath, etc /* index: 0 = top of stack, 1 = item underneath, etc