VM: shorter definition of emit_check
parent
b027285b48
commit
4509371f7c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue