@@ -64,13 +64,13 @@ public final class ValueWrapperManager {
64
64
65
65
private volatile HandleBlockWeakReference [] blockMap = new HandleBlockWeakReference [0 ];
66
66
67
- public static HandleBlockHolder getBlockHolder (RubyContext context , RubyLanguage language ) {
67
+ public static HandleBlockHolder getBlockHolder (RubyLanguage language ) {
68
68
return language .getCurrentFiber ().handleData ;
69
69
}
70
70
71
71
@ TruffleBoundary
72
- public synchronized HandleBlock addToBlockMap (RubyContext context , RubyLanguage language ) {
73
- HandleBlock block = new HandleBlock (context , language , this );
72
+ public synchronized HandleBlock addToBlockMap (RubyLanguage language ) {
73
+ HandleBlock block = new HandleBlock (language , this );
74
74
int blockIndex = block .getIndex ();
75
75
HandleBlockWeakReference [] map = growMapIfRequired (blockMap , blockIndex );
76
76
blockMap = map ;
@@ -80,9 +80,9 @@ public synchronized HandleBlock addToBlockMap(RubyContext context, RubyLanguage
80
80
}
81
81
82
82
@ TruffleBoundary
83
- public HandleBlock addToSharedBlockMap (RubyContext context , RubyLanguage language ) {
83
+ public HandleBlock addToSharedBlockMap (RubyLanguage language ) {
84
84
synchronized (language ) {
85
- HandleBlock block = new HandleBlock (context , language , this );
85
+ HandleBlock block = new HandleBlock (language , this );
86
86
int blockIndex = block .getIndex ();
87
87
HandleBlockWeakReference [] map = growMapIfRequired (language .handleBlockSharedMap , blockIndex );
88
88
language .handleBlockSharedMap = map ;
@@ -143,7 +143,7 @@ public void freeAllBlocksInMap() {
143
143
}
144
144
}
145
145
146
- public void cleanup (RubyContext context , HandleBlockHolder holder ) {
146
+ public void cleanup (HandleBlockHolder holder ) {
147
147
holder .handleBlock = null ;
148
148
}
149
149
@@ -205,7 +205,7 @@ public static final class HandleBlock {
205
205
206
206
@ SuppressWarnings ("unused" ) private Cleanable cleanable ;
207
207
208
- public HandleBlock (RubyContext context , RubyLanguage language , ValueWrapperManager manager ) {
208
+ public HandleBlock (RubyLanguage language , ValueWrapperManager manager ) {
209
209
HandleBlockAllocator allocator = language .handleBlockAllocator ;
210
210
long base = allocator .getFreeBlock ();
211
211
this .base = base ;
@@ -287,7 +287,7 @@ static long allocateHandleOnKnownThread(Node node, ValueWrapper wrapper) {
287
287
wrapper ,
288
288
getContext (node ),
289
289
getLanguage (node ),
290
- getBlockHolder (getContext ( node ), getLanguage (node )),
290
+ getBlockHolder (getLanguage (node )),
291
291
false );
292
292
}
293
293
@@ -301,7 +301,7 @@ static long allocateSharedHandleOnKnownThread(Node node, ValueWrapper wrapper) {
301
301
wrapper ,
302
302
getContext (node ),
303
303
getLanguage (node ),
304
- getBlockHolder (getContext ( node ), getLanguage (node )),
304
+ getBlockHolder (getLanguage (node )),
305
305
true );
306
306
}
307
307
@@ -329,10 +329,10 @@ protected static long allocateHandle(Node node, ValueWrapper wrapper, RubyContex
329
329
330
330
if (block == null || block .isFull ()) {
331
331
if (shared ) {
332
- block = context .getValueWrapperManager ().addToSharedBlockMap (context , language );
332
+ block = context .getValueWrapperManager ().addToSharedBlockMap (language );
333
333
holder .sharedHandleBlock = block ;
334
334
} else {
335
- block = context .getValueWrapperManager ().addToBlockMap (context , language );
335
+ block = context .getValueWrapperManager ().addToBlockMap (language );
336
336
holder .handleBlock = block ;
337
337
}
338
338
@@ -346,8 +346,8 @@ protected static boolean isSharedObject(ValueWrapper wrapper) {
346
346
}
347
347
348
348
public static HandleBlock allocateNewBlock (RubyContext context , RubyLanguage language ) {
349
- HandleBlockHolder holder = getBlockHolder (context , language );
350
- HandleBlock block = context .getValueWrapperManager ().addToBlockMap (context , language );
349
+ HandleBlockHolder holder = getBlockHolder (language );
350
+ HandleBlock block = context .getValueWrapperManager ().addToBlockMap (language );
351
351
352
352
holder .handleBlock = block ;
353
353
return block ;
0 commit comments