MiniQuake

src/miniquake/quakec/contract.ml

Package
miniquake.quakec.contract
Reachable
No

Imports

Declarations

builtinReferenceCount

function builtinReferenceCount(program)

Return builtin reference count derived from the active module state.

ParameterTypeDefaultDescription
programdynamic—The program input consumed by `builtinReferenceCount`.

View source

contractFingerprint

function contractFingerprint()

Implements the `contractFingerprint` operation for `miniquake.quakec.contract` (contract fingerprint).

View source

EXPECTED_BUILTIN_COUNT

const EXPECTED_BUILTIN_COUNT = 79

Defines the expected builtin count value used by `miniquake.quakec.contract`.

View source

EXPECTED_FIXME_COUNT

const EXPECTED_FIXME_COUNT = 14

Defines the expected fixme count value used by `miniquake.quakec.contract`.

View source

EXPECTED_HEADER_CRC

const EXPECTED_HEADER_CRC = 5927

Defines the expected header crc value used by `miniquake.quakec.contract`.

View source

EXPECTED_LOCALSTACK_SIZE

const EXPECTED_LOCALSTACK_SIZE = 2048

Defines the expected localstack size value used by `miniquake.quakec.contract`.

View source

EXPECTED_OPCODE_COUNT

const EXPECTED_OPCODE_COUNT = 66

Defines the expected opcode count value used by `miniquake.quakec.contract`.

View source

EXPECTED_STACK_DEPTH

const EXPECTED_STACK_DEPTH = 32

Defines the expected stack depth value used by `miniquake.quakec.contract`.

View source

EXPECTED_VERSION

const EXPECTED_VERSION = 6

Defines the expected version value used by `miniquake.quakec.contract`.

View source

FNV_OFFSET

const FNV_OFFSET = 2166136261

Defines the fnv offset value used by `miniquake.quakec.contract`.

View source

FNV_PRIME

const FNV_PRIME = 16777619

Defines the fnv prime value used by `miniquake.quakec.contract`.

View source

hasDefinition

function hasDefinition(definitions, name)

Report whether definition.

ParameterTypeDefaultDescription
definitionsdynamic—The definitions input consumed by `hasDefinition`.
namedynamic—Stable name that identifies the requested object or option.

View source

hasFunction

function hasFunction(program, name)

Report whether function.

ParameterTypeDefaultDescription
programdynamic—The program input consumed by `hasFunction`.
namedynamic—Stable name that identifies the requested object or option.

View source

hashByte

inline function hashByte(hash, value)

Returns whether `miniquake.quakec.contract` has h byte.

ParameterTypeDefaultDescription
hashdynamic—The hash input consumed by `hashByte`.
valuedynamic—Value consumed by `hashByte`.

View source

hashText

function hashText(hash, text)

Fold text into the deterministic rolling hash.

ParameterTypeDefaultDescription
hashdynamic—The hash input consumed by `hashText`.
textdynamic—Text to parse or process.

View source

hashWord

function hashWord(hash, value)

Fold word into the deterministic rolling hash.

ParameterTypeDefaultDescription
hashdynamic—The hash input consumed by `hashWord`.
valuedynamic—Value consumed by `hashWord`.

View source

maximumBuiltinReference

function maximumBuiltinReference(program)

Implements the `maximumBuiltinReference` operation for `miniquake.quakec.contract` (maximum builtin reference).

ParameterTypeDefaultDescription
programdynamic—The program input consumed by `maximumBuiltinReference`.

View source

programFingerprint

function programFingerprint(program)

Implements the `programFingerprint` operation for `miniquake.quakec.contract` (program fingerprint).

ParameterTypeDefaultDescription
programdynamic—The program input consumed by `programFingerprint`.

View source

requiredFields

function requiredFields()

Validates d fields for `miniquake.quakec.contract`.

View source

requiredFunctions

function requiredFunctions()

Validates d functions for `miniquake.quakec.contract`.

View source

requiredGlobals

function requiredGlobals()

Validates d globals for `miniquake.quakec.contract`.

View source

STATUS

const STATUS = "quakec_109_frozen_v1"

Defines the status value used by `miniquake.quakec.contract`.

View source

summary

function summary(program)

Return summary derived from the active module state.

ParameterTypeDefaultDescription
programdynamic—The program input consumed by `summary`.

View source

validate

function validate(program)

Implements the `validate` operation for `miniquake.quakec.contract` (validate).

ParameterTypeDefaultDescription
programdynamic—The program input consumed by `validate`.

View source