-void inline_cache_jit::compile_inline_cache(fixnum index,
- cell generic_word_,
- cell methods_,
- cell cache_entries_,
- bool tail_call_p)
-{
- data_root<word> generic_word(generic_word_,parent);
- data_root<array> methods(methods_,parent);
- data_root<array> cache_entries(cache_entries_,parent);
-
- cell inline_cache_type = parent->determine_inline_cache_type(cache_entries.untagged());
- parent->update_pic_count(inline_cache_type);
-
- /* Generate machine code to determine the object's class. */
- emit_with_literal(parent->special_objects[PIC_LOAD],tag_fixnum(-index * sizeof(cell)));
- emit(parent->special_objects[inline_cache_type]);
-
- /* Generate machine code to check, in turn, if the class is one of the cached entries. */
- cell i;
- for(i = 0; i < array_capacity(cache_entries.untagged()); i += 2)
- {
- /* Class equal? */
- cell klass = array_nth(cache_entries.untagged(),i);
- emit_check(klass);
-
- /* Yes? Jump to method */
- cell method = array_nth(cache_entries.untagged(),i + 1);
- emit_with_literal(parent->special_objects[PIC_HIT],method);
- }
-
- /* If none of the above conditionals tested true, then execution "falls
- through" to here. */
-
- /* A stack frame is set up, since the inline-cache-miss sub-primitive
- makes a subroutine call to the VM. */
- emit(parent->special_objects[JIT_PROLOG]);
-
- /* The inline-cache-miss sub-primitive call receives enough information to
- reconstruct the PIC with the new entry. */
- push(generic_word.value());
- push(methods.value());
- push(tag_fixnum(index));
- push(cache_entries.value());
-
- emit_subprimitive(
- parent->special_objects[tail_call_p ? PIC_MISS_TAIL_WORD : PIC_MISS_WORD],
- true, /* tail_call_p */
- true); /* stack_frame_p */
+void inline_cache_jit::compile_inline_cache(fixnum index, cell generic_word_,
+ cell methods_, cell cache_entries_,
+ bool tail_call_p) {
+ data_root<word> generic_word(generic_word_, parent);
+ data_root<array> methods(methods_, parent);
+ data_root<array> cache_entries(cache_entries_, parent);
+
+ cell inline_cache_type =
+ parent->determine_inline_cache_type(cache_entries.untagged());
+ parent->update_pic_count(inline_cache_type);
+
+ /* Generate machine code to determine the object's class. */
+ emit_with_literal(parent->special_objects[PIC_LOAD],
+ tag_fixnum(-index * sizeof(cell)));
+ emit(parent->special_objects[inline_cache_type]);
+
+ /* Generate machine code to check, in turn, if the class is one of the cached
+ * entries. */
+ cell i;
+ for (i = 0; i < array_capacity(cache_entries.untagged()); i += 2) {
+ /* Class equal? */
+ cell klass = array_nth(cache_entries.untagged(), i);
+ emit_check(klass);
+
+ /* Yes? Jump to method */
+ cell method = array_nth(cache_entries.untagged(), i + 1);
+ emit_with_literal(parent->special_objects[PIC_HIT], method);
+ }
+
+ /* If none of the above conditionals tested true, then execution "falls
+ through" to here. */
+
+ /* A stack frame is set up, since the inline-cache-miss sub-primitive
+ makes a subroutine call to the VM. */
+ emit(parent->special_objects[JIT_PROLOG]);
+
+ /* The inline-cache-miss sub-primitive call receives enough information to
+ reconstruct the PIC with the new entry. */
+ push(generic_word.value());
+ push(methods.value());
+ push(tag_fixnum(index));
+ push(cache_entries.value());
+
+ emit_subprimitive(
+ parent->special_objects[tail_call_p ? PIC_MISS_TAIL_WORD : PIC_MISS_WORD],
+ true, /* tail_call_p */
+ true); /* stack_frame_p */