Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Small_Integer and Big_Integer types #7636

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@
- [Use `numpy` & co. from Enso!][7678]
- [Changed layout of local libraries directory, making it easier to reference
projects next to each other][7634]
- [Merge `Small_Integer` and `Big_Integer` types][7636]

[3227]: https://github.com/enso-org/enso/pull/3227
[3248]: https://github.com/enso-org/enso/pull/3248
Expand Down Expand Up @@ -1076,6 +1077,7 @@
[7613]: https://github.com/enso-org/enso/pull/7613
[7678]: https://github.com/enso-org/enso/pull/7678
[7634]: https://github.com/enso-org/enso/pull/7634
[7636]: https://github.com/enso-org/enso/pull/7636

# Enso 2.0.0-alpha.18 (2021-10-12)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5092,7 +5092,7 @@ class RuntimeServerTest
Api.ExecutionFailed(
contextId,
Api.ExecutionResult.Diagnostic.error(
"Type error: expected `that` to be Number, but got Function.",
"Type error: expected `that` to be Integer, but got Function.",
Some(mainFile),
Some(model.Range(model.Position(11, 8), model.Position(11, 17))),
None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,15 @@ class RuntimeVisualizationsTest
Api.ExpressionUpdate(
Main.idMainZ,
Some(ConstantsGen.INTEGER),
None,
Some(
Api.MethodCall(
Api.MethodPointer(
"Standard.Base.Data.Numbers",
"Standard.Base.Data.Numbers.Integer",
"+"
)
)
),
Vector(Api.ProfilingInfo.ExecutionTime(0)),
fromCache,
typeChanged,
Expand All @@ -209,7 +217,15 @@ class RuntimeVisualizationsTest
Api.ExpressionUpdate(
Main.idFooY,
Some(ConstantsGen.INTEGER),
None,
Some(
Api.MethodCall(
Api.MethodPointer(
"Standard.Base.Data.Numbers",
"Standard.Base.Data.Numbers.Integer",
"+"
)
)
),
Vector(Api.ProfilingInfo.ExecutionTime(0)),
fromCache,
typeChanged,
Expand All @@ -231,7 +247,15 @@ class RuntimeVisualizationsTest
Api.ExpressionUpdate(
Main.idFooZ,
Some(ConstantsGen.INTEGER),
None,
Some(
Api.MethodCall(
Api.MethodPointer(
"Standard.Base.Data.Numbers",
"Standard.Base.Data.Numbers.Integer",
"*"
)
)
),
Vector(Api.ProfilingInfo.ExecutionTime(0)),
fromCache,
typeChanged,
Expand Down Expand Up @@ -973,12 +997,30 @@ class RuntimeVisualizationsTest
contextId,
context.Main.idFooY,
ConstantsGen.INTEGER,
methodCall = Some(
Api.MethodCall(
Api.MethodPointer(
"Standard.Base.Data.Numbers",
"Standard.Base.Data.Numbers.Integer",
"+"
)
)
),
typeChanged = false
),
TestMessages.update(
contextId,
context.Main.idFooZ,
ConstantsGen.INTEGER,
methodCall = Some(
Api.MethodCall(
Api.MethodPointer(
"Standard.Base.Data.Numbers",
"Standard.Base.Data.Numbers.Integer",
"*"
)
)
),
typeChanged = false
),
context.executionComplete(contextId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ boolean doAnyType(Object expectedType, Object payload) {
@Specialization
boolean doLongCheck(Type expectedType, long payload) {
var numbers = EnsoContext.get(this).getBuiltins().number();
return checkParentTypes(numbers.getSmallInteger(), expectedType);
return checkParentTypes(numbers.getInteger(), expectedType);
}

@Specialization
Expand All @@ -97,7 +97,7 @@ boolean doDoubleCheck(Type expectedType, double payload) {
@Specialization
boolean doBigIntegerCheck(Type expectedType, EnsoBigInteger value) {
var numbers = EnsoContext.get(this).getBuiltins().number();
return checkParentTypes(numbers.getBigInteger(), expectedType);
return checkParentTypes(numbers.getInteger(), expectedType);
}

@Specialization
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading