|
6 | 6 | package com.adacore.lkql_jit.nodes.expressions.dot; |
7 | 7 |
|
8 | 8 | import com.adacore.langkit_support.LangkitSupport; |
| 9 | +import com.adacore.lkql_jit.LKQLTypeSystemGen; |
9 | 10 | import com.adacore.lkql_jit.exception.LKQLRuntimeException; |
10 | 11 | import com.adacore.lkql_jit.nodes.Identifier; |
11 | | -import com.adacore.lkql_jit.runtime.values.LKQLNamespace; |
12 | | -import com.adacore.lkql_jit.runtime.values.LKQLNull; |
13 | | -import com.adacore.lkql_jit.runtime.values.LKQLObject; |
14 | | -import com.adacore.lkql_jit.runtime.values.LKQLProperty; |
| 12 | +import com.adacore.lkql_jit.runtime.values.*; |
15 | 13 | import com.adacore.lkql_jit.utils.Constants; |
16 | 14 | import com.adacore.lkql_jit.utils.LKQLTypesHelper; |
17 | 15 | import com.oracle.truffle.api.dsl.Cached; |
@@ -130,6 +128,18 @@ protected Object onNodeUncached(LangkitSupport.NodeInterface receiver) { |
130 | 128 | return this.onNodeCached(receiver, property, property.isField()); |
131 | 129 | } |
132 | 130 |
|
| 131 | + @Specialization |
| 132 | + protected Object onDynamicAdaNode(final DynamicAdaNode receiver) { |
| 133 | + var res = receiver.getField(this.member.getName()); |
| 134 | + if (res == null && receiver instanceof AdaNodeProxy proxy) { |
| 135 | + res = this.onNodeUncached(proxy.base); |
| 136 | + if (LKQLTypeSystemGen.isNodeInterface(res)) { |
| 137 | + return AdaNodeProxy.convertAST(LKQLTypeSystemGen.asNodeInterface(res)); |
| 138 | + } |
| 139 | + } |
| 140 | + return res; |
| 141 | + } |
| 142 | + |
133 | 143 | /** Fallback when the receiver is none of the case identified by the specializations. */ |
134 | 144 | @Fallback |
135 | 145 | protected Object onOthers(Object receiver) { |
|
0 commit comments