h2jvm
Safe HaskellNone
LanguageGHC2021

JVM.Data.Raw.Types

Description

Types and type synonyms for raw JVM data

Synopsis

Documentation

type U1 = Word8 Source #

type U2 = Word16 Source #

type U4 = Word32 Source #

type U8 = Word64 Source #

type JVMInt = U4 Source #

type InstOffsetBytes = U2 Source #

An offset for an instruction, used for jumps

instOffsetBytesToU2 :: InstOffsetBytes -> (U1, U1) Source #

Converts an InstOffsetBytes to a pair of bytes, encoding it a way that the JVM will correctly interpret it In other words, this function does the opposite of (branchbyte1 << 8) | branchbyte2 >>> instOffsetBytesToU2 39 (0,39)

type ConstantPoolIndex = U2 Source #

A constant pool index

type ArrayType = U1 Source #

An "array type code" for the newarray instruction

class SafeNumConvert a b where Source #

Conversions between numbers that will never overflow or underflow

Methods

safeNumConvert :: a -> b Source #

Instances

Instances details
SafeNumConvert U1 U2 Source # 
Instance details

Defined in JVM.Data.Raw.Types

Methods

safeNumConvert :: U1 -> U2 Source #

SafeNumConvert U1 U4 Source # 
Instance details

Defined in JVM.Data.Raw.Types

Methods

safeNumConvert :: U1 -> U4 Source #

SafeNumConvert U1 Int Source # 
Instance details

Defined in JVM.Data.Raw.Types

SafeNumConvert U2 U4 Source # 
Instance details

Defined in JVM.Data.Raw.Types

Methods

safeNumConvert :: U2 -> U4 Source #

SafeNumConvert U2 Int Source # 
Instance details

Defined in JVM.Data.Raw.Types

SafeNumConvert U4 Int Source # 
Instance details

Defined in JVM.Data.Raw.Types

class (SafeNumConvert b a, Integral a, Integral b) => UnsafeNumConvert a b where Source #

Minimal complete definition

Nothing

Methods

unsafeNumConvert :: a -> Maybe b Source #

default unsafeNumConvert :: Bounded b => a -> Maybe b Source #

Instances

Instances details
UnsafeNumConvert U2 U1 Source # 
Instance details

Defined in JVM.Data.Raw.Types

UnsafeNumConvert Int U1 Source # 
Instance details

Defined in JVM.Data.Raw.Types

UnsafeNumConvert Int U2 Source # 
Instance details

Defined in JVM.Data.Raw.Types