Fix a shadow field related bug in the compiler. Defined in Java language specificatio...
authorjzhou <jzhou>
Thu, 24 Feb 2011 01:04:32 +0000 (01:04 +0000)
committerjzhou <jzhou>
Thu, 24 Feb 2011 01:04:32 +0000 (01:04 +0000)
commitd69f4fd2a29d864321f01ffc2b0a642e8fd80ed1
tree372581eacb2d4e2ade968b17c31614c4950f0f75
parentc2946b5ce88dc24554c081a79f194d3f0fc929f7
Fix a shadow field related bug in the compiler. Defined in Java language specification, if the class declares a field with a certain name, then the declaration of that field is said to hide any and all accessible declarations of fields with the same name in superclasses, and superinterfaces of the class. However, the hidden fields in superclasses or superinterfaces can still be accessed by using a qualified name (if it is static) or by using a field access expression that contains the keyword super or a cast to a superclass type. Previously, our compiler simply discarded all the hidden fields so that the hidden fields can never be accessed. Now we maitain all the fields including the hidden ones. We prefix the name of the class that defines the field to the field's name to differentiate the shadow field and the hidden fields. Some of the hard coded fields dereference in the Runtime C code are fixed accordingly. Now the unit tests, multicore benchmarks and oooJava related benchmarks are checked to be OK. But (D)STM related Runtime code are NOT checked yet.
Robust/src/IR/ClassDescriptor.java
Robust/src/IR/FieldDescriptor.java
Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/bamboo/multicoreruntime.c
Robust/src/Runtime/object.c
Robust/src/Runtime/runtime.c
Robust/src/Runtime/socket.c
Robust/src/Runtime/thread.c