Skip to content

Commit

Permalink
Add unnecessary Builtin annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Dec 18, 2024
1 parent 4dbfdb6 commit fab5b90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/** The main runtime type for Enso's Text. */
@ExportLibrary(InteropLibrary.class)
@Builtin(stdlibName = "Standard.Base.Data.Text.Text", name = "Text")
public final class Text extends BuiltinObject {
private static final Lock LOCK = new ReentrantLock();
private static final Text EMPTY = new Text("");
Expand All @@ -33,12 +34,10 @@ private enum FcdNormalized {
}

private Text(String string) {
super("Text");
this.contents = string;
}

private Text(ConcatRope contents) {
super("Text");
this.contents = contents;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.oracle.truffle.api.library.ExportLibrary;
import com.oracle.truffle.api.library.ExportMessage;
import com.oracle.truffle.api.profiles.BranchProfile;
import org.enso.interpreter.dsl.Builtin;
import org.enso.interpreter.runtime.builtin.BuiltinObject;

/**
Expand All @@ -23,12 +24,12 @@
*/
@ExportLibrary(InteropLibrary.class)
@ImportStatic(BranchProfile.class)
@Builtin(stdlibName = "Standard.Base.Data.Array.Array", name = "Array")
final class ArrayProxy extends BuiltinObject {
private final long length;
private final Object at;

private ArrayProxy(long length, Object at) {
super("Array");
assert length >= 0;
assert InteropLibrary.getUncached().isExecutable(at);
this.length = length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import com.oracle.truffle.api.library.ExportLibrary;
import com.oracle.truffle.api.library.ExportMessage;
import java.math.BigInteger;
import org.enso.interpreter.dsl.Builtin;
import org.enso.interpreter.runtime.builtin.BuiltinObject;

/** Internal wrapper for a {@link BigInteger}. */
@ExportLibrary(InteropLibrary.class)
@Builtin(stdlibName = "Standard.Base.Data.Number.Integer", name = "Integer")
public final class EnsoBigInteger extends BuiltinObject {
private final BigInteger value;

Expand All @@ -19,7 +21,6 @@ public final class EnsoBigInteger extends BuiltinObject {
* @param value the value to wrap.
*/
public EnsoBigInteger(BigInteger value) {
super("Integer");
assert (value.bitLength() > 63) : "Too small BigInteger: " + value;
this.value = value;
}
Expand Down

0 comments on commit fab5b90

Please sign in to comment.