|
42 | 42 | import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
|
43 | 43 | import com.oracle.truffle.api.interop.InvalidArrayIndexException;
|
44 | 44 | import com.oracle.truffle.api.interop.UnknownIdentifierException;
|
45 |
| -import com.oracle.truffle.api.interop.UnsupportedMessageException; |
46 | 45 | import com.oracle.truffle.api.interop.UnsupportedTypeException;
|
47 | 46 | import com.oracle.truffle.api.nodes.Node;
|
48 | 47 | import com.oracle.truffle.api.object.DynamicObjectLibrary;
|
@@ -165,20 +164,10 @@ public RubyException argumentErrorNegativeArraySize(RubyBaseNode currentNode) {
|
165 | 164 | null);
|
166 | 165 | }
|
167 | 166 |
|
168 |
| - public RubyException argumentErrorTooLargeString(Node currentNode) { |
169 |
| - return argumentError( |
170 |
| - "result of string concatenation exceeds the system maximum string length (2^31-1 bytes)", |
171 |
| - currentNode); |
172 |
| - } |
173 |
| - |
174 | 167 | public RubyException argumentErrorCharacterRequired(Node currentNode) {
|
175 | 168 | return argumentError("%c requires a character", currentNode);
|
176 | 169 | }
|
177 | 170 |
|
178 |
| - public RubyException argumentErrorCantOmitPrecision(Node currentNode) { |
179 |
| - return argumentError("can't omit precision for a Float.", currentNode); |
180 |
| - } |
181 |
| - |
182 | 171 | @TruffleBoundary
|
183 | 172 | public RubyException argumentErrorUnknownKeywords(Object[] keys, Node currentNode) {
|
184 | 173 | if (keys.length == 1) {
|
@@ -567,10 +556,6 @@ public RubyException typeErrorCantDefineSingleton(Node currentNode) {
|
567 | 556 | return typeError("can't define singleton", currentNode);
|
568 | 557 | }
|
569 | 558 |
|
570 |
| - public RubyException typeErrorCantBeCastedToBigDecimal(Node currentNode) { |
571 |
| - return typeError("could not be casted to BigDecimal", currentNode); |
572 |
| - } |
573 |
| - |
574 | 559 | @TruffleBoundary
|
575 | 560 | public RubyException typeErrorCantConvertTo(Object from, String toClass, String methodUsed, Object result,
|
576 | 561 | Node currentNode) {
|
@@ -706,11 +691,6 @@ public RubyException typeErrorUnsupportedTypeException(UnsupportedTypeException
|
706 | 691 | return typeError("unsupported type " + formattedValues, currentNode);
|
707 | 692 | }
|
708 | 693 |
|
709 |
| - @TruffleBoundary |
710 |
| - public RubyException typeErrorUninitializedRegexp(Node currentNode) { |
711 |
| - return typeError("uninitialized Regexp", currentNode); |
712 |
| - } |
713 |
| - |
714 | 694 | // NameError
|
715 | 695 |
|
716 | 696 | @TruffleBoundary
|
@@ -830,24 +810,6 @@ public RubyNameError nameErrorImportNotFound(String name, Node currentNode) {
|
830 | 810 | return nameError(StringUtils.format("import '%s' not found", name), null, name, currentNode);
|
831 | 811 | }
|
832 | 812 |
|
833 |
| - @TruffleBoundary |
834 |
| - public RubyNameError nameErrorUnknownIdentifier(Object receiver, Object name, UnknownIdentifierException exception, |
835 |
| - Node currentNode) { |
836 |
| - return nameError(exception.getMessage(), receiver, name.toString(), currentNode); |
837 |
| - } |
838 |
| - |
839 |
| - @TruffleBoundary |
840 |
| - public RubyNameError nameErrorUnknownIdentifier(Object receiver, Object name, InvalidArrayIndexException exception, |
841 |
| - Node currentNode) { |
842 |
| - return nameError(exception.getMessage(), receiver, name.toString(), currentNode); |
843 |
| - } |
844 |
| - |
845 |
| - @TruffleBoundary |
846 |
| - public RubyNameError nameErrorUnsuportedMessage(Object receiver, Object name, UnsupportedMessageException exception, |
847 |
| - Node currentNode) { |
848 |
| - return nameError(exception.getMessage(), receiver, name.toString(), currentNode); |
849 |
| - } |
850 |
| - |
851 | 813 | @TruffleBoundary
|
852 | 814 | public RubyNameError nameErrorUnknownIdentifierException(
|
853 | 815 | UnknownIdentifierException exception, Object receiver, Node currentNode) {
|
@@ -1065,22 +1027,6 @@ public RubyException floatDomainError(String value, Node currentNode) {
|
1065 | 1027 | return ExceptionOperations.createRubyException(context, exceptionClass, errorMessage, currentNode, null);
|
1066 | 1028 | }
|
1067 | 1029 |
|
1068 |
| - public RubyException floatDomainErrorResultsToNaN(Node currentNode) { |
1069 |
| - return floatDomainError("Computation results to 'NaN'(Not a Number)", currentNode); |
1070 |
| - } |
1071 |
| - |
1072 |
| - public RubyException floatDomainErrorResultsToInfinity(Node currentNode) { |
1073 |
| - return floatDomainError("Computation results to 'Infinity'", currentNode); |
1074 |
| - } |
1075 |
| - |
1076 |
| - public RubyException floatDomainErrorResultsToNegInfinity(Node currentNode) { |
1077 |
| - return floatDomainError("Computation results to '-Infinity'", currentNode); |
1078 |
| - } |
1079 |
| - |
1080 |
| - public RubyException floatDomainErrorSqrtNegative(Node currentNode) { |
1081 |
| - return floatDomainError("(VpSqrt) SQRT(negative value)", currentNode); |
1082 |
| - } |
1083 |
| - |
1084 | 1030 | // IOError
|
1085 | 1031 |
|
1086 | 1032 | @TruffleBoundary
|
@@ -1271,21 +1217,6 @@ public RubyException securityError(String message, Node currentNode) {
|
1271 | 1217 | return ExceptionOperations.createRubyException(context, exceptionClass, errorMessage, currentNode, null);
|
1272 | 1218 | }
|
1273 | 1219 |
|
1274 |
| - // SystemCallError |
1275 |
| - |
1276 |
| - @TruffleBoundary |
1277 |
| - public RubySystemCallError systemCallError(String message, int errno, Backtrace backtrace) { |
1278 |
| - RubyClass exceptionClass = context.getCoreLibrary().systemCallErrorClass; |
1279 |
| - Object errorMessage; |
1280 |
| - if (message == null) { |
1281 |
| - errorMessage = Nil.INSTANCE; |
1282 |
| - } else { |
1283 |
| - errorMessage = StringOperations.createUTF8String(context, language, message); |
1284 |
| - } |
1285 |
| - return ExceptionOperations |
1286 |
| - .createSystemCallError(context, exceptionClass, errorMessage, errno, backtrace); |
1287 |
| - } |
1288 |
| - |
1289 | 1220 | // FFI::NullPointerError
|
1290 | 1221 |
|
1291 | 1222 | @TruffleBoundary
|
|
0 commit comments