Skip to content
Snippets Groups Projects
Commit 3085ec3d authored by Florian Angerer's avatar Florian Angerer
Browse files

Fixing other tests affected by RNG changes.

parent 460f837f
No related branches found
No related tags found
No related merge requests found
......@@ -97,12 +97,12 @@ public abstract class WriteLocalFrameVariableNode extends BaseWriteVariableNode
CompilerDirectives.transferToInterpreterAndInvalidate();
containsNoActiveBinding = FrameSlotChangeMonitor.getContainsNoActiveBindingAssumption(frame.getFrameDescriptor());
}
Object newValue = shareObjectValue(frame, frameSlot, storedObjectProfile.profile(value), mode, false);
if (containsNoActiveBinding.isValid()) {
Object newValue = shareObjectValue(frame, frameSlot, storedObjectProfile.profile(value), mode, false);
FrameSlotChangeMonitor.setObjectAndInvalidate(frame, frameSlot, newValue, false, invalidateProfile);
} else {
// it's a local variable lookup; so use 'frame' for both, executing and looking up
return handleActiveBinding(frame, frame, value, frameSlot, invalidateProfile, isActiveBindingProfile);
return handleActiveBinding(frame, frame, newValue, frameSlot, invalidateProfile, isActiveBindingProfile);
}
return value;
}
......
......@@ -90,7 +90,7 @@ public class TestMiscBuiltins extends TestBase {
assertEval("{ x<-7; as.list(environment()) }");
assertEval("{ x<-7; .y<-42; as.list(environment()) }");
// not sorted so can't compare list print
assertEval("{ x<-7; .y<-42; length(as.list(environment(), all.names=TRUE)) }");
assertEval("{ env <- new.env(); env$x<-7; env$.y<-42; length(as.list(env, all.names=TRUE)) }");
assertEval("{ x<-7; f<-function() x<<-42; f_copy<-as.list(environment())[[\"f\"]]; f_copy(); x }");
// as.matrix
......
......@@ -488,7 +488,7 @@ public class FastRDebugTest {
assertEquals(line, currentLine);
final String currentCode = suspendedEvent.getSourceSection().getCode().trim();
assertEquals(code, currentCode);
compareScope(line, code, false, true, expectedFrame);
compareScope(line, code, false, false, expectedFrame);
} catch (RuntimeException | Error e) {
final DebugStackFrame frame = suspendedEvent.getTopStackFrame();
......
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