47
47
import com .oracle .graal .python .nodes .call .special .LookupAndCallBinaryNode ;
48
48
import com .oracle .graal .python .nodes .expression .ExpressionNode ;
49
49
import com .oracle .graal .python .nodes .frame .ReadNode ;
50
+ import com .oracle .graal .python .nodes .object .IsBuiltinClassProfile ;
50
51
import com .oracle .graal .python .nodes .statement .StatementNode ;
51
52
import com .oracle .graal .python .runtime .exception .PException ;
52
53
import com .oracle .truffle .api .CompilerDirectives ;
@@ -63,7 +64,7 @@ public abstract class GetAttributeNode extends ExpressionNode implements ReadNod
63
64
64
65
@ Child LookupAndCallBinaryNode dispatchNode = LookupAndCallBinaryNode .create (__GETATTRIBUTE__ );
65
66
@ Child LookupAndCallBinaryNode dispatchGetAttr ;
66
- @ CompilationFinal private ConditionProfile errorProfile = ConditionProfile . createBinaryProfile ();
67
+ @ CompilationFinal private IsBuiltinClassProfile isBuiltinClassProfile = IsBuiltinClassProfile . create ();
67
68
68
69
protected GetAttributeNode (String key ) {
69
70
this .key = key ;
@@ -88,7 +89,7 @@ protected int doItInt(Object object) throws UnexpectedResultException {
88
89
try {
89
90
return dispatchNode .executeInt (object , key );
90
91
} catch (PException pe ) {
91
- pe .expect (AttributeError , getCore (), errorProfile );
92
+ pe .expect (AttributeError , isBuiltinClassProfile );
92
93
return getDispatchGetAttr ().executeInt (object , key );
93
94
}
94
95
}
@@ -98,7 +99,7 @@ protected boolean doItBoolean(Object object) throws UnexpectedResultException {
98
99
try {
99
100
return dispatchNode .executeBool (object , key );
100
101
} catch (PException pe ) {
101
- pe .expect (AttributeError , getCore (), errorProfile );
102
+ pe .expect (AttributeError , isBuiltinClassProfile );
102
103
return getDispatchGetAttr ().executeBool (object , key );
103
104
}
104
105
}
@@ -108,7 +109,7 @@ protected Object doIt(Object object) {
108
109
try {
109
110
return dispatchNode .executeObject (object , key );
110
111
} catch (PException pe ) {
111
- pe .expect (AttributeError , getCore (), errorProfile );
112
+ pe .expect (AttributeError , isBuiltinClassProfile );
112
113
return getDispatchGetAttr ().executeObject (object , key );
113
114
}
114
115
}
0 commit comments