10
10
package org .truffleruby .language .objects .shared ;
11
11
12
12
import com .oracle .truffle .api .dsl .Cached .Exclusive ;
13
- import org .truffleruby .Layouts ;
14
13
import org .truffleruby .collections .BoundaryIterable ;
15
14
import org .truffleruby .core .array .ArrayGuards ;
16
15
import org .truffleruby .core .array .ArrayOperations ;
29
28
import com .oracle .truffle .api .dsl .ImportStatic ;
30
29
import com .oracle .truffle .api .dsl .Specialization ;
31
30
import com .oracle .truffle .api .library .CachedLibrary ;
32
- import com .oracle .truffle .api .object .Shape ;
33
31
import com .oracle .truffle .api .profiles .ConditionProfile ;
34
32
35
33
/** Share the internal fields of an object, accessible by its Layout */
@@ -85,13 +83,8 @@ protected void shareCachedQueue(RubyQueue object,
85
83
}
86
84
}
87
85
88
- @ Specialization (
89
- guards = { "object.getShape() == cachedShape" , "!hasFinalizerRef" },
90
- assumptions = "cachedShape.getValidAssumption()" ,
91
- limit = "CACHE_LIMIT" )
92
- protected void shareCachedBasicObject (RubyBasicObject object ,
93
- @ Cached ("object.getShape()" ) Shape cachedShape ,
94
- @ Cached ("hasFinalizerRefProperty(cachedShape)" ) boolean hasFinalizerRef ) {
86
+ @ Specialization
87
+ protected void shareCachedBasicObject (RubyBasicObject object ) {
95
88
/* No internal fields for RubyBasicObject */
96
89
}
97
90
@@ -111,10 +104,6 @@ protected static boolean isDelegatedObjectArray(RubyArray array) {
111
104
return store instanceof DelegatedArrayStorage && ((DelegatedArrayStorage ) store ).hasObjectArrayStorage ();
112
105
}
113
106
114
- protected static boolean hasFinalizerRefProperty (Shape shape ) {
115
- return shape .hasProperty (Layouts .FINALIZER_REF_IDENTIFIER );
116
- }
117
-
118
107
protected WriteBarrierNode createWriteBarrierNode () {
119
108
return WriteBarrierNodeGen .create (depth );
120
109
}
0 commit comments