Skip to content

Commit

Permalink
Remove ability to modify the array
Browse files Browse the repository at this point in the history
Array.copy still seems to work though
  • Loading branch information
radeusgd committed Aug 11, 2022
1 parent b71c50a commit f18628e
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.oracle.truffle.api.interop.TruffleObject;
import com.oracle.truffle.api.library.ExportLibrary;
import com.oracle.truffle.api.library.ExportMessage;
import org.enso.interpreter.dsl.AcceptsError;
import org.enso.interpreter.dsl.Builtin;
import org.enso.interpreter.node.expression.builtin.error.InvalidArrayIndexError;
import org.enso.interpreter.runtime.Context;
Expand Down Expand Up @@ -122,21 +121,6 @@ boolean isArrayElementReadable(long index) {
return index < getArraySize() && index >= 0;
}

@ExportMessage
void writeArrayElement(long index, Object value) {
items[(int) index] = value;
}

@ExportMessage
boolean isArrayElementModifiable(long index) {
return isArrayElementReadable(index);
}

@ExportMessage
boolean isArrayElementInsertable(long index) {
return false;
}

@ExportMessage
String toDisplayString(boolean b) {
return toString();
Expand Down

0 comments on commit f18628e

Please sign in to comment.