public static Scriptable newObjectLiteral(Object[] propertyIds,
                                              Object[] propertyValues,
                                              int [] getterSetters,
                                              Context cx, Scriptable scope)
    {
        Scriptable object = cx.newObject(scope);
        for (int i = 0, end = propertyIds.length; i != end; ++i) {
            Object id = propertyIds[i];
            int getterSetter = getterSetters[i];
            Object value = propertyValues[i];
            if (id instanceof String) {
                if (getterSetter == 0)
                    ScriptableObject.putProperty(object, (String)id, value);
                else {
                    Callable fun;
                    String definer;
                    if (getterSetter < 0)   // < 0 means get foo() ...
                        definer = "__defineGetter__";
                    else
                        definer = "__defineSetter__";
                    fun = getPropFunctionAndThis(object, definer, cx);
                    // Must consume the last scriptable object in cx
                    lastStoredScriptable(cx);
                    Object[] outArgs = new Object[2];
                    outArgs[0] = id;
                    outArgs[1] = value;
                    fun.call(cx, scope, object, outArgs);
                }              
            } else {
                int index = ((Integer)id).intValue();
                ScriptableObject.putProperty(object, index, value);
            }
        }
        return object;
    }