@@ -68,7 +68,7 @@ protected Object onObject(
68
68
final LKQLObject receiver ,
69
69
@ CachedLibrary ("receiver" ) DynamicObjectLibrary receiverLibrary ) {
70
70
// Try to get the built in
71
- Object builtIn = this .tryBuildIn (receiver );
71
+ Object builtIn = this .tryBuiltIn (receiver );
72
72
if (builtIn != null ) {
73
73
return builtIn ;
74
74
}
@@ -94,7 +94,7 @@ protected Object onNamespace(
94
94
final LKQLNamespace receiver ,
95
95
@ CachedLibrary ("receiver" ) DynamicObjectLibrary receiverLibrary ) {
96
96
// Try to get the built in
97
- Object builtIn = this .tryBuildIn (receiver );
97
+ Object builtIn = this .tryBuiltIn (receiver );
98
98
if (builtIn != null ) {
99
99
return builtIn ;
100
100
}
@@ -149,7 +149,7 @@ protected Object onNodeCached(
149
149
@ Specialization (replaces = "onNodeCached" )
150
150
protected Object onNodeUncached (Libadalang .AdaNode receiver ) {
151
151
// Try the built_in
152
- Object builtIn = this .tryBuildIn (receiver );
152
+ Object builtIn = this .tryBuiltIn (receiver );
153
153
if (builtIn != null ) {
154
154
return builtIn ;
155
155
}
@@ -170,20 +170,21 @@ protected Object onNodeUncached(Libadalang.AdaNode receiver) {
170
170
}
171
171
172
172
/**
173
- * Fallback when the receiver is a generic object .
173
+ * Fallback when the receiver is none of the case identified by the specializations .
174
174
*
175
- * @param receiver The receiver generic value.
175
+ * @param receiver The receiver value.
176
176
* @return The execution of the dot access.
177
177
*/
178
178
@ Fallback
179
- protected Object onGeneric (Object receiver ) {
180
- // Try to get the built in
181
- Object builtIn = this .tryBuildIn (receiver );
179
+ protected Object onOthers (Object receiver ) {
180
+
181
+ // In the fallback case, only built-in methods are candidates. Try to get a built-in.
182
+ Object builtIn = this .tryBuiltIn (receiver );
183
+
182
184
if (builtIn != null ) {
183
185
return builtIn ;
184
186
}
185
187
186
- // Throw an exception
187
188
throw LKQLRuntimeException .wrongMember (
188
189
this .member .getName (), LKQLTypesHelper .fromJava (receiver ), this .member );
189
190
}
@@ -196,7 +197,7 @@ protected Object onGeneric(Object receiver) {
196
197
* @param receiver The receiver object.
197
198
* @return The built-in result, null if the built-in method doesn't exist.
198
199
*/
199
- protected Object tryBuildIn (Object receiver ) {
200
+ protected Object tryBuiltIn (Object receiver ) {
200
201
// Get the built in
201
202
BuiltInFunctionValue builtIn = this .getBuiltIn (receiver );
202
203
if (builtIn != null ) {
0 commit comments