Version

org.scalajs.ir.Version
See theVersion companion class
object Version

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Version.type

Members list

Value members

Concrete methods

def combine(versions: Version*): Version

Create a combined, non-hash version from the given bytes.

Create a combined, non-hash version from the given bytes.

Returns Unversioned if at least one of versions is Unversioned.

The returned version is to differ from:

  • all hash versions.
  • all non-hash versions created with from methods.
  • combined versions created with different (ordered) version lists (including the empty list).

Attributes

Note

This can be used to create tagged versions (for alternatives):

  Versions.combine(Versions.fromInt(0), underlying)
def fromByte(i: Byte): Version

Create a non-hash version from a Byte.

Create a non-hash version from a Byte.

Strictly equivalent to (but potentially more efficient):

fromBytes(Array[Byte](i))

Attributes

def fromBytes(bytes: Array[Byte]): Version

Create a non-hash version from the given bytes.

Create a non-hash version from the given bytes.

Guaranteed to differ from:

  • all hash versions.
  • versions returned from combine.
  • versions with different bytes.

Attributes

def fromInt(i: Int): Version

Create a non-hash version from an Int.

Create a non-hash version from an Int.

Strictly equivalent to (but potentially more efficient):

fromBytes(ByteBuffer.allocate(4).putInt(i).array())

Attributes

def fromLong(l: Long): Version

Create a non-hash version from a Long.

Create a non-hash version from a Long.

Strictly equivalent to (but potentially more efficient):

fromBytes(ByteBuffer.allocate(8).putLong(i).array())

Attributes

def fromUTF8String(utf8String: UTF8String): Version

Create a non-hash version from the given UTF8String.

Create a non-hash version from the given UTF8String.

Strictly equivalent to (but potentially more efficient):

fromBytes(Array.tabulate(utf8String.length)(utf8String(_)))

Attributes

Concrete fields