Skip to content

Commit

Permalink
Adapt LKQL JIT to the new node wrapping procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoGGuerrier committed Apr 2, 2024
1 parent bbd52ff commit 4e16a8b
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,8 @@ else if (javaValue instanceof Libadalang.Aspect aspect) {
Object[] values = {
aspect.exists,
aspect.inherited,
aspect.node.node.isNull()
? LKQLNull.INSTANCE
: Libadalang.AdaNode.fromEntity(aspect.node),
aspect.value.node.isNull()
? LKQLNull.INSTANCE
: Libadalang.AdaNode.fromEntity(aspect.value)
aspect.node.isNone() ? LKQLNull.INSTANCE : aspect.node,
aspect.value.isNone() ? LKQLNull.INSTANCE : aspect.value
};
return LKQLObject.createUncached(keys, values);
}
Expand All @@ -292,20 +288,15 @@ else if (javaValue instanceof Libadalang.RefResult refResultStruct) {
String[] keys = {"kind", "ref"};
Object[] values = {
toLKQLValue(refResultStruct.kind),
refResultStruct.ref.node.isNull()
? LKQLNull.INSTANCE
: Libadalang.AdaNode.fromEntity(refResultStruct.ref)
refResultStruct.ref.isNone() ? LKQLNull.INSTANCE : refResultStruct.ref
};
return LKQLObject.createUncached(keys, values);
}

// If the source is a parameter-actual structure
else if (javaValue instanceof Libadalang.ParamActual paramActual) {
String[] keys = {"actual", "param"};
Object[] values = {
Libadalang.AdaNode.fromEntity(paramActual.actual),
Libadalang.AdaNode.fromEntity(paramActual.param)
};
Object[] values = {paramActual.actual, paramActual.param};
return LKQLObject.createUncached(keys, values);
}

Expand Down

0 comments on commit 4e16a8b

Please sign in to comment.