Skip to content

Commit

Permalink
Share boxNode
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Oct 20, 2024
1 parent a623fbd commit 7bbab55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1238,14 +1238,14 @@ protected static final double doLong(final double lhs, final long rhs) {
@Specialization
protected static final Object doFloat(final double lhs, final FloatObject rhs,
@Bind("this") final Node node,
@Cached final AsFloatObjectIfNessaryNode boxNode) {
@Shared("boxNode") @Cached final AsFloatObjectIfNessaryNode boxNode) {
return boxNode.execute(node, lhs - rhs.getValue());
}

@Specialization(guards = "isFraction(rhs, node)")
protected static final Object doFraction(final double lhs, final PointersObject rhs,
@Bind("this") final Node node,
@Cached final AsFloatObjectIfNessaryNode boxNode,
@Shared("boxNode") @Cached final AsFloatObjectIfNessaryNode boxNode,
@Cached final AbstractPointersObjectNodes.AbstractPointersObjectReadNode readNode) {
return boxNode.execute(node, lhs - SqueakImageContext.fromFraction(rhs, readNode, node));
}
Expand Down

0 comments on commit 7bbab55

Please sign in to comment.