Skip to content

Commit bc4af8c

Browse files
committed
fixed lookup of some special methods
1 parent 34098c2 commit bc4af8c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ PComplex complexFromDouble(Object cls, double real, @SuppressWarnings("unused")
407407
@Specialization(guards = "isNoValue(imag)", limit = "1")
408408
PComplex complexFromDouble(VirtualFrame frame, Object cls, PFloat real, @SuppressWarnings("unused") PNone imag,
409409
@CachedLibrary("real") PythonObjectLibrary objectLib,
410-
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
410+
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
411411
return complexFromObject(frame, cls, real, imag, objectLib, methodLib);
412412
}
413413

@@ -424,7 +424,7 @@ PComplex complexFromLong(Object cls, long real, @SuppressWarnings("unused") PNon
424424
@Specialization(guards = "isNoValue(imag)", limit = "1")
425425
PComplex complexFromLong(VirtualFrame frame, Object cls, PInt real, @SuppressWarnings("unused") PNone imag,
426426
@CachedLibrary("real") PythonObjectLibrary objectLib,
427-
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
427+
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
428428
return complexFromObject(frame, cls, real, imag, objectLib, methodLib);
429429
}
430430

@@ -476,7 +476,7 @@ PComplex complexFromComplexLong(VirtualFrame frame, Object cls, Object one, long
476476
@Specialization(guards = "!isString(one)", limit = "1")
477477
PComplex complexFromComplexDouble(VirtualFrame frame, Object cls, Object one, double two,
478478
@CachedLibrary("one") PythonObjectLibrary objectLib,
479-
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
479+
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
480480
PComplex value = getComplexNumberFromObject(frame, one, objectLib, methodLib);
481481
if (value == null) {
482482
if (objectLib.canBeJavaDouble(one)) {
@@ -491,7 +491,7 @@ PComplex complexFromComplexDouble(VirtualFrame frame, Object cls, Object one, do
491491
@Specialization(guards = "!isString(one)", limit = "1")
492492
PComplex complexFromComplexPInt(VirtualFrame frame, Object cls, Object one, PInt two,
493493
@CachedLibrary("one") PythonObjectLibrary objectLib,
494-
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
494+
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
495495
PComplex value = getComplexNumberFromObject(frame, one, objectLib, methodLib);
496496
if (value == null) {
497497
if (objectLib.canBeJavaDouble(one)) {
@@ -506,7 +506,7 @@ PComplex complexFromComplexPInt(VirtualFrame frame, Object cls, Object one, PInt
506506
@Specialization(guards = "!isString(one)", limit = "1")
507507
PComplex complexFromComplexComplex(VirtualFrame frame, Object cls, Object one, PComplex two,
508508
@CachedLibrary("one") PythonObjectLibrary objectLib,
509-
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
509+
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
510510
PComplex value = getComplexNumberFromObject(frame, one, objectLib, methodLib);
511511
if (value == null) {
512512
if (methodLib.canBeJavaDouble(one)) {
@@ -521,7 +521,7 @@ PComplex complexFromComplexComplex(VirtualFrame frame, Object cls, Object one, P
521521
@Specialization(guards = {"!isString(one)", "!isNoValue(two)", "!isPComplex(two)"})
522522
PComplex complexFromComplexObject(VirtualFrame frame, Object cls, Object one, Object two,
523523
@CachedLibrary(limit = "2") PythonObjectLibrary objectLib,
524-
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
524+
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
525525
PComplex oneValue = getComplexNumberFromObject(frame, one, objectLib, methodLib);
526526
if (objectLib.canBeJavaDouble(two)) {
527527
double twoValue = objectLib.asJavaDouble(two);
@@ -1392,7 +1392,7 @@ Object parseBytesError(VirtualFrame frame, Object cls, PBytesLike arg, @Suppress
13921392
@Specialization(guards = "isNoValue(base)", limit = "1")
13931393
Object parsePInt(VirtualFrame frame, Object cls, PString arg, @SuppressWarnings("unused") PNone base,
13941394
@CachedLibrary("arg") PythonObjectLibrary lib,
1395-
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
1395+
@CachedLibrary(limit = "1") PythonObjectLibrary methodLib) {
13961396
Object result = callInt(frame, arg, lib, methodLib);
13971397
if (result != PNone.NO_VALUE) {
13981398
return result;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,7 @@ Object repr(VirtualFrame frame, Object obj,
17111711
throw raise(TypeError, ErrorMessages.RETURNED_NON_STRING, "__repr__", obj);
17121712
}
17131713

1714-
@TruffleBoundary
1714+
@TruffleBoundary
17151715
private static String strFormat(String fmt, Object... objects) {
17161716
return String.format(fmt, objects);
17171717
}

0 commit comments

Comments
 (0)