38
38
*/
39
39
package com .oracle .graal .python .builtins .objects .complex ;
40
40
41
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__ABS__ ;
42
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__ADD__ ;
43
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__BOOL__ ;
44
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__EQ__ ;
41
45
import static com .oracle .graal .python .nodes .SpecialMethodNames .__GETNEWARGS__ ;
46
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__GE__ ;
47
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__GT__ ;
48
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__HASH__ ;
49
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__LE__ ;
50
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__LT__ ;
51
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__MUL__ ;
52
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__NEG__ ;
53
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__NE__ ;
54
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__POS__ ;
55
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__RADD__ ;
56
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__REPR__ ;
57
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__RMUL__ ;
58
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__RTRUEDIV__ ;
59
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__STR__ ;
60
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__SUB__ ;
61
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__TRUEDIV__ ;
42
62
43
63
import java .util .List ;
44
64
47
67
import com .oracle .graal .python .builtins .PythonBuiltins ;
48
68
import com .oracle .graal .python .builtins .objects .PNotImplemented ;
49
69
import com .oracle .graal .python .builtins .objects .tuple .PTuple ;
50
- import com .oracle .graal .python .nodes .SpecialMethodNames ;
51
70
import com .oracle .graal .python .nodes .function .PythonBuiltinNode ;
52
71
import com .oracle .graal .python .nodes .function .builtins .PythonUnaryBuiltinNode ;
53
72
import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
@@ -64,7 +83,7 @@ protected List<? extends NodeFactory<? extends PythonBuiltinNode>> getNodeFactor
64
83
}
65
84
66
85
@ GenerateNodeFactory
67
- @ Builtin (name = SpecialMethodNames . __ABS__ , fixedNumOfArguments = 1 )
86
+ @ Builtin (name = __ABS__ , fixedNumOfArguments = 1 )
68
87
static abstract class AbsNode extends PythonBuiltinNode {
69
88
@ Specialization
70
89
double abs (PComplex c ) {
@@ -197,7 +216,7 @@ static int getExponent(final double d) {
197
216
}
198
217
199
218
@ GenerateNodeFactory
200
- @ Builtin (name = SpecialMethodNames . __ADD__ , fixedNumOfArguments = 2 )
219
+ @ Builtin (name = __ADD__ , fixedNumOfArguments = 2 )
201
220
static abstract class AddNode extends PythonBuiltinNode {
202
221
@ Specialization
203
222
PComplex doComplexBoolean (PComplex left , boolean right ) {
@@ -230,12 +249,12 @@ Object doComplex(Object left, Object right) {
230
249
}
231
250
232
251
@ GenerateNodeFactory
233
- @ Builtin (name = SpecialMethodNames . __RADD__ , fixedNumOfArguments = 2 )
252
+ @ Builtin (name = __RADD__ , fixedNumOfArguments = 2 )
234
253
static abstract class RAddNode extends AddNode {
235
254
}
236
255
237
256
@ GenerateNodeFactory
238
- @ Builtin (name = SpecialMethodNames . __TRUEDIV__ , fixedNumOfArguments = 2 )
257
+ @ Builtin (name = __TRUEDIV__ , fixedNumOfArguments = 2 )
239
258
static abstract class DivNode extends PythonBuiltinNode {
240
259
@ Specialization
241
260
PComplex doComplexDouble (PComplex left , double right ) {
@@ -255,7 +274,7 @@ PComplex doComplex(PComplex left, PComplex right) {
255
274
}
256
275
257
276
@ GenerateNodeFactory
258
- @ Builtin (name = SpecialMethodNames . __RTRUEDIV__ , fixedNumOfArguments = 2 )
277
+ @ Builtin (name = __RTRUEDIV__ , fixedNumOfArguments = 2 )
259
278
static abstract class RDivNode extends PythonBuiltinNode {
260
279
@ Specialization
261
280
PComplex doComplexDouble (PComplex right , double left ) {
@@ -267,7 +286,7 @@ PComplex doComplexDouble(PComplex right, double left) {
267
286
}
268
287
269
288
@ GenerateNodeFactory
270
- @ Builtin (name = SpecialMethodNames . __MUL__ , fixedNumOfArguments = 2 )
289
+ @ Builtin (name = __MUL__ , fixedNumOfArguments = 2 )
271
290
static abstract class MulNode extends PythonBuiltinNode {
272
291
@ Specialization
273
292
PComplex doComplexDouble (PComplex left , double right ) {
@@ -302,12 +321,12 @@ Object doGeneric(Object left, Object right) {
302
321
}
303
322
304
323
@ GenerateNodeFactory
305
- @ Builtin (name = SpecialMethodNames . __RMUL__ , fixedNumOfArguments = 2 )
324
+ @ Builtin (name = __RMUL__ , fixedNumOfArguments = 2 )
306
325
static abstract class RMulNode extends MulNode {
307
326
}
308
327
309
328
@ GenerateNodeFactory
310
- @ Builtin (name = SpecialMethodNames . __SUB__ , fixedNumOfArguments = 2 )
329
+ @ Builtin (name = __SUB__ , fixedNumOfArguments = 2 )
311
330
static abstract class SubNode extends PythonBuiltinNode {
312
331
@ Specialization
313
332
PComplex doComplexDouble (PComplex left , double right ) {
@@ -321,7 +340,7 @@ PComplex doComplex(PComplex left, PComplex right) {
321
340
}
322
341
323
342
@ GenerateNodeFactory
324
- @ Builtin (name = SpecialMethodNames . __EQ__ , fixedNumOfArguments = 2 )
343
+ @ Builtin (name = __EQ__ , fixedNumOfArguments = 2 )
325
344
static abstract class EqNode extends PythonBuiltinNode {
326
345
@ Specialization
327
346
boolean doComplex (PComplex left , PComplex right ) {
@@ -336,7 +355,7 @@ boolean doElse(Object left, Object right) {
336
355
}
337
356
338
357
@ GenerateNodeFactory
339
- @ Builtin (name = SpecialMethodNames . __GE__ , fixedNumOfArguments = 2 )
358
+ @ Builtin (name = __GE__ , fixedNumOfArguments = 2 )
340
359
static abstract class GeNode extends PythonBuiltinNode {
341
360
@ Specialization
342
361
boolean doComplex (PComplex left , PComplex right ) {
@@ -351,7 +370,7 @@ boolean doElse(Object left, Object right) {
351
370
}
352
371
353
372
@ GenerateNodeFactory
354
- @ Builtin (name = SpecialMethodNames . __GT__ , fixedNumOfArguments = 2 )
373
+ @ Builtin (name = __GT__ , fixedNumOfArguments = 2 )
355
374
static abstract class GtNode extends PythonBuiltinNode {
356
375
@ Specialization
357
376
boolean doComplex (PComplex left , PComplex right ) {
@@ -366,7 +385,7 @@ boolean doElse(Object left, Object right) {
366
385
}
367
386
368
387
@ GenerateNodeFactory
369
- @ Builtin (name = SpecialMethodNames . __LT__ , fixedNumOfArguments = 2 )
388
+ @ Builtin (name = __LT__ , fixedNumOfArguments = 2 )
370
389
static abstract class LtNode extends PythonBuiltinNode {
371
390
@ Specialization
372
391
boolean doComplex (PComplex left , PComplex right ) {
@@ -381,7 +400,7 @@ boolean doElse(Object left, Object right) {
381
400
}
382
401
383
402
@ GenerateNodeFactory
384
- @ Builtin (name = SpecialMethodNames . __LE__ , fixedNumOfArguments = 2 )
403
+ @ Builtin (name = __LE__ , fixedNumOfArguments = 2 )
385
404
static abstract class LeNode extends PythonBuiltinNode {
386
405
@ Specialization
387
406
boolean doComplex (PComplex left , PComplex right ) {
@@ -396,7 +415,7 @@ boolean doElse(Object left, Object right) {
396
415
}
397
416
398
417
@ GenerateNodeFactory
399
- @ Builtin (name = SpecialMethodNames . __NE__ , fixedNumOfArguments = 2 )
418
+ @ Builtin (name = __NE__ , fixedNumOfArguments = 2 )
400
419
static abstract class NeNode extends PythonBuiltinNode {
401
420
@ Specialization
402
421
boolean doComplex (PComplex left , PComplex right ) {
@@ -411,7 +430,7 @@ boolean doElse(Object left, Object right) {
411
430
}
412
431
413
432
@ GenerateNodeFactory
414
- @ Builtin (name = SpecialMethodNames . __REPR__ , fixedNumOfArguments = 1 )
433
+ @ Builtin (name = __REPR__ , fixedNumOfArguments = 1 )
415
434
static abstract class ReprNode extends PythonBuiltinNode {
416
435
@ Specialization
417
436
String repr (PComplex self ) {
@@ -420,7 +439,7 @@ String repr(PComplex self) {
420
439
}
421
440
422
441
@ GenerateNodeFactory
423
- @ Builtin (name = SpecialMethodNames . __STR__ , fixedNumOfArguments = 1 )
442
+ @ Builtin (name = __STR__ , fixedNumOfArguments = 1 )
424
443
static abstract class StrNode extends PythonBuiltinNode {
425
444
@ Specialization
426
445
String repr (PComplex self ) {
@@ -429,7 +448,7 @@ String repr(PComplex self) {
429
448
}
430
449
431
450
@ GenerateNodeFactory
432
- @ Builtin (name = SpecialMethodNames . __BOOL__ , fixedNumOfArguments = 1 )
451
+ @ Builtin (name = __BOOL__ , fixedNumOfArguments = 1 )
433
452
static abstract class BoolNode extends PythonBuiltinNode {
434
453
@ Specialization
435
454
boolean bool (PComplex self ) {
@@ -438,7 +457,7 @@ boolean bool(PComplex self) {
438
457
}
439
458
440
459
@ GenerateNodeFactory
441
- @ Builtin (name = SpecialMethodNames . __NEG__ , fixedNumOfArguments = 1 )
460
+ @ Builtin (name = __NEG__ , fixedNumOfArguments = 1 )
442
461
static abstract class NegNode extends PythonBuiltinNode {
443
462
@ Specialization
444
463
PComplex neg (PComplex self ) {
@@ -447,7 +466,7 @@ PComplex neg(PComplex self) {
447
466
}
448
467
449
468
@ GenerateNodeFactory
450
- @ Builtin (name = SpecialMethodNames . __POS__ , fixedNumOfArguments = 1 )
469
+ @ Builtin (name = __POS__ , fixedNumOfArguments = 1 )
451
470
static abstract class PosNode extends PythonBuiltinNode {
452
471
@ Specialization
453
472
PComplex pos (PComplex self ) {
@@ -483,7 +502,7 @@ static abstract class ImagNode extends PythonBuiltinNode {
483
502
}
484
503
485
504
@ GenerateNodeFactory
486
- @ Builtin (name = SpecialMethodNames . __HASH__ , fixedNumOfArguments = 1 )
505
+ @ Builtin (name = __HASH__ , fixedNumOfArguments = 1 )
487
506
static abstract class HashNode extends PythonUnaryBuiltinNode {
488
507
@ Specialization
489
508
@ TruffleBoundary
0 commit comments