compiler/vm/vmconv

  Source   Edit

The module implements helper functions for reading and writing values to VM locations. These are useful when writing VM callbacks.

Procs

func readAs[T](src: LocHandle; t: typedesc[T]): T
  Source   Edit
func tryReadTo[T](src: LocHandle; dst: var set[T]): bool
  Source   Edit
proc tryWriteTo[T: enum](v: T; dest: LocHandle; mm: var VmMemoryManager): bool
  Source   Edit
proc tryWriteTo[T: object | tuple](v: T; dest: LocHandle;
                                   mm: var VmMemoryManager): bool
  Source   Edit
proc tryWriteTo[T: seq](v: T; dest: LocHandle; mm: var VmMemoryManager): bool
  Source   Edit
proc tryWriteTo[T: SomeSignedInt](v: T; dest: LocHandle; mm: var VmMemoryManager): bool
  Source   Edit
proc tryWriteTo[T: SomeUnsignedInt](v: T; dest: LocHandle;
                                    mm: var VmMemoryManager): bool
  Source   Edit
proc tryWriteTo[T: string](v: T; dest: LocHandle; mm: var VmMemoryManager): bool
  Source   Edit
proc writeTo[T](v: T; dest: LocHandle; mm: var VmMemoryManager)
  Source   Edit