|
22 | 22 | import com.oracle.graal.python.runtime.PythonCore;
|
23 | 23 | import com.oracle.graal.python.runtime.object.PythonObjectFactory;
|
24 | 24 | import com.oracle.truffle.api.CompilerDirectives;
|
| 25 | +import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; |
25 | 26 | import com.oracle.truffle.api.dsl.Cached;
|
26 | 27 | import com.oracle.truffle.api.dsl.GenerateNodeFactory;
|
27 | 28 | import com.oracle.truffle.api.dsl.ImportStatic;
|
@@ -111,6 +112,7 @@ enum SpecialType {
|
111 | 112 | PINF, // 5, positive infinity
|
112 | 113 | NAN; // 6, Not a Number
|
113 | 114 |
|
| 115 | + @TruffleBoundary |
114 | 116 | static SpecialType ofDouble(double d) {
|
115 | 117 | if (Double.isFinite(d)) {
|
116 | 118 | if (d != 0) {
|
@@ -335,6 +337,7 @@ PComplex doGeneral(Object r, Object phi,
|
335 | 337 | return rect(rLib.asJavaDouble(r), phiLib.asJavaDouble(phi));
|
336 | 338 | }
|
337 | 339 |
|
| 340 | + @TruffleBoundary |
338 | 341 | private PComplex rect(double r, double phi) {
|
339 | 342 | // deal with special values
|
340 | 343 | if (!Double.isFinite(r) || !Double.isFinite(phi)) {
|
@@ -423,6 +426,7 @@ private PComplex log(PComplex z) {
|
423 | 426 | return factory().createComplex(real, imag);
|
424 | 427 | }
|
425 | 428 |
|
| 429 | + @TruffleBoundary |
426 | 430 | private double computeRealPart(double real, double imag) {
|
427 | 431 | double ax = Math.abs(real);
|
428 | 432 | double ay = Math.abs(imag);
|
|
0 commit comments