harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjwashb...@apache.org
Subject svn commit: r516283 - in /harmony/enhanced/drlvm/trunk/vm: gc_cc/src/prepare.cpp gc_gen/src/common/gc_for_class.cpp include/open/vm.h vmcore/src/class_support/C_Interface.cpp vmcore/src/gc/root_set_enum_common.cpp vmcore/src/jvmti/jvmti_trace.cpp
Date Fri, 09 Mar 2007 03:49:55 GMT
Author: wjwashburn
Date: Thu Mar  8 19:49:54 2007
New Revision: 516283

URL: http://svn.apache.org/viewvc?view=rev&rev=516283
Log:
H3330, put back in the field_is_enumerable_reference
makes certain enumerable fields are !fh->is_magic_type()
build, build test runs on winxp32 and RHEL 4.0, gcc 4.0.2



Modified:
    harmony/enhanced/drlvm/trunk/vm/gc_cc/src/prepare.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp
    harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/gc_cc/src/prepare.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_cc/src/prepare.cpp?view=diff&rev=516283&r1=516282&r2=516283
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_cc/src/prepare.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_cc/src/prepare.cpp Thu Mar  8 19:49:54 2007
@@ -64,7 +64,7 @@
     unsigned idx;
     for(idx = 0; idx < num_fields; idx++) {
         Field_Handle fh = class_get_instance_field_recursive(ch, idx);
-        if(field_is_gc_enumerable(fh)) {
+		if(field_is_enumerable_reference(fh)) {
             num_ref_fields++;
         }
     }
@@ -93,7 +93,7 @@
 
     for(idx = 0; idx < num_fields; idx++) {
         Field_Handle fh = class_get_instance_field_recursive(ch, idx);
-        if(field_is_gc_enumerable(fh)) {
+		if(field_is_enumerable_reference(fh)){
             int offset = field_get_offset(fh);
             if (offset == skip) continue;
             *refs = offset;

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp?view=diff&rev=516283&r1=516282&r2=516283
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp Thu Mar  8 19:49:54
2007
@@ -70,7 +70,7 @@
   unsigned idx;
   for(idx = 0; idx < num_fields; idx++) {
     Field_Handle fh = class_get_instance_field_recursive(ch, idx);
-    if(field_is_gc_enumerable(fh)) {
+	if(field_is_enumerable_reference(fh)){
       num_ref_fields++;
     }
   }
@@ -102,7 +102,7 @@
   int *result = new_ref_array;
   for(unsigned int idx = 0; idx < num_fields; idx++) {
     Field_Handle fh = class_get_instance_field_recursive(ch, idx);
-    if(field_is_gc_enumerable(fh)) {
+	if(field_is_enumerable_reference(fh)) {
       int offset = field_get_offset(fh);
 #ifndef BUILD_IN_REFERENT
       if(is_reference && offset == gc_referent_offset) continue;

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm.h?view=diff&rev=516283&r1=516282&r2=516283
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Thu Mar  8 19:49:54 2007
@@ -430,12 +430,27 @@
  */ 
  VMEXPORT Class_Handle field_get_class(Field_Handle fh);
 
+
+/**
+ * @return <code>TRUE</code> if the field is of reference type
+ *
+ * This function doesn't cause resolution of the class of the field.
+ */
+ VMEXPORT Boolean field_is_reference(Field_Handle fh);
+
+/**
+ * @return <code>TRUE</code> if the field is a magic type field
+ *
+ * This function doesn't cause resolution of the class of the field.
+ */
+ VMEXPORT Boolean field_is_magic(Field_Handle fh);
+
 /**
  * @return <code>TRUE</code> if the field must be enumerated by GC
  *
  * This function doesn't cause resolution of the class of the field.
  */
- VMEXPORT Boolean field_is_gc_enumerable(Field_Handle fh);
+ VMEXPORT Boolean field_is_enumerable_reference(Field_Handle fh);
 
  /**
  * @return <code>TRUE</code> if the field is literal. In Java, it means that
the

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp?view=diff&rev=516283&r1=516282&r2=516283
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp Thu Mar  8 19:49:54
2007
@@ -1790,12 +1790,26 @@
 } //field_get_class_of_field_value
 
 
-Boolean field_is_gc_enumerable(Field_Handle fh)
+Boolean field_is_reference(Field_Handle fh)
 {
     assert((Field *)fh);
     Java_Type typ = field_get_type(fh);
-    return (typ == JAVA_TYPE_CLASS || typ == JAVA_TYPE_ARRAY) && !fh->is_magic_type();
+    return (typ == JAVA_TYPE_CLASS || typ == JAVA_TYPE_ARRAY);
 } //field_is_reference
+
+Boolean field_is_magic(Field_Handle fh)
+{
+    assert((Field *)fh);
+    
+    return fh->is_magic_type();
+} //field_is_magic
+
+
+Boolean field_is_enumerable_reference(Field_Handle fh)
+{
+    assert((Field *)fh);
+    return ((field_is_reference(fh) && !field_is_magic(fh)));
+} //field_is_enumerable_reference
 
 
 Boolean field_is_injected(Field_Handle f)

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp?view=diff&rev=516283&r1=516282&r2=516283
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp Thu Mar  8 19:49:54
2007
@@ -95,7 +95,7 @@
                 for(unsigned i = 0; i < n_fields; i++) {
                     Field* f = c->get_field(i);
                     if(f->is_static()) {
-                        if(field_is_gc_enumerable(f)) {
+						if(field_is_enumerable_reference(f)){
                             // The field is static and it is a reference.
                             if (global_env->compress_references) {
                                 vm_enumerate_compressed_root_reference((uint32 *)f->get_address(),
FALSE);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp?view=diff&rev=516283&r1=516282&r2=516283
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp Thu Mar  8 19:49:54 2007
@@ -100,7 +100,7 @@
         unsigned i;
         for (i = 0; i < num_fields; i++) {
             Field_Handle fh = class_get_instance_field_recursive(ch, i);
-            if (field_is_gc_enumerable(fh)) {
+			if(field_is_enumerable_reference(fh)){
                 int offset = field_get_offset(fh);
                 Slot slot((void*)((UDATA)referrer + offset));
                 if (slot.is_null()) continue;



Mime
View raw message