Java Code Examples for jdk.nashorn.internal.runtime.arrays.ArrayData#EMPTY_ARRAY

The following examples show how to use jdk.nashorn.internal.runtime.arrays.ArrayData#EMPTY_ARRAY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScriptObject.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count.increment();
    }
    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 2
Source File: ScriptObject.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count++;
    }
    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 3
Source File: ScriptObject.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count.increment();
    }
    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 4
Source File: ScriptObject.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count.increment();
    }
    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 5
Source File: ScriptObject.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count.increment();
    }
    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 6
Source File: ScriptObject.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count.increment();
    }
    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 7
Source File: ScriptObject.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count++;
    }

    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 8
Source File: ScriptObject.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor that directly sets the prototype to {@code proto} and property map to
 * {@code map} without invalidating the map as calling {@link #setProto(ScriptObject)}
 * would do. This should only be used for objects that are always constructed with the
 * same combination of prototype and property map.
 *
 * @param proto the prototype object
 * @param map intial {@link PropertyMap}
 */
protected ScriptObject(final ScriptObject proto, final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count++;
    }

    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
    this.proto = proto;

    if (proto != null) {
        proto.setIsPrototype();
    }
}
 
Example 9
Source File: ScriptObject.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count++;
    }

    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 10
Source File: ScriptObject.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor that directly sets the prototype to {@code proto} and property map to
 * {@code map} without invalidating the map as calling {@link #setProto(ScriptObject)}
 * would do. This should only be used for objects that are always constructed with the
 * same combination of prototype and property map.
 *
 * @param proto the prototype object
 * @param map intial {@link PropertyMap}
 */
protected ScriptObject(final ScriptObject proto, final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count++;
    }

    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
    this.proto = proto;

    if (proto != null) {
        proto.setIsPrototype();
    }
}
 
Example 11
Source File: ScriptObject.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count.increment();
    }
    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 12
Source File: ScriptObject.java    From nashorn with GNU General Public License v2.0 5 votes vote down vote up
/**
* Constructor
*
* @param map {@link PropertyMap} used to create the initial object
*/
public ScriptObject(final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count++;
    }

    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
}
 
Example 13
Source File: ScriptObject.java    From nashorn with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor that directly sets the prototype to {@code proto} and property map to
 * {@code map} without invalidating the map as calling {@link #setProto(ScriptObject)}
 * would do. This should only be used for objects that are always constructed with the
 * same combination of prototype and property map.
 *
 * @param proto the prototype object
 * @param map intial {@link PropertyMap}
 */
protected ScriptObject(final ScriptObject proto, final PropertyMap map) {
    if (Context.DEBUG) {
        ScriptObject.count++;
    }

    this.arrayData = ArrayData.EMPTY_ARRAY;
    this.setMap(map == null ? PropertyMap.newMap() : map);
    this.proto = proto;

    if (proto != null) {
        proto.setIsPrototype();
    }
}