@@ -29,28 +29,28 @@ public static void setSize(RubyArray array, int size) {
29
29
array .size = size ;
30
30
}
31
31
32
- public static RubyArray createArray (RubyContext context , Object store , int size ) {
32
+ public static RubyArray createArray (RubyContext context , RubyLanguage language , Object store , int size ) {
33
33
assert !(store instanceof Object []) || store .getClass () == Object [].class ;
34
- return new RubyArray (context .getCoreLibrary ().arrayClass , RubyLanguage .arrayShape , store , size );
34
+ return new RubyArray (context .getCoreLibrary ().arrayClass , language .arrayShape , store , size );
35
35
}
36
36
37
- public static RubyArray createArray (RubyContext context , int [] store ) {
38
- return createArray (context , store , store .length );
37
+ public static RubyArray createArray (RubyContext context , RubyLanguage language , int [] store ) {
38
+ return createArray (context , language , store , store .length );
39
39
}
40
40
41
- public static RubyArray createArray (RubyContext context , long [] store ) {
42
- return createArray (context , store , store .length );
41
+ public static RubyArray createArray (RubyContext context , RubyLanguage language , long [] store ) {
42
+ return createArray (context , language , store , store .length );
43
43
}
44
44
45
- public static RubyArray createArray (RubyContext context , Object [] store ) {
45
+ public static RubyArray createArray (RubyContext context , RubyLanguage language , Object [] store ) {
46
46
assert store .getClass () == Object [].class ;
47
- return createArray (context , store , store .length );
47
+ return createArray (context , language , store , store .length );
48
48
}
49
49
50
- public static RubyArray createEmptyArray (RubyContext context ) {
50
+ public static RubyArray createEmptyArray (RubyContext context , RubyLanguage language ) {
51
51
return new RubyArray (
52
52
context .getCoreLibrary ().arrayClass ,
53
- RubyLanguage .arrayShape ,
53
+ language .arrayShape ,
54
54
ArrayStoreLibrary .INITIAL_STORE ,
55
55
0 );
56
56
}
@@ -72,14 +72,15 @@ public static Object specializedJavaArrayOf(ArrayBuilderNode builder, Object...
72
72
}
73
73
74
74
/** Returns a Ruby array backed by a store of the narrowest possible type, holding {@code object}. */
75
- public static RubyArray specializedRubyArrayOf (RubyContext context , ArrayBuilderNode builder , Object object ) {
76
- return createArray (context , specializedJavaArrayOf (builder , object ), 1 );
75
+ public static RubyArray specializedRubyArrayOf (RubyContext context , RubyLanguage language , ArrayBuilderNode builder ,
76
+ Object object ) {
77
+ return createArray (context , language , specializedJavaArrayOf (builder , object ), 1 );
77
78
}
78
79
79
80
/** Returns a Ruby array backed by a store of the narrowest possible type, holding the {@code objects}. */
80
- public static RubyArray specializedRubyArrayOf (RubyContext context , ArrayBuilderNode builder ,
81
+ public static RubyArray specializedRubyArrayOf (RubyContext context , RubyLanguage language , ArrayBuilderNode builder ,
81
82
Object ... objects ) {
82
- return createArray (context , specializedJavaArrayOf (builder , objects ), objects .length );
83
+ return createArray (context , language , specializedJavaArrayOf (builder , objects ), objects .length );
83
84
}
84
85
85
86
}
0 commit comments