From 8f3a479b3a88faf126d3d16262b3d35c32416aeb Mon Sep 17 00:00:00 2001 From: jzhou Date: Thu, 24 Mar 2011 00:12:27 +0000 Subject: [PATCH] Bug fixes for gc --- Robust/src/IR/Tree/SemanticCheck.java | 2 +- Robust/src/Runtime/bamboo/multicoremem.c | 2 -- Robust/src/Runtime/runtime.h | 4 ++++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Robust/src/IR/Tree/SemanticCheck.java b/Robust/src/IR/Tree/SemanticCheck.java index ea430cfc..cc4e0463 100644 --- a/Robust/src/IR/Tree/SemanticCheck.java +++ b/Robust/src/IR/Tree/SemanticCheck.java @@ -723,7 +723,7 @@ public class SemanticCheck { Descriptor d=(Descriptor)nametable.get(varname); if (d==null) { ClassDescriptor cd = null; - if(((MethodDescriptor)md).isStaticBlock()) { + if((md instanceof MethodDescriptor) && ((MethodDescriptor)md).isStaticBlock()) { // this is a static block, all the accessed fields should be static field cd = ((MethodDescriptor)md).getClassDesc(); SymbolTable fieldtbl = cd.getFieldTable(); diff --git a/Robust/src/Runtime/bamboo/multicoremem.c b/Robust/src/Runtime/bamboo/multicoremem.c index 61d79cf9..d225683e 100644 --- a/Robust/src/Runtime/bamboo/multicoremem.c +++ b/Robust/src/Runtime/bamboo/multicoremem.c @@ -316,8 +316,6 @@ void * fixedmalloc_I(int coren, int j = 0; int k = 0; int gccorenum = (coren < NUMCORES4GC) ? (coren) : (coren % NUMCORES4GC); - int coords_x = bamboo_cpu2coords[gccorenum*2]; - int coords_y = bamboo_cpu2coords[gccorenum*2+1]; int ii = 1; int tofindb = gc_core2block[2*core2test[gccorenum][k]+i]+(NUMCORES4GC*2)*j; int totest = tofindb; diff --git a/Robust/src/Runtime/runtime.h b/Robust/src/Runtime/runtime.h index 8f9e5f4b..291244b3 100644 --- a/Robust/src/Runtime/runtime.h +++ b/Robust/src/Runtime/runtime.h @@ -100,7 +100,11 @@ void failedboundschk(); void failednullptr(); void abort_task(); void injectinstructionfailure(); +#ifdef MULTICORE +void createstartupobject(int argc, char ** argv); +#else void createstartupobject(); +#endif #ifdef PRECISE_GC #define VAR(name) ___params___->name -- 2.34.1