@@ -159,6 +159,7 @@ public class CoreLibrary {
159
159
public final RubyClass arrayClass ;
160
160
public final Shape arrayShape ;
161
161
public final RubyClass basicObjectClass ;
162
+ public final RubyClass bindingClass ;
162
163
public final Shape bindingShape ;
163
164
public final RubyClass classClass ;
164
165
public final Shape classShape ;
@@ -170,6 +171,7 @@ public class CoreLibrary {
170
171
public final RubyClass encodingErrorClass ;
171
172
public final RubyClass exceptionClass ;
172
173
public final RubyClass falseClass ;
174
+ public final RubyClass fiberClass ;
173
175
public final Shape fiberShape ;
174
176
public final RubyClass floatClass ;
175
177
public final RubyClass floatDomainErrorClass ;
@@ -182,6 +184,7 @@ public class CoreLibrary {
182
184
public final RubyClass ioErrorClass ;
183
185
public final RubyClass loadErrorClass ;
184
186
public final RubyClass localJumpErrorClass ;
187
+ public final RubyClass matchDataClass ;
185
188
public final Shape matchDataShape ;
186
189
public final RubyClass moduleClass ;
187
190
public final RubyClass nameErrorClass ;
@@ -203,6 +206,7 @@ public class CoreLibrary {
203
206
public final Shape objectRangeShape ;
204
207
public final RubyClass rangeErrorClass ;
205
208
public final RubyClass rationalClass ;
209
+ public final RubyClass regexpClass ;
206
210
public final Shape regexpShape ;
207
211
public final RubyClass regexpErrorClass ;
208
212
public final RubyClass graalErrorClass ;
@@ -221,6 +225,7 @@ public class CoreLibrary {
221
225
public final RubyClass systemExitClass ;
222
226
public final RubyClass threadClass ;
223
227
public final Shape threadShape ;
228
+ public final RubyClass threadBacktraceLocationClass ;
224
229
public final Shape threadBacktraceLocationShape ;
225
230
public final RubyClass trueClass ;
226
231
public final RubyClass typeErrorClass ;
@@ -254,17 +259,23 @@ public class CoreLibrary {
254
259
public final Shape bigDecimalShape ;
255
260
public final RubyClass encodingCompatibilityErrorClass ;
256
261
public final RubyClass encodingUndefinedConversionErrorClass ;
262
+ public final RubyClass methodClass ;
257
263
public final Shape methodShape ;
264
+ public final RubyClass unboundMethodClass ;
258
265
public final Shape unboundMethodShape ;
266
+ public final RubyClass byteArrayClass ;
259
267
public final Shape byteArrayShape ;
260
268
public final RubyClass fiberErrorClass ;
261
269
public final RubyClass threadErrorClass ;
262
270
public final RubyModule objectSpaceModule ;
271
+ public final RubyClass randomizerClass ;
263
272
public final Shape randomizerShape ;
273
+ public final RubyClass handleClass ;
264
274
public final Shape handleShape ;
265
275
public final RubyClass ioClass ;
266
276
public final RubyClass closedQueueErrorClass ;
267
277
public final RubyModule warningModule ;
278
+ public final RubyClass digestClass ;
268
279
public final Shape digestShape ;
269
280
public final RubyClass structClass ;
270
281
public final RubyClass weakMapClass ;
@@ -381,15 +392,15 @@ public CoreLibrary(RubyContext context) {
381
392
classShape = classClass .getShape ();
382
393
classClass .instanceShape = classShape ;
383
394
384
- basicObjectClass = ClassNodes .createBootClass (context , null , classShape , Nil .INSTANCE , "BasicObject" );
395
+ basicObjectClass = ClassNodes .createBootClass (context , null , classClass , Nil .INSTANCE , "BasicObject" );
385
396
Shape basicObjectShape = createShape (RubyBasicObject .class , basicObjectClass );
386
397
basicObjectClass .instanceShape = basicObjectShape ;
387
398
388
- objectClass = ClassNodes .createBootClass (context , null , classShape , basicObjectClass , "Object" );
399
+ objectClass = ClassNodes .createBootClass (context , null , classClass , basicObjectClass , "Object" );
389
400
objectShape = createShape (RubyBasicObject .class , objectClass );
390
401
objectClass .instanceShape = objectShape ;
391
402
392
- moduleClass = ClassNodes .createBootClass (context , null , classShape , objectClass , "Module" );
403
+ moduleClass = ClassNodes .createBootClass (context , null , classClass , objectClass , "Module" );
393
404
Shape moduleShape = createShape (RubyModule .class , moduleClass );
394
405
moduleClass .instanceShape = moduleShape ;
395
406
@@ -494,7 +505,7 @@ public CoreLibrary(RubyContext context) {
494
505
arrayClass = defineClass ("Array" );
495
506
arrayShape = createShape (RubyArray .class , arrayClass );
496
507
arrayClass .instanceShape = arrayShape ;
497
- RubyClass bindingClass = defineClass ("Binding" );
508
+ bindingClass = defineClass ("Binding" );
498
509
bindingShape = createShape (RubyBinding .class , bindingClass );
499
510
bindingClass .instanceShape = bindingShape ;
500
511
RubyClass conditionVariableClass = defineClass ("ConditionVariable" );
@@ -506,17 +517,17 @@ public CoreLibrary(RubyContext context) {
506
517
encodingShape = createShape (RubyEncoding .class , encodingClass );
507
518
encodingClass .instanceShape = encodingShape ;
508
519
falseClass = defineClass ("FalseClass" );
509
- RubyClass fiberClass = defineClass ("Fiber" );
520
+ fiberClass = defineClass ("Fiber" );
510
521
fiberShape = createShape (RubyFiber .class , fiberClass );
511
522
fiberClass .instanceShape = fiberShape ;
512
523
defineModule ("FileTest" );
513
524
hashClass = defineClass ("Hash" );
514
525
hashShape = createShape (RubyHash .class , hashClass );
515
526
hashClass .instanceShape = hashShape ;
516
- RubyClass matchDataClass = defineClass ("MatchData" );
527
+ matchDataClass = defineClass ("MatchData" );
517
528
matchDataShape = createShape (RubyMatchData .class , matchDataClass );
518
529
matchDataClass .instanceShape = matchDataShape ;
519
- RubyClass methodClass = defineClass ("Method" );
530
+ methodClass = defineClass ("Method" );
520
531
methodShape = createShape (RubyMethod .class , methodClass );
521
532
methodClass .instanceShape = methodShape ;
522
533
RubyClass mutexClass = defineClass ("Mutex" );
@@ -540,7 +551,7 @@ public CoreLibrary(RubyContext context) {
540
551
objectRangeShape = createShape (RubyObjectRange .class , rangeClass );
541
552
rangeClass .instanceShape = objectRangeShape ;
542
553
543
- RubyClass regexpClass = defineClass ("Regexp" );
554
+ regexpClass = defineClass ("Regexp" );
544
555
regexpShape = createShape (RubyRegexp .class , regexpClass );
545
556
regexpClass .instanceShape = regexpShape ;
546
557
stringClass = defineClass ("String" );
@@ -555,14 +566,14 @@ public CoreLibrary(RubyContext context) {
555
566
threadClass .instanceShape = threadShape ;
556
567
557
568
RubyClass threadBacktraceClass = defineClass (threadClass , objectClass , "Backtrace" );
558
- RubyClass threadBacktraceLocationClass = defineClass (threadBacktraceClass , objectClass , "Location" );
569
+ threadBacktraceLocationClass = defineClass (threadBacktraceClass , objectClass , "Location" );
559
570
threadBacktraceLocationShape = createShape (RubyBacktraceLocation .class , threadBacktraceLocationClass );
560
571
threadBacktraceLocationClass .instanceShape = threadBacktraceLocationShape ;
561
572
RubyClass timeClass = defineClass ("Time" );
562
573
Shape timeShape = createShape (RubyTime .class , timeClass );
563
574
timeClass .instanceShape = timeShape ;
564
575
trueClass = defineClass ("TrueClass" );
565
- RubyClass unboundMethodClass = defineClass ("UnboundMethod" );
576
+ unboundMethodClass = defineClass ("UnboundMethod" );
566
577
unboundMethodShape = createShape (RubyUnboundMethod .class , unboundMethodClass );
567
578
unboundMethodClass .instanceShape = unboundMethodShape ;
568
579
ioClass = defineClass ("IO" );
@@ -652,7 +663,7 @@ public CoreLibrary(RubyContext context) {
652
663
defineModule (truffleModule , "ReadlineHistory" );
653
664
truffleThreadOperationsModule = defineModule (truffleModule , "ThreadOperations" );
654
665
defineModule (truffleModule , "WeakRefOperations" );
655
- RubyClass handleClass = defineClass (truffleModule , objectClass , "Handle" );
666
+ handleClass = defineClass (truffleModule , objectClass , "Handle" );
656
667
handleShape = createShape (RubyHandle .class , handleClass );
657
668
handleClass .instanceShape = handleShape ;
658
669
warningModule = defineModule ("Warning" );
@@ -671,18 +682,18 @@ public CoreLibrary(RubyContext context) {
671
682
672
683
truffleTypeModule = defineModule (truffleModule , "Type" );
673
684
674
- RubyClass byteArrayClass = defineClass (truffleModule , objectClass , "ByteArray" );
685
+ byteArrayClass = defineClass (truffleModule , objectClass , "ByteArray" );
675
686
byteArrayShape = createShape (RubyByteArray .class , byteArrayClass );
676
687
byteArrayClass .instanceShape = byteArrayShape ;
677
688
defineClass (truffleModule , objectClass , "StringData" );
678
689
defineClass (encodingClass , objectClass , "Transcoding" );
679
- RubyClass randomizerClass = defineClass (truffleModule , objectClass , "Randomizer" );
690
+ randomizerClass = defineClass (truffleModule , objectClass , "Randomizer" );
680
691
randomizerShape = createShape (RubyRandomizer .class , randomizerClass );
681
692
randomizerClass .instanceShape = randomizerShape ;
682
693
683
694
// Standard library
684
695
685
- RubyClass digestClass = defineClass (truffleModule , basicObjectClass , "Digest" );
696
+ digestClass = defineClass (truffleModule , basicObjectClass , "Digest" );
686
697
digestShape = createShape (RubyDigest .class , digestClass );
687
698
digestClass .instanceShape = digestShape ;
688
699
@@ -692,9 +703,9 @@ public CoreLibrary(RubyContext context) {
692
703
693
704
// Create some key objects
694
705
695
- mainObject = new RubyBasicObject (objectShape );
706
+ mainObject = new RubyBasicObject (objectClass , objectShape );
696
707
emptyDescriptor = new FrameDescriptor (Nil .INSTANCE );
697
- argv = new RubyArray (arrayShape , ArrayStoreLibrary .INITIAL_STORE , 0 );
708
+ argv = new RubyArray (arrayClass , arrayShape , ArrayStoreLibrary .INITIAL_STORE , 0 );
698
709
699
710
globalVariables = new GlobalVariables ();
700
711
0 commit comments