File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 29
29
30
30
import com .oracle .graal .python .PythonLanguage ;
31
31
import com .oracle .graal .python .builtins .objects .type .LazyPythonClass ;
32
+ import com .oracle .graal .python .nodes .BuiltinNames ;
32
33
import com .oracle .truffle .api .CompilerAsserts ;
33
34
import com .oracle .truffle .api .CompilerDirectives .CompilationFinal ;
34
35
import com .oracle .truffle .api .object .Shape ;
35
36
36
37
public enum PythonBuiltinClassType implements LazyPythonClass {
37
38
38
- TruffleObject ("truffle_object" ),
39
+ TruffleObject (BuiltinNames . FOREIGN ),
39
40
Boolean ("bool" , "builtins" ),
40
41
GetSetDescriptor ("get_set_desc" ),
41
42
PArray ("array" , "array" ),
Original file line number Diff line number Diff line change 72
72
import com .oracle .graal .python .builtins .objects .type .TypeNodesFactory .GetTypeFlagsNodeGen ;
73
73
import com .oracle .graal .python .builtins .objects .type .TypeNodesFactory .IsSameTypeNodeGen ;
74
74
import com .oracle .graal .python .builtins .objects .type .TypeNodesFactory .IsTypeNodeGen ;
75
- import com .oracle .graal .python .nodes .BuiltinNames ;
76
75
import com .oracle .graal .python .nodes .PGuards ;
77
76
import com .oracle .graal .python .nodes .PNodeWithContext ;
78
77
import com .oracle .graal .python .nodes .SpecialMethodNames ;
@@ -274,10 +273,6 @@ public static String doSlowPath(Object obj) {
274
273
if (obj instanceof PythonManagedClass ) {
275
274
return ((PythonManagedClass ) obj ).getName ();
276
275
} else if (obj instanceof PythonBuiltinClassType ) {
277
- // TODO(fa): remove this special case
278
- if (obj == PythonBuiltinClassType .TruffleObject ) {
279
- return BuiltinNames .FOREIGN ;
280
- }
281
276
return ((PythonBuiltinClassType ) obj ).getName ();
282
277
} else if (PGuards .isNativeClass (obj )) {
283
278
return (String ) CExtNodes .GetTypeMemberNode .doSlowPath (obj , NativeMemberNames .TP_NAME );
You can’t perform that action at this time.
0 commit comments