comparison src/share/vm/runtime/vmStructs.cpp @ 7590:fe1472c87a27

8005592: ClassLoaderDataGraph::_unloading incorrectly defined as nonstatic in vmStructs Summary: Added assertion to catch problem earlier and removed the unused field Reviewed-by: dholmes, acorn
author mikael
date Mon, 14 Jan 2013 11:00:56 -0800
parents 4a916f2ce331
children f422634e5828 e94ed1591b42
comparison
equal deleted inserted replaced
7589:5b6a231e5a86 7590:fe1472c87a27
715 \ 715 \
716 nonstatic_field(ClassLoaderData, _class_loader, oop) \ 716 nonstatic_field(ClassLoaderData, _class_loader, oop) \
717 nonstatic_field(ClassLoaderData, _next, ClassLoaderData*) \ 717 nonstatic_field(ClassLoaderData, _next, ClassLoaderData*) \
718 \ 718 \
719 static_field(ClassLoaderDataGraph, _head, ClassLoaderData*) \ 719 static_field(ClassLoaderDataGraph, _head, ClassLoaderData*) \
720 nonstatic_field(ClassLoaderDataGraph, _unloading, ClassLoaderData*) \
721 \ 720 \
722 /*******************/ \ 721 /*******************/ \
723 /* GrowableArrays */ \ 722 /* GrowableArrays */ \
724 /*******************/ \ 723 /*******************/ \
725 \ 724 \
2573 #define GENERATE_VM_STRUCT_LAST_ENTRY() \ 2572 #define GENERATE_VM_STRUCT_LAST_ENTRY() \
2574 { NULL, NULL, NULL, 0, 0, NULL } 2573 { NULL, NULL, NULL, 0, 0, NULL }
2575 2574
2576 // This macro checks the type of a VMStructEntry by comparing pointer types 2575 // This macro checks the type of a VMStructEntry by comparing pointer types
2577 #define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ 2576 #define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
2578 {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName; } 2577 {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName; \
2578 assert(offset_of(typeName, fieldName) < sizeof(typeName), "Illegal nonstatic struct entry, field offset too large"); }
2579 2579
2580 // This macro checks the type of a volatile VMStructEntry by comparing pointer types 2580 // This macro checks the type of a volatile VMStructEntry by comparing pointer types
2581 #define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ 2581 #define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
2582 {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; } 2582 {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; }
2583 2583