From: Stefan Ring Date: Wed, 26 Nov 2008 10:43:56 +0000 (+0100) Subject: Merge from subtype. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=3a16b0602c73972b42f6db5280092e57e38b4287;hp=4a653a918f49c4322acb009b881c60aa03797ca8;p=cacao.git Merge from subtype. --HG-- branch : subtype-trunk rename : src/vmcore/linker.c => src/vm/linker.cpp --- diff --git a/src/vm/linker.cpp b/src/vm/linker.cpp index a29ffaa86..50639b736 100644 --- a/src/vm/linker.cpp +++ b/src/vm/linker.cpp @@ -531,7 +531,7 @@ static bool linker_overwrite_method(methodinfo *mg, *******************************************************************************/ -static void build_display(classinfo *c) +static classinfo *build_display(classinfo *c) { int depth, i; int depth_fixed; @@ -558,7 +558,8 @@ static void build_display(classinfo *c) super = c->super; } while (false); if (super) { - build_display(super); + if (!link_class(super)) + return NULL; depth = super->vftbl->subtype_depth + 1; } else /* java.lang.Object doesn't have a super class. */ @@ -586,6 +587,8 @@ static void build_display(classinfo *c) c->vftbl->subtype_display[i] = NULL; c->vftbl->subtype_offset = OFFSET(vftbl_t, subtype_display[0]) + sizeof(vftbl_t*) * depth_fixed; c->vftbl->subtype_depth = depth; + + return c; } #endif @@ -995,7 +998,8 @@ static classinfo *link_class_intern(classinfo *c) RT_TIMING_GET_TIME(time_subclasses); #if USES_NEW_SUBTYPE - build_display(c); + if (!build_display(c)) + return NULL; #endif /* revert the linking state and class is linked */