@@ -111,29 +111,30 @@ protected boolean objectEqual(Object a, Object b,
111
111
}
112
112
}
113
113
114
+ // GR-44289: Using only dispatched libraries in this node as a workaround for that issue
114
115
public abstract static class ObjectFreezeNode extends RubyBaseNode {
115
116
116
117
public abstract Object execute (Object self );
117
118
118
- @ Specialization (guards = "!isRubyDynamicObject(self)" , limit = "getRubyLibraryCacheLimit()" )
119
+ @ Specialization (guards = "!isRubyDynamicObject(self)" )
119
120
protected Object freeze (Object self ,
120
- @ CachedLibrary ("self " ) RubyLibrary rubyLibrary ) {
121
+ @ CachedLibrary (limit = "getRubyLibraryCacheLimit() " ) RubyLibrary rubyLibrary ) {
121
122
rubyLibrary .freeze (self );
122
123
return self ;
123
124
}
124
125
125
- @ Specialization (guards = "!metaClass.isSingleton" , limit = "getRubyLibraryCacheLimit() " )
126
+ @ Specialization (guards = "!metaClass.isSingleton" , limit = "1 " )
126
127
protected Object freezeNormalObject (RubyDynamicObject self ,
127
- @ CachedLibrary ("self " ) RubyLibrary rubyLibrary ,
128
+ @ CachedLibrary (limit = "getRubyLibraryCacheLimit() " ) RubyLibrary rubyLibrary ,
128
129
@ Cached MetaClassNode metaClassNode ,
129
130
@ Bind ("metaClassNode.execute(self)" ) RubyClass metaClass ) {
130
131
rubyLibrary .freeze (self );
131
132
return self ;
132
133
}
133
134
134
- @ Specialization (guards = "metaClass.isSingleton" , limit = "getRubyLibraryCacheLimit() " )
135
+ @ Specialization (guards = "metaClass.isSingleton" , limit = "1 " )
135
136
protected Object freezeSingletonObject (RubyDynamicObject self ,
136
- @ CachedLibrary ("self " ) RubyLibrary rubyLibrary ,
137
+ @ CachedLibrary (limit = "getRubyLibraryCacheLimit() " ) RubyLibrary rubyLibrary ,
137
138
@ CachedLibrary (limit = "1" ) RubyLibrary rubyLibraryMetaClass ,
138
139
@ Cached ConditionProfile singletonClassUnfrozenProfile ,
139
140
@ Cached MetaClassNode metaClassNode ,
0 commit comments