mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 05:41:32 +03:00
Rename the int64 package (#1148)
This commit is contained in:
parent
e38d1ab521
commit
cb8277c3a2
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
||||
import com.oracle.truffle.api.nodes.Node;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
||||
import com.oracle.truffle.api.nodes.Node;
|
@ -1,23 +1,21 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
||||
import com.oracle.truffle.api.nodes.Node;
|
||||
import org.enso.interpreter.dsl.BuiltinMethod;
|
||||
import org.enso.interpreter.node.expression.builtin.number.utils.BigIntegerOps;
|
||||
import org.enso.interpreter.node.expression.builtin.number.utils.ToEnsoNumberNode;
|
||||
import org.enso.interpreter.runtime.error.TypeError;
|
||||
import org.enso.interpreter.runtime.number.EnsoBigInteger;
|
||||
import org.enso.interpreter.runtime.type.TypesGen;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
@BuiltinMethod(type = "Small_Integer", name = "^", description = "Exponentation of numbers.")
|
||||
public abstract class PowNode extends Node {
|
||||
private @Child ToEnsoNumberNode toEnsoNumberNode = ToEnsoNumberNode.build();
|
||||
private @Child org.enso.interpreter.node.expression.builtin.number.int64.MultiplyNode
|
||||
private @Child org.enso.interpreter.node.expression.builtin.number.smallInteger.MultiplyNode
|
||||
longMultiplyNode =
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.MultiplyNode.build();
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.MultiplyNode.build();
|
||||
private @Child org.enso.interpreter.node.expression.builtin.number.bigInteger.MultiplyNode
|
||||
bigIntMultiplyNode =
|
||||
org.enso.interpreter.node.expression.builtin.number.bigInteger.MultiplyNode.build();
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.dsl.Fallback;
|
||||
import com.oracle.truffle.api.dsl.Specialization;
|
@ -1,4 +1,4 @@
|
||||
package org.enso.interpreter.node.expression.builtin.number.int64;
|
||||
package org.enso.interpreter.node.expression.builtin.number.smallInteger;
|
||||
|
||||
import com.oracle.truffle.api.nodes.Node;
|
||||
import org.enso.interpreter.dsl.BuiltinMethod;
|
@ -40,77 +40,77 @@ public class Number {
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"+",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.AddMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.AddMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"-",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.SubtractMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.SubtractMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"*",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.MultiplyMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.MultiplyMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"^",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.PowMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.PowMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"/",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.DivideMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.DivideMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"div",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.DivMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.DivMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"%",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.ModMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.ModMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"negate",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.NegateMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.NegateMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"abs",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.AbsMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.AbsMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"==",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.EqualsMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.EqualsMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
">",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.GreaterMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.GreaterMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
">=",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.GreaterOrEqualMethodGen
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.GreaterOrEqualMethodGen
|
||||
.makeFunction(language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"<",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.LessMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.LessMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"<=",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.LessOrEqualMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.LessOrEqualMethodGen.makeFunction(
|
||||
language));
|
||||
scope.registerMethod(
|
||||
smallInteger,
|
||||
"to_decimal",
|
||||
org.enso.interpreter.node.expression.builtin.number.int64.ToDecimalMethodGen.makeFunction(
|
||||
org.enso.interpreter.node.expression.builtin.number.smallInteger.ToDecimalMethodGen.makeFunction(
|
||||
language));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user