Mercurial > hg > graal-compiler
comparison src/share/vm/prims/methodHandles.cpp @ 10137:ce6d7e43501c
8012961: Do not restrict static interface methods to be private
Summary: Lambda changes; spec 0.6.2 - remove the restriction that was added as part of recent changes made to support upcoming changes to compilation of lambda methods.
Reviewed-by: dholmes, acorn
author | bharadwaj |
---|---|
date | Tue, 23 Apr 2013 08:12:14 -0700 |
parents | 6337ca4dcad8 |
children | 746b070f5022 |
comparison
equal
deleted
inserted
replaced
10136:cc12becb22e7 | 10137:ce6d7e43501c |
---|---|
190 receiver_limit = mklass; | 190 receiver_limit = mklass; |
191 if (m->is_initializer()) { | 191 if (m->is_initializer()) { |
192 flags |= IS_CONSTRUCTOR | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT); | 192 flags |= IS_CONSTRUCTOR | (JVM_REF_invokeSpecial << REFERENCE_KIND_SHIFT); |
193 } else if (mods.is_static()) { | 193 } else if (mods.is_static()) { |
194 flags |= IS_METHOD | (JVM_REF_invokeStatic << REFERENCE_KIND_SHIFT); | 194 flags |= IS_METHOD | (JVM_REF_invokeStatic << REFERENCE_KIND_SHIFT); |
195 // Check if this method is a lambda method that is generated as | 195 // Get vindex from itable if method holder is an interface. |
196 // private static method. | 196 if (m->method_holder()->is_interface()) { |
197 if (m->is_private() && m->method_holder()->is_interface()) { | |
198 vmindex = klassItable::compute_itable_index(m); | 197 vmindex = klassItable::compute_itable_index(m); |
199 } | 198 } |
200 } else if (receiver_limit != mklass && | 199 } else if (receiver_limit != mklass && |
201 !receiver_limit->is_subtype_of(mklass)) { | 200 !receiver_limit->is_subtype_of(mklass)) { |
202 return NULL; // bad receiver limit | 201 return NULL; // bad receiver limit |