File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/floats Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 80
80
import com .oracle .graal .python .builtins .modules .MathGuards ;
81
81
import com .oracle .graal .python .builtins .objects .PNone ;
82
82
import com .oracle .graal .python .builtins .objects .PNotImplemented ;
83
- import com .oracle .graal .python .builtins .objects .cext .capi .CExtNodes .FromNativeSubclassNode ;
84
83
import com .oracle .graal .python .builtins .objects .cext .PythonNativeObject ;
84
+ import com .oracle .graal .python .builtins .objects .cext .capi .CExtNodes .FromNativeSubclassNode ;
85
85
import com .oracle .graal .python .builtins .objects .common .FormatNodeBase ;
86
86
import com .oracle .graal .python .builtins .objects .floats .FloatBuiltinsClinicProviders .AsIntegerRatioClinicProviderGen ;
87
87
import com .oracle .graal .python .builtins .objects .floats .FloatBuiltinsClinicProviders .FormatNodeClinicProviderGen ;
@@ -1650,4 +1650,18 @@ boolean trunc(PFloat pValue) {
1650
1650
}
1651
1651
1652
1652
}
1653
+
1654
+ @ Builtin (name = SpecialMethodNames .__GETNEWARGS__ , minNumOfPositionalArgs = 1 )
1655
+ @ GenerateNodeFactory
1656
+ abstract static class GetNewArgsNode extends PythonUnaryBuiltinNode {
1657
+ @ Specialization
1658
+ Object doL (double self ) {
1659
+ return factory ().createTuple (new Object []{factory ().createFloat (self )});
1660
+ }
1661
+
1662
+ @ Specialization
1663
+ Object getPI (PFloat self ) {
1664
+ return factory ().createTuple (new Object []{factory ().createFloat (self .getValue ())});
1665
+ }
1666
+ }
1653
1667
}
You can’t perform that action at this time.
0 commit comments