mirror of
https://github.com/apple/pkl.git
synced 2026-03-27 11:31:11 +01:00
Ensure findOrAddAuxiliarySlot is not called during compilation (#969)
Fixes an issue that is preventing the native executable from building
This commit is contained in:
@@ -2538,9 +2538,17 @@ public abstract class TypeNode extends PklNode {
|
||||
|
||||
@ExplodeLoop
|
||||
protected Object executeLazily(VirtualFrame frame, Object value) {
|
||||
var customThisSlot =
|
||||
frame.getFrameDescriptor().findOrAddAuxiliarySlot(CustomThisScope.FRAME_SLOT_ID);
|
||||
|
||||
int customThisSlot;
|
||||
var numberOfAuxiliarySlots = frame.getFrameDescriptor().getNumberOfAuxiliarySlots();
|
||||
if (numberOfAuxiliarySlots == 0) {
|
||||
CompilerDirectives.transferToInterpreterAndInvalidate();
|
||||
customThisSlot =
|
||||
frame.getFrameDescriptor().findOrAddAuxiliarySlot(CustomThisScope.FRAME_SLOT_ID);
|
||||
} else {
|
||||
// assertion: we only use auxiliary slots for custom `this`.
|
||||
assert numberOfAuxiliarySlots == 1;
|
||||
customThisSlot = 0;
|
||||
}
|
||||
var ret = childNode.executeLazily(frame, value);
|
||||
|
||||
var localContext = language.localContext.get();
|
||||
|
||||
Reference in New Issue
Block a user