diff src/share/vm/classfile/classFileParser.cpp @ 856:75596850f863

6862576: vmIntrinsics needs cleanup in order to support JSR 292 intrinsics Summary: remove useless lazy evaluation of intrinsics; add LAST_COMPILER_INLINE to help categorize them Reviewed-by: kvn
author jrose
date Tue, 21 Jul 2009 16:56:06 -0700
parents e5b0439ef4ae
children 494244ae0171
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp	Fri Jul 17 00:50:55 2009 -0700
+++ b/src/share/vm/classfile/classFileParser.cpp	Tue Jul 21 16:56:06 2009 -0700
@@ -3231,6 +3231,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,