1.1 --- a/src/share/vm/oops/constMethodKlass.cpp Fri Jun 01 15:30:44 2012 -0700 1.2 +++ b/src/share/vm/oops/constMethodKlass.cpp Wed Jun 06 14:33:43 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -80,7 +80,7 @@ 1.11 No_Safepoint_Verifier no_safepoint; 1.12 cm->set_interpreter_kind(Interpreter::invalid); 1.13 cm->init_fingerprint(); 1.14 - cm->set_method(NULL); 1.15 + cm->set_constants(NULL); 1.16 cm->set_stackmap_data(NULL); 1.17 cm->set_exception_table(NULL); 1.18 cm->set_code_size(byte_code_size); 1.19 @@ -98,7 +98,7 @@ 1.20 void constMethodKlass::oop_follow_contents(oop obj) { 1.21 assert (obj->is_constMethod(), "object must be constMethod"); 1.22 constMethodOop cm = constMethodOop(obj); 1.23 - MarkSweep::mark_and_push(cm->adr_method()); 1.24 + MarkSweep::mark_and_push(cm->adr_constants()); 1.25 MarkSweep::mark_and_push(cm->adr_stackmap_data()); 1.26 MarkSweep::mark_and_push(cm->adr_exception_table()); 1.27 // Performance tweak: We skip iterating over the klass pointer since we 1.28 @@ -110,7 +110,7 @@ 1.29 oop obj) { 1.30 assert (obj->is_constMethod(), "object must be constMethod"); 1.31 constMethodOop cm_oop = constMethodOop(obj); 1.32 - PSParallelCompact::mark_and_push(cm, cm_oop->adr_method()); 1.33 + PSParallelCompact::mark_and_push(cm, cm_oop->adr_constants()); 1.34 PSParallelCompact::mark_and_push(cm, cm_oop->adr_stackmap_data()); 1.35 PSParallelCompact::mark_and_push(cm, cm_oop->adr_exception_table()); 1.36 // Performance tweak: We skip iterating over the klass pointer since we 1.37 @@ -121,7 +121,7 @@ 1.38 int constMethodKlass::oop_oop_iterate(oop obj, OopClosure* blk) { 1.39 assert (obj->is_constMethod(), "object must be constMethod"); 1.40 constMethodOop cm = constMethodOop(obj); 1.41 - blk->do_oop(cm->adr_method()); 1.42 + blk->do_oop(cm->adr_constants()); 1.43 blk->do_oop(cm->adr_stackmap_data()); 1.44 blk->do_oop(cm->adr_exception_table()); 1.45 // Get size before changing pointers. 1.46 @@ -135,7 +135,7 @@ 1.47 assert (obj->is_constMethod(), "object must be constMethod"); 1.48 constMethodOop cm = constMethodOop(obj); 1.49 oop* adr; 1.50 - adr = cm->adr_method(); 1.51 + adr = cm->adr_constants(); 1.52 if (mr.contains(adr)) blk->do_oop(adr); 1.53 adr = cm->adr_stackmap_data(); 1.54 if (mr.contains(adr)) blk->do_oop(adr); 1.55 @@ -153,7 +153,7 @@ 1.56 int constMethodKlass::oop_adjust_pointers(oop obj) { 1.57 assert(obj->is_constMethod(), "should be constMethod"); 1.58 constMethodOop cm = constMethodOop(obj); 1.59 - MarkSweep::adjust_pointer(cm->adr_method()); 1.60 + MarkSweep::adjust_pointer(cm->adr_constants()); 1.61 MarkSweep::adjust_pointer(cm->adr_stackmap_data()); 1.62 MarkSweep::adjust_pointer(cm->adr_exception_table()); 1.63 // Get size before changing pointers. 1.64 @@ -188,8 +188,8 @@ 1.65 assert(obj->is_constMethod(), "must be constMethod"); 1.66 Klass::oop_print_on(obj, st); 1.67 constMethodOop m = constMethodOop(obj); 1.68 - st->print(" - method: " INTPTR_FORMAT " ", (address)m->method()); 1.69 - m->method()->print_value_on(st); st->cr(); 1.70 + st->print(" - constants: " INTPTR_FORMAT " ", (address)m->constants()); 1.71 + m->constants()->print_value_on(st); st->cr(); 1.72 st->print(" - exceptions: " INTPTR_FORMAT "\n", (address)m->exception_table()); 1.73 if (m->has_stackmap_table()) { 1.74 st->print(" - stackmap data: "); 1.75 @@ -223,8 +223,8 @@ 1.76 // Verification can occur during oop construction before the method or 1.77 // other fields have been initialized. 1.78 if (!obj->partially_loaded()) { 1.79 - guarantee(m->method()->is_perm(), "should be in permspace"); 1.80 - guarantee(m->method()->is_method(), "should be method"); 1.81 + guarantee(m->constants()->is_perm(), "should be in permspace"); 1.82 + guarantee(m->constants()->is_constantPool(), "should be constant pool"); 1.83 typeArrayOop stackmap_data = m->stackmap_data(); 1.84 guarantee(stackmap_data == NULL || 1.85 stackmap_data->is_perm(), "should be in permspace");