docs: private Object getObjectPropertyImpl(Context cx, Object object,
                                             Object id) {
          Scriptable scriptable = (Scriptable)object;
          Object result;
          if (id instanceof String) {
              String name = (String)id;
              if (name.equals("this")) {
                  result = scriptable;
              } else if (name.equals("__proto__")) {
                  result = scriptable.getPrototype();
              } else if (name.equals("__parent__")) {
                  result = scriptable.getParentScope();
              } else {
                  result = ScriptableObject.getProperty(scriptable, name);
                  if (result == ScriptableObject.NOT_FOUND) {
                      result = Undefined.instance;
                  }
              }
          } else {
              int index = ((Integer)id).intValue();
              result = ScriptableObject.getProperty(scriptable, index);
              if (result == ScriptableObject.NOT_FOUND) {
                  result = Undefined.instance;
              }
          }
          return result;
      }