@@ -845,16 +845,18 @@ public static GetAttrNode create() {
845
845
public abstract Object executeWithArgs (VirtualFrame frame , Object primary , String name , Object defaultValue );
846
846
847
847
@ SuppressWarnings ("unused" )
848
- @ Specialization (limit = "getIntOption(getContext(), AttributeAccessInlineCacheMaxDepth)" , guards = {"name.equals (cachedName)" , "isNoValue(defaultValue)" })
848
+ @ Specialization (limit = "getIntOption(getContext(), AttributeAccessInlineCacheMaxDepth)" , guards = {"stringEquals (cachedName, name, stringProfile )" , "isNoValue(defaultValue)" })
849
849
public Object getAttrDefault (VirtualFrame frame , Object primary , String name , PNone defaultValue ,
850
+ @ Cached ("createBinaryProfile()" ) ConditionProfile stringProfile ,
850
851
@ Cached ("name" ) String cachedName ,
851
852
@ Cached ("create(name)" ) GetFixedAttributeNode getAttributeNode ) {
852
853
return getAttributeNode .executeObject (frame , primary );
853
854
}
854
855
855
856
@ SuppressWarnings ("unused" )
856
- @ Specialization (limit = "getIntOption(getContext(), AttributeAccessInlineCacheMaxDepth)" , guards = {"name.equals (cachedName)" , "!isNoValue(defaultValue)" })
857
+ @ Specialization (limit = "getIntOption(getContext(), AttributeAccessInlineCacheMaxDepth)" , guards = {"stringEquals (cachedName, name, stringProfile )" , "!isNoValue(defaultValue)" })
857
858
Object getAttr (VirtualFrame frame , Object primary , String name , Object defaultValue ,
859
+ @ Cached ("createBinaryProfile()" ) ConditionProfile stringProfile ,
858
860
@ Cached ("name" ) String cachedName ,
859
861
@ Cached ("create(name)" ) GetFixedAttributeNode getAttributeNode ,
860
862
@ Cached ("create()" ) IsBuiltinClassProfile errorProfile ) {
0 commit comments