@@ -651,15 +651,13 @@ protected Object cloneSymbol(RubySymbol symbol, boolean freeze,
651
651
return symbol ;
652
652
}
653
653
654
- @ Specialization ( limit = "getRubyLibraryCacheLimit()" )
654
+ @ Specialization
655
655
protected RubyDynamicObject cloneImmutableRubyString (ImmutableRubyString self , boolean freeze ,
656
656
@ Cached ConditionProfile freezeProfile ,
657
- @ Cached ConditionProfile isFrozenProfile ,
658
- @ CachedLibrary ("self" ) RubyLibrary rubyLibrary ,
659
657
@ CachedLibrary (limit = "getRubyLibraryCacheLimit()" ) RubyLibrary rubyLibraryFreeze ,
660
658
@ Cached MakeStringNode makeStringNode ) {
661
659
final RubyDynamicObject newObject = makeStringNode .fromRope (self .rope );
662
- if (freezeProfile .profile (freeze ) && isFrozenProfile . profile ( rubyLibrary . isFrozen ( self )) ) {
660
+ if (freezeProfile .profile (freeze )) {
663
661
rubyLibraryFreeze .freeze (newObject );
664
662
}
665
663
@@ -1021,12 +1019,7 @@ public abstract static class InitializeDupCloneNode extends CoreMethodArrayArgum
1021
1019
@ Child private DispatchNode initializeCopyNode = DispatchNode .create ();
1022
1020
1023
1021
@ Specialization
1024
- protected Object initializeDup (VirtualFrame frame , RubyDynamicObject self , RubyDynamicObject from ) {
1025
- return initializeCopyNode .call (self , "initialize_copy" , from );
1026
- }
1027
-
1028
- @ Specialization
1029
- protected Object initializeDup (VirtualFrame frame , RubyDynamicObject self , ImmutableRubyString from ) {
1022
+ protected Object initializeDup (RubyDynamicObject self , Object from ) {
1030
1023
return initializeCopyNode .call (self , "initialize_copy" , from );
1031
1024
}
1032
1025
@@ -1685,20 +1678,7 @@ private void useCallerRefinements(VirtualFrame frame) {
1685
1678
public abstract static class RespondToMissingNode extends CoreMethodArrayArgumentsNode {
1686
1679
1687
1680
@ Specialization
1688
- protected boolean doesRespondToMissingString (Object object , RubyString name , Object unusedIncludeAll ) {
1689
- return false ;
1690
- }
1691
-
1692
- @ Specialization
1693
- protected boolean doesRespondToMissingImmutableString (
1694
- Object object ,
1695
- ImmutableRubyString name ,
1696
- Object unusedIncludeAll ) {
1697
- return false ;
1698
- }
1699
-
1700
- @ Specialization
1701
- protected boolean doesRespondToMissingSymbol (Object object , RubySymbol name , Object unusedIncludeAll ) {
1681
+ protected boolean doesRespondToMissing (Object object , Object name , Object unusedIncludeAll ) {
1702
1682
return false ;
1703
1683
}
1704
1684
0 commit comments