Skip to content

Commit 6b51951

Browse files
committed
Adjust sum function
1 parent ddc78a0 commit 6b51951

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,12 +1828,6 @@ private int sumIntInternal(VirtualFrame frame, Object arg1, int start, PythonObj
18281828
}
18291829
}
18301830

1831-
@Specialization(rewriteOn = UnexpectedResultException.class)
1832-
double sumDoubleNone(VirtualFrame frame, Object arg1, @SuppressWarnings("unused") PNone start,
1833-
@Shared("lib") @CachedLibrary(limit = "getCallSiteInlineCacheMaxDepth()") PythonObjectLibrary lib) throws UnexpectedResultException {
1834-
return sumDoubleInternal(frame, arg1, 0, lib);
1835-
}
1836-
18371831
@Specialization(rewriteOn = UnexpectedResultException.class)
18381832
double sumDoubleDouble(VirtualFrame frame, Object arg1, double start,
18391833
@Shared("lib") @CachedLibrary(limit = "getCallSiteInlineCacheMaxDepth()") PythonObjectLibrary lib) throws UnexpectedResultException {
@@ -1862,7 +1856,7 @@ private double sumDoubleInternal(VirtualFrame frame, Object arg1, double start,
18621856
}
18631857
}
18641858

1865-
@Specialization(replaces = {"sumIntNone", "sumIntInt", "sumDoubleNone", "sumDoubleDouble"})
1859+
@Specialization(replaces = {"sumIntNone", "sumIntInt", "sumDoubleDouble"})
18661860
Object sum(VirtualFrame frame, Object arg1, Object start,
18671861
@Shared("lib") @CachedLibrary(limit = "getCallSiteInlineCacheMaxDepth()") PythonObjectLibrary lib,
18681862
@Cached("createBinaryProfile()") ConditionProfile hasStart,
@@ -1898,7 +1892,7 @@ private Object iterateGeneric(VirtualFrame frame, Object iterator, Object start,
18981892
}
18991893
}
19001894

1901-
@Builtin(name = "globals", minNumOfPositionalArgs = 0)
1895+
@Builtin(name = "globals")
19021896
@GenerateNodeFactory
19031897
public abstract static class GlobalsNode extends PythonBuiltinNode {
19041898
@Child private ReadCallerFrameNode readCallerFrameNode = ReadCallerFrameNode.create();
@@ -1933,7 +1927,7 @@ public static GlobalsNode create() {
19331927
}
19341928
}
19351929

1936-
@Builtin(name = "locals", minNumOfPositionalArgs = 0, needsFrame = true, alwaysNeedsCallerFrame = true)
1930+
@Builtin(name = "locals", needsFrame = true, alwaysNeedsCallerFrame = true)
19371931
@GenerateNodeFactory
19381932
abstract static class LocalsNode extends PythonBuiltinNode {
19391933

0 commit comments

Comments
 (0)