code: private boolean canOptimizeObjectCreateSet(Node firstParam) {
      if (firstParam != null
          && firstParam.getNext() == null
          && !(firstParam.isNumber() || firstParam.isString())) {
        // if there is only one argument, and it's an array, then the method uses the array elements
        // as keys. Don't optimize it to {[arr]: true}. We only special-case number and string
        // arguments in order to not regress ES5-out behavior
        return false;
      }
  
      Node curParam = firstParam;
      Set<String> keys = new HashSet<>();
      while (curParam != null) {
        // All keys must be strings or numbers, otherwise we can't optimize the call.
        if (!isOptimizableKey(curParam)) {
          return false;
        }
        if (curParam.isString() || curParam.isNumber()) {
          String key =
              curParam.isString() ? curParam.getString() : numberToString(curParam.getDouble());
          if (!keys.add(key)) {
            compiler.report(JSError.make(firstParam.getPrevious(), DUPLICATE_SET_MEMBER, key));
            return false;
          }
        }
        curParam = curParam.getNext();
      }
      return true;
    }
docs: Returns whether the given call to goog.object.createSet can be converted to an object literal.