@@ -78,7 +78,6 @@ public static DispatchNode getUncached() {
78
78
@ Child protected ToSymbolNode toSymbol ;
79
79
80
80
protected final ConditionProfile methodMissing ;
81
- protected final ConditionProfile isForeignCall ;
82
81
protected final BranchProfile methodMissingMissing ;
83
82
84
83
protected DispatchNode (
@@ -87,14 +86,12 @@ protected DispatchNode(
87
86
LookupMethodNode methodLookup ,
88
87
CallInternalMethodNode callNode ,
89
88
ConditionProfile methodMissing ,
90
- ConditionProfile isForeignCall ,
91
89
BranchProfile methodMissingMissing ) {
92
90
this .config = config ;
93
91
this .metaclassNode = metaclassNode ;
94
92
this .methodLookup = methodLookup ;
95
93
this .callNode = callNode ;
96
94
this .methodMissing = methodMissing ;
97
- this .isForeignCall = isForeignCall ;
98
95
this .methodMissingMissing = methodMissingMissing ;
99
96
}
100
97
@@ -105,7 +102,6 @@ protected DispatchNode(DispatchConfiguration config) {
105
102
LookupMethodNode .create (),
106
103
CallInternalMethodNode .create (),
107
104
ConditionProfile .create (),
108
- ConditionProfile .create (),
109
105
BranchProfile .create ());
110
106
}
111
107
@@ -131,7 +127,8 @@ public Object execute(VirtualFrame frame, Object receiver, String methodName, Ru
131
127
case RETURN_MISSING :
132
128
return MISSING ;
133
129
case CALL_METHOD_MISSING :
134
- if (isForeignCall .profile (metaclass == getContext ().getCoreLibrary ().truffleInteropForeignClass )) {
130
+ // Both branches implicitly profile through lazy node creation
131
+ if (metaclass == getContext ().getCoreLibrary ().truffleInteropForeignClass ) {
135
132
return callForeign (receiver , methodName , block , arguments );
136
133
} else {
137
134
return callMethodMissing (frame , receiver , methodName , block , arguments );
@@ -239,7 +236,6 @@ protected Uncached(DispatchConfiguration config) {
239
236
LookupMethodNodeGen .getUncached (),
240
237
CallInternalMethodNodeGen .getUncached (),
241
238
ConditionProfile .getUncached (),
242
- ConditionProfile .getUncached (),
243
239
BranchProfile .getUncached ());
244
240
}
245
241
0 commit comments