anchor.diff:    void schedule(SendPort port) {
       assert(_isolate != null);
       if (_queue.isEmpty()) {
  -      port.send({ "type": _FileOperationIsolate.EXIT });
  +      port.send(new _ExitOperation());
         _isolate = null;
       } else {
         port.send(_queue.removeFirst());
  
positive.code:         _errorHandler("Cannot open file: $_name");
        }
      };
      Map params = {
        "type": _FileOperationIsolate.OPEN,
        "name": _name,
        "writable": writable
      };
      _scheduler.enqueue(params, handleOpenResult);
    }
  
    void openSync([bool writable = false]) {
  
negative.code: }
  
  
  class _FileOperation {
    abstract void execute(ReceivePort port);
  
    SendPort set replyPort(SendPort port) {
      _replyPort = port;
    }
  
    bool isWrite() => false;
  
    SendPort _replyPort;
  }
  
  
  class _ExistsOperation extends _FileOperation {
    _ExistsOperation(String this._name);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._exists(_name), port.toSendPort());
    }
  
    String _name;
  }
  
  
  class _OpenOperation extends _FileOperation {
    _OpenOperation(String this._name, bool this._writable);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._open(_name, _writable), port.toSendPort());
    }
  
    String _name;
    bool _writable;
  }
  
  
  class _CloseOperation extends _FileOperation {
    _CloseOperation(int this._id);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._close(_id), port.toSendPort());
    }
  
    int _id;
  }
  
  
  class _ReadByteOperation extends _FileOperation {
    _ReadByteOperation(int this._id);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._readByte(_id), port.toSendPort());
    }
  
    int _id;
  }
  
  
  class _ReadListResult {
    _ReadListResult(this.read, this.buffer);
    int read;
    List buffer;
  }
  
  
  class _ReadListOperation extends _FileOperation {
    _ReadListOperation(int this._id,
                       int this._length,
                       int this._offset,
                       int this._bytes);
  
    void execute(ReceivePort port) {
      if (_bytes == 0) {
        _replyPort.send(0, port.toSendPort());
        return;
      }
      int index = _File._checkReadWriteListArguments(_length, _offset, _bytes);
      if (index != 0) {
        _replyPort.send("index out of range in readList: $index",
                        port.toSendPort());
        return;
      }
      var buffer = new List(_bytes);
      var result =
          new _ReadListResult(_File._readList(_id, buffer, 0, _bytes), buffer);
      _replyPort.send(result, port.toSendPort());
    }
  
    int _id;
    int _length;
    int _offset;
    int _bytes;
  }
  
  
  class _WriteByteOperation extends _FileOperation {
    _WriteByteOperation(int this._id, int this._value);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._writeByte(_id, _value), port.toSendPort());
    }
  
    bool isWrite() => true;
  
    int _id;
    int _value;
  }
  
  
  class _WriteListOperation extends _FileOperation {
    _WriteListOperation(int this._id,
                        List this._buffer,
                        int this._offset,
                        int this._bytes);
  
    void execute(ReceivePort port) {
      if (_bytes == 0) {
        _replyPort.send(0, port.toSendPort());
        return;
      }
      int index =
          _File._checkReadWriteListArguments(_buffer.length, _offset, _bytes);
      if (index != 0) {
        _replyPort.send("index out of range in writeList: $index",
                        port.toSendPort());
        return;
      }
      var result = _File._writeList(_id, _buffer, _offset, _bytes);
      _replyPort.send(result, port.toSendPort());
    }
  
    bool isWrite() => true;
  
    int _id;
    List _buffer;
    int _offset;
    int _bytes;
  }
  
  
  class _WriteStringOperation extends _FileOperation {
    _WriteStringOperation(int this._id, String this._string);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._writeString(_id, _string), port.toSendPort());
    }
  
    bool isWrite() => true;
  
    int _id;
    String _string;
  }
  
  
  class _PositionOperation extends _FileOperation {
    _PositionOperation(int this._id);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._position(_id), port.toSendPort());
    }
  
    int _id;
  }
  
  
  class _LengthOperation extends _FileOperation {
    _LengthOperation(int this._id);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._length(_id), port.toSendPort());
    }
  
    int _id;
  }
  
  
  class _FlushOperation extends _FileOperation {
    _FlushOperation(int this._id);
  
    void execute(ReceivePort port) {
      _replyPort.send(_File._flush(_id), port.toSendPort());
    }
  
    int _id;
  }
  
  
  class _ExitOperation extends _FileOperation {
    void execute(ReceivePort port) {
      port.close();
    }
  }
  
  
  class _FileOperationIsolate extends Isolate {
    _FileOperationIsolate() : super.heavy();
  
    void handleOperation(_FileOperation message, SendPort ignored) {
      message.execute(port);
      port.receive(handleOperation);
    }
  
  