LocalsHandler

amyc.backend.wasm.handlers.LocalsHandler
See theLocalsHandler companion object
final class LocalsHandler(val sym: ApplicationSymbol, val mh: ModuleHandler, textmode: Boolean)

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def constructor(sym: Symbol): Int
Implicitly added by lh2mh
Implicitly added by lh2mh

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
Implicitly added by lh2mh

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)

Implicitly added by lh2mh

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
Implicitly added by lh2mh

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 fetch(id: Symbol)(using Context): localidx
def function(sym: Symbol): Int
Implicitly added by lh2mh
def locals: List[local]
def params: List[param]
def static_alloc(size: Int): Int
Implicitly added by lh2mh

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
Implicitly added by lh2mh

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
Implicitly added by lh2mh

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]
Implicitly added by lh2mh

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
Implicitly added by lh2mh

Inherited methods

def productElementNames: Iterator[String]
Implicitly added by lh2mh

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]
Implicitly added by lh2mh

Attributes

Inherited from:
Product

Concrete fields