ModuleHandler

amyc.backend.wasm.handlers.ModuleHandler
case class ModuleHandler(name: String)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def constructor(sym: Symbol): Int

Allocate dynamically memory

Allocate dynamically memory

It assumes the size is in the stack and leaves the base address there.

Attributes

def dynamic_alloc(size: Int)(using LocalsHandler): Code

Allocate dynamically memory.

Allocate dynamically memory.

It leaves in the stack the base address for the object

Value parameters

size

(Int) - size to allocate

Attributes

Returns

(Code) - code to execute to allocate memory dynamically leaves in the stack the base address (i32)

Return dynamically the address of the next free memory

Return dynamically the address of the next free memory

Attributes

Returns

(Code) - code to execute to get the memory boundary leaves the address (i32) in the stack

def dynamic_boundary(code: Code): Code

Dynamically change the memory boundary

Dynamically change the memory boundary

THIS FUNCTION SHOULD BE REMOVED FOR NOW, IT'S SHOULD ONLY BE USED IN Std::readString

Attributes

def function(sym: Symbol): Int
def static_alloc(size: Int): Int

Allocate statically memory This is used for String literals for now

Allocate statically memory This is used for String literals for now

Value parameters

size

(Int) - size of the memory to allocate

Attributes

Returns

(Int) - base address of the allocated memory

def static_boundary: Int

Base address of the next free memory

Base address of the next free memory

Attributes

Returns

(Int) - Base address of the next free memory

def string(str: String): Int

Fetch the address in memory of a String.

Fetch the address in memory of a String.

If String is not in memory, it'll allocate memory

Value parameters

str

(String) - String to fetch

Attributes

Returns

(Int) - base address of the String

def strpool: List[Data]

Build the Data segments with the stored Strings in memory

Build the Data segments with the stored Strings in memory

Attributes

Returns

(List[Data]) - List of data segments

def table: Table

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product