Skip to content
Snippets Groups Projects
Commit f5bb2f76 authored by Mick Jordan's avatar Mick Jordan
Browse files

fix eval frame copy bug

parent daffeb2d
No related branches found
No related tags found
No related merge requests found
......@@ -197,10 +197,10 @@ public final class REngine implements RBuiltinLookupProvider {
FrameDescriptor envfd = envFrame.getFrameDescriptor();
FrameDescriptor vfd = vFrame.getFrameDescriptor();
// Copy existing bindings
try {
for (FrameSlot slot : envfd.getSlots()) {
FrameSlotKind slotKind = slot.getKind();
FrameSlot vFrameSlot = vfd.addFrameSlot(slot.getIdentifier(), slotKind);
for (FrameSlot slot : envfd.getSlots()) {
FrameSlotKind slotKind = slot.getKind();
FrameSlot vFrameSlot = vfd.addFrameSlot(slot.getIdentifier(), slotKind);
try {
switch (slotKind) {
case Byte:
vFrame.setByte(vFrameSlot, envFrame.getByte(slot));
......@@ -214,12 +214,15 @@ public final class REngine implements RBuiltinLookupProvider {
case Object:
vFrame.setObject(vFrameSlot, envFrame.getObject(slot));
break;
case Illegal:
break;
default:
throw new FrameSlotTypeException();
}
} catch (FrameSlotTypeException ex) {
throw new RuntimeException("unexpected FrameSlot exception", ex);
}
} catch (FrameSlotTypeException ex) {
Utils.fatalError("unexpected FrameSlot exception");
}
Object result = runCall(callTarget, vFrame, false);
if (result != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment