util

package
v0.0.0-...-dc6c195 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 1 Imported by: 12

Documentation

Overview

Package util contains some special useful functions that are provided by compiler and VM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abort

func Abort()

Abort terminates current execution, unlike exception throwing with panic() it can't be recovered from.

func AbortMsg

func AbortMsg(msg string)

AbortMsg terminates current execution with the specified message. Unlike exception throwing with panic() it can't be recovered from.

func Assert

func Assert(ok bool)

Assert terminates current execution if the condition specified is false. Unlike exception throwing with panic() it can't be recovered from.

func AssertMsg

func AssertMsg(ok bool, msg string)

AssertMsg terminates current execution with the specified message if the condition specified is false. Unlike exception throwing with panic() it can't be recovered from.

func Equals

func Equals(a, b any) bool

Equals compares a with b and will return true when a and b are equal. It's implemented as an EQUAL VM opcode, so the rules of comparison are those of EQUAL.

func Remove

func Remove(slice any, i int)

Remove removes element with index i from slice. This is done in place and slice must have type other than `[]byte`.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL