26
26
27
27
package com .oracle .graal .python .builtins .objects .method ;
28
28
29
+ import static com .oracle .graal .python .nodes .SpecialAttributeNames .__CODE__ ;
30
+ import static com .oracle .graal .python .nodes .SpecialAttributeNames .__FUNC__ ;
31
+ import static com .oracle .graal .python .nodes .SpecialAttributeNames .__NAME__ ;
32
+ import static com .oracle .graal .python .nodes .SpecialAttributeNames .__SELF__ ;
29
33
import static com .oracle .graal .python .nodes .SpecialMethodNames .__CALL__ ;
34
+ import static com .oracle .graal .python .nodes .SpecialMethodNames .__EQ__ ;
30
35
31
36
import java .util .List ;
32
37
33
38
import com .oracle .graal .python .builtins .Builtin ;
34
39
import com .oracle .graal .python .builtins .CoreFunctions ;
35
40
import com .oracle .graal .python .builtins .PythonBuiltins ;
36
41
import com .oracle .graal .python .builtins .objects .function .PKeyword ;
37
- import com .oracle .graal .python .nodes .SpecialAttributeNames ;
38
- import com .oracle .graal .python .nodes .SpecialMethodNames ;
39
42
import com .oracle .graal .python .nodes .argument .CreateArgumentsNode ;
40
43
import com .oracle .graal .python .nodes .call .CallDispatchNode ;
41
44
import com .oracle .graal .python .nodes .call .special .LookupAndCallBinaryNode ;
@@ -73,7 +76,7 @@ protected Object doIt(PBuiltinMethod self, Object[] arguments, PKeyword[] keywor
73
76
}
74
77
}
75
78
76
- @ Builtin (name = "__self__" , fixedNumOfArguments = 1 , isGetter = true )
79
+ @ Builtin (name = __SELF__ , fixedNumOfArguments = 1 , isGetter = true )
77
80
@ GenerateNodeFactory
78
81
public abstract static class SelfNode extends PythonBuiltinNode {
79
82
@ Specialization
@@ -87,7 +90,7 @@ protected Object doIt(PBuiltinMethod self) {
87
90
}
88
91
}
89
92
90
- @ Builtin (name = "__func__" , fixedNumOfArguments = 1 , isGetter = true )
93
+ @ Builtin (name = __FUNC__ , fixedNumOfArguments = 1 , isGetter = true )
91
94
@ GenerateNodeFactory
92
95
public abstract static class FuncNode extends PythonBuiltinNode {
93
96
@ Specialization
@@ -101,13 +104,13 @@ protected Object doIt(PBuiltinMethod self) {
101
104
}
102
105
}
103
106
104
- @ Builtin (name = SpecialAttributeNames . __NAME__ , fixedNumOfArguments = 1 , isGetter = true )
107
+ @ Builtin (name = __NAME__ , fixedNumOfArguments = 1 , isGetter = true )
105
108
@ GenerateNodeFactory
106
109
public abstract static class NameNode extends PythonBuiltinNode {
107
110
@ Specialization
108
111
protected Object doIt (PMethod self ,
109
112
@ Cached ("create(__GETATTRIBUTE__)" ) LookupAndCallBinaryNode getCode ) {
110
- return getCode .executeObject (self .getFunction (), SpecialAttributeNames . __NAME__ );
113
+ return getCode .executeObject (self .getFunction (), __NAME__ );
111
114
}
112
115
113
116
@ Specialization
@@ -116,17 +119,17 @@ protected Object doIt(PBuiltinMethod self) {
116
119
}
117
120
}
118
121
119
- @ Builtin (name = SpecialAttributeNames . __CODE__ , fixedNumOfArguments = 1 , isGetter = true )
122
+ @ Builtin (name = __CODE__ , fixedNumOfArguments = 1 , isGetter = true )
120
123
@ GenerateNodeFactory
121
124
public abstract static class CodeNode extends PythonBuiltinNode {
122
125
@ Specialization
123
126
protected Object doIt (PMethod self ,
124
127
@ Cached ("create(__GETATTRIBUTE__)" ) LookupAndCallBinaryNode getCode ) {
125
- return getCode .executeObject (self .getFunction (), SpecialAttributeNames . __CODE__ );
128
+ return getCode .executeObject (self .getFunction (), __CODE__ );
126
129
}
127
130
}
128
131
129
- @ Builtin (name = SpecialMethodNames . __EQ__ , fixedNumOfArguments = 2 )
132
+ @ Builtin (name = __EQ__ , fixedNumOfArguments = 2 )
130
133
@ GenerateNodeFactory
131
134
abstract static class EqNode extends PythonBinaryBuiltinNode {
132
135
@ Specialization
0 commit comments