Exemplo n.º 1
0
 public LinkedSetDispatchNode(
     String attributeId, AttributeWriteNode write, PythonObject primary, SetDispatchNode next) {
   super(attributeId);
   this.check = LayoutCheckNode.create(primary, attributeId, true);
   this.write = write;
   this.next = next;
 }
Exemplo n.º 2
0
 @Override
 public void setBooleanValue(VirtualFrame frame, PythonObject primary, boolean value) {
   try {
     if (check.accept(primary)) {
       write.setBooleanValueUnsafe(primary, value);
     } else {
       next.setBooleanValue(frame, primary, value);
     }
   } catch (InvalidAssumptionException | StorageLocationGeneralizeException e) {
     rewrite(next).setValue(frame, primary, value);
   }
 }