Skip to content

Commit

Permalink
Implement class*
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Feb 8, 2024
1 parent 782e45d commit 77c1ccb
Showing 1 changed file with 114 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ private boolean hasSucceeded() {
return failed() == 0;
}

private Object global(final String name) {
return context.lookup(name);
}

/////////////////////////////
// OBJECT REGISTRY HELPERS //
/////////////////////////////
Expand Down Expand Up @@ -322,11 +326,121 @@ private long byteSizeOf(final long oop) {
return 0L;
}

@SuppressWarnings("unused")
private long classAlien() {
return oopFor(global("Alien"));
}

@SuppressWarnings("unused")
private long classArray() {
return oopFor(context.arrayClass);
}

@SuppressWarnings("unused")
private long classBitmap() {
return oopFor(context.bitmapClass);
}

@SuppressWarnings("unused")
private long classByteArray() {
return oopFor(context.byteArrayClass);
}

@SuppressWarnings("unused")
private long classCharacter() {
return oopFor(context.characterClass);
}

@SuppressWarnings("unused")
private long classDoubleByteArray() {
return oopFor(global("DoubleByteArray"));
}

@SuppressWarnings("unused")
private long classDoubleWordArray() {
return oopFor(global("DoubleWordArray"));
}

@SuppressWarnings("unused")
private long classExternalAddress() {
return oopFor(global("ExternalAddress"));
}

@SuppressWarnings("unused")
private long classExternalData() {
return oopFor(global("ExternalData"));
}

@SuppressWarnings("unused")
private long classExternalFunction() {
return oopFor(global("ExternalFunction"));
}

@SuppressWarnings("unused")
private long classExternalLibrary() {
return oopFor(global("ExternalLibrary"));
}

@SuppressWarnings("unused")
private long classExternalStructure() {
return oopFor(global("ExternalStructure"));
}

@SuppressWarnings("unused")
private long classFloat() {
return oopFor(context.floatClass);
}

@SuppressWarnings("unused")
private long classFloat32Array() {
return oopFor(global("FloatArray"));
}

@SuppressWarnings("unused")
private long classFloat64Array() {
return oopFor(global("Float64Array"));
}

@SuppressWarnings("unused")
private long classLargeNegativeInteger() {
return oopFor(context.largeNegativeIntegerClass);
}

@SuppressWarnings("unused")
private long classLargePositiveIntegerClass() {
return oopFor(context.largePositiveIntegerClass);
}

@SuppressWarnings("unused")
private long classPoint() {
return oopFor(context.pointClass);
}

@SuppressWarnings("unused")
private long classSemaphore() {
return oopFor(context.semaphoreClass);
}

@SuppressWarnings("unused")
private long classSmallInteger() {
return oopFor(context.smallIntegerClass);
}

@SuppressWarnings("unused")
private long classString() {
return oopFor(context.byteStringClass);
}

@SuppressWarnings("unused")
private long classUnsafeAlien() {
return oopFor(global("UnsafeAlien"));
}

@SuppressWarnings("unused")
private long classWordArray() {
return oopFor(global("WordArray"));
}

@SuppressWarnings("unused")
public long failed() {
return primFailCode;
Expand Down

0 comments on commit 77c1ccb

Please sign in to comment.