Fix bugs for static fields/blocks and instanceof operation. To effectively support...
authorjzhou <jzhou>
Wed, 2 Mar 2011 00:42:13 +0000 (00:42 +0000)
committerjzhou <jzhou>
Wed, 2 Mar 2011 00:42:13 +0000 (00:42 +0000)
commitd7c4bd424a8f042fb032ce09db70af69df570c58
treec9ff7eb23041a896d13dacab4cc5846cb2bd92c6
parent2e7bf8dfdd7f579ad42f8a4c6ab838e31b5a3044
Fix bugs for static fields/blocks and instanceof operation.  To effectively support static fields/blocks, we need to generate a special version for methods that could be invoked in static blocks or when initializing static fields.  In the special version, if there are classes with static fields/blocks are involved, we'll check if the static fields have been initialized and if the static blocks have been executed.  Previously we misused C micros to implement this(MGC_STATIC_INIT_CHECK).  Now we remove this wrong macro and generate the required special version.  For instanceof operation, we fix two bugs.  One is that previously we did not take interfaces into consider and the other is that in the instanceof(struct Object *, int) function we did not check if the Object is NULL or not.  If the Object is NULL, we shall always return false.
Robust/src/ClassLibrary/MGC/gnu/TreeMap.java
Robust/src/ClassLibrary/MGC/gnu/TreeNode.java
Robust/src/IR/Flat/BuildCode.java
Robust/src/IR/Flat/BuildCodeMGC.java
Robust/src/Runtime/bamboo/multicoreruntime.c
Robust/src/Runtime/bamboo/multicoreruntime.h