function instantiateProxy(path, objectId, readonly) {
  const object = this.getObject(objectId)
  if (Array.isArray(object)) {
    return listProxy(this, objectId, path)
  } else if (object instanceof Text || object instanceof Table) {
    return object.getWriteable(this, path)
  } else {
    return mapProxy(this, objectId, path, readonly)
  }
}
Instantiates a proxy object for the given `objectId`.
This function is added as a method to the context object by rootObjectProxy().
When it is called, `this` is the context object.
`readonly` is a list of map property names that cannot be modified.