hotspot/src/share/vm/classfile/classFileParser.cpp
changeset 3579 b18b94266d60
parent 3575 224791e7ecab
parent 3273 6acf7084b1d3
child 3693 af387bf37e8d
child 3820 0a8fbbe180db
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon Jul 27 09:06:22 2009 -0700
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon Jul 27 17:23:52 2009 -0400
@@ -3237,6 +3237,16 @@
     this_klass->set_minor_version(minor_version);
     this_klass->set_major_version(major_version);
 
+    // Set up methodOop::intrinsic_id as soon as we know the names of methods.
+    // (We used to do this lazily, but now we query it in Rewriter,
+    // which is eagerly done for every method, so we might as well do it now,
+    // when everything is fresh in memory.)
+    if (methodOopDesc::klass_id_for_intrinsics(this_klass->as_klassOop()) != vmSymbols::NO_SID) {
+      for (int j = 0; j < methods->length(); j++) {
+        ((methodOop)methods->obj_at(j))->init_intrinsic_id();
+      }
+    }
+
     if (cached_class_file_bytes != NULL) {
       // JVMTI: we have an instanceKlass now, tell it about the cached bytes
       this_klass->set_cached_class_file(cached_class_file_bytes,