X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Fbuiltin.cpp;h=cd53c03dd4c51e11d7391c256fefc82b9085a596;hb=219e4a46e3d127d3c0883ee2e8635b4fe3c94d60;hp=5dbd12a7520dda46fab14008d0e0265fefdd58d2;hpb=5fd66d7079226750d364952b1b305d97e38f808b;p=cacao.git diff --git a/src/vm/jit/builtin.cpp b/src/vm/jit/builtin.cpp index 5dbd12a75..cd53c03dd 100644 --- a/src/vm/jit/builtin.cpp +++ b/src/vm/jit/builtin.cpp @@ -655,15 +655,11 @@ bool builtin_canstore(java_handle_objectarray_t *oa, java_handle_t *o) bool fast_subtype_check(struct _vftbl *s, struct _vftbl *t) { - int i; if (s->subtype_display[t->subtype_depth] == t) return true; if (t->subtype_offset != OFFSET(vftbl_t, subtype_display[DISPLAY_SIZE])) return false; - for (i=0; isubtype_overflow_length; i++) - if (s->subtype_overflow[i] == t) - return true; - return false; + return s->subtype_depth >= t->subtype_depth && s->subtype_overflow[t->subtype_depth - DISPLAY_SIZE] == t; } bool builtin_fast_canstore(java_objectarray_t *oa, java_object_t *o)