Class ConstantEmptyArray


public final class ConstantEmptyArray extends AbstractConstantEmptyArray
  • Method Details

    • createConstantEmptyArray

      public static ConstantEmptyArray createConstantEmptyArray()
    • setLengthImpl

      public ScriptArray setLengthImpl(JSDynamicObject object, long length, com.oracle.truffle.api.nodes.Node node, ScriptArray.SetLengthProfileAccess profile)
      Specified by:
      setLengthImpl in class ScriptArray
    • removeRangeImpl

      public ScriptArray removeRangeImpl(JSDynamicObject object, long start, long end)
      Description copied from class: ScriptArray
      This function deletes all elements in the range from [start..end[. This is equivalent to shifting the whole array, starting with element index end, by end-start positions to the left. Can be used by e.g. Array.prototype.splice;
      Specified by:
      removeRangeImpl in class ScriptArray
    • addRangeImpl

      public ScriptArray addRangeImpl(JSDynamicObject object, long offset, int size)
      Description copied from class: ScriptArray
      This method grows the array by adding more elements of a given size. An offset parameter can be used to specify where the new elements have to be added (starting from zero). The operation is equivalent to shifting (right) the whole array or its part as defined by the offset parameter.
      Specified by:
      addRangeImpl in class ScriptArray
      Parameters:
      offset - starting offset position
      size - size of the inserted empty array
      Returns:
      a ScriptArray instance with the new size
    • withIntegrityLevel

      protected DynamicArray withIntegrityLevel(int newIntegrityLevel)
      Specified by:
      withIntegrityLevel in class DynamicArray