ToExprHSSIRFlat

scalus.compiler.sir.ToExprHSSIRFlat

Called from SIRConverter via reflection.

Attributes

Graph
Supertypes
trait Flat[SIR]
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class SelfCheckException(msg: String, originSir: SIR, decodedSir: SIR, path: List[String], left: Any, right: Any) extends RuntimeException

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

override def bitSizeHC(a: SIR, encoderState: State): Int

Attributes

Definition Classes
def decodeBase64(base64: String): SIR
override def decodeHC(decoderState: HashConsedDecoderState): SIR

Attributes

Definition Classes
def decodeStringLatin1(string: String): SIR

Decode a string encoded in ISO-8859-1 to SIR.

Decode a string encoded in ISO-8859-1 to SIR.

Used by SIRConverter to decode the string representation of SIR.

Attributes

override def encodeHC(a: SIR, encoderState: HashConsedEncoderState): Unit

Attributes

Definition Classes

Inherited methods

final override def bitSize(a: SIR): Int

Exact size of the encoding of a in bits. Callers use it to size the EncoderState buffer, so it must never under-estimate.

Exact size of the encoding of a in bits. Callers use it to size the EncoderState buffer, so it must never under-estimate.

Attributes

Definition Classes
Inherited from:
HashConsedFlat
def decode(decode: DecoderState): SIR

Reads an A, advancing decode past the bits it consumed.

Reads an A, advancing decode past the bits it consumed.

Decoding stops as soon as it has an A; it does not check for trailing input, so a caller that requires the whole buffer to be consumed must check that itself.

Attributes

Throws
FlatDecodingError

if the input is truncated or is not a valid encoding of A. Bytes from an untrusted source are expected to fail this way; any other exception is a defect.

Inherited from:
HashConsedFlat
final override def encode(a: SIR, encoderState: EncoderState): Unit

Writes a into encode.

Writes a into encode.

The buffer does not grow, so it must already have room for bitSize bits. Failing that is a defect in this instance rather than a problem with a: an under-estimating bitSize overruns the buffer with an ArrayIndexOutOfBoundsException, and a negative size is rejected by EncoderState with an IllegalArgumentException. Use [[FlatCodec.encodeA*]] to get the sizing right.

Attributes

Definition Classes
Inherited from:
HashConsedFlat

Concrete fields

val paranoid: Boolean