vm

package
v0.0.0-...-9f34f3f Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

This file is part of conscheme Automatically generated by compiler/primitives.scm

Index

Constants

View Source
const (
	Integer    = 0
	Pair       = 1
	Vector     = 2
	Null       = 3
	String     = 4
	Symbol     = 5
	Boolean    = 6
	Char       = 7
	Rational   = 8
	Float64    = 9
	Complex128 = 10
	// Comp = 11
	Bytevector = 12
)
View Source
const (
	// Instruction numbers
	FRAME        = 1
	RETURN       = 2
	PUSH         = 3
	MAKE_VOID    = 4
	MOVE         = 5
	CLOSURE_NAME = 6
	CLOSURE_REF  = 7
	//CLOSURE_SET_EX = 8
	CLOSURE       = 10
	TAILCALL      = 11
	CONSARGS      = 12
	CLOSURE_VAR   = 13
	FUNCALL       = 14
	JUMP          = 0
	CONST_REF     = 9
	BF            = 15
	CLOSURE_LABEL = 16
	PRIMCALL      = 17
	PRIMREF       = 18
	APPLYCALL     = 19
	TAILAPPLY     = 20
	STACK_CTRL    = 21

	// Instruction fields
	I_SHIFT      = 27
	OP1_N        = 0x7f00000
	OP1_N_SHIFT  = 20
	OP1_R1       = 0xFFC00
	OP1_R1_SHIFT = 10
	OP1_R2       = 0x3ff
	OP2_N        = 0x7FFFC00
	OP2_N_SHIFT  = 10
	OP2_R        = 0x3ff
	OP3_N1       = 0x7FC0000
	OP3_N1_SHIFT = 18
	OP3_N2       = 0x3FC00
	OP3_N2_SHIFT = 10
	OP3_R        = 0x3ff
)
View Source
const SCHED_TICK = 100

When GOMAXPROCS is larger than 1, we apparently need to implement our own timer tick to get some sort of preemptive threading.

View Source
const Version = 1

Variables

View Source
var (
	False = Obj(false)
	True  = Obj(true)
	Eol   = Obj([0]Obj{}) // empty list
	Eof   = Obj(io.EOF)   // end of file object
	Void  = Obj(nil)      // the unspecified value
)

Constants.

Functions

func Obj_display

func Obj_display(x Obj, p io.Writer, write Obj)

Types

type Argstack

type Argstack []Obj

func (*Argstack) Pop

func (s *Argstack) Pop() Obj

func (*Argstack) Push

func (s *Argstack) Push(v Obj)

type Code

type Code struct {
	// contains filtered or unexported fields
}

type Compnum

type Compnum struct {
	// contains filtered or unexported fields
}

Exact complex numbers. Inexact complex numbers use complex128.

type Deserializer

type Deserializer struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.Reader) (*Deserializer, error)

func (*Deserializer) ReadObject

func (d *Deserializer) ReadObject() Obj

type Frame

type Frame struct {
	// contains filtered or unexported fields
}

type InputPort

type InputPort struct {
	// contains filtered or unexported fields
}

type Obj

type Obj interface{}

The type of all Scheme objects.

func Command_line

func Command_line() Obj

func Cons

func Cons(x, y Obj) Obj

func Conscheme

func Conscheme(header, code Obj) Obj

func Display

func Display(x Obj) Obj

func Floyd

func Floyd(x Obj) Obj

func Length

func Length(x Obj) Obj

func Make_boolean

func Make_boolean(x bool) Obj

func Make_char

func Make_char(x rune) Obj

func Make_fixnum

func Make_fixnum(x int) Obj

func Make_string

func Make_string(length, init Obj) Obj

func Make_vector

func Make_vector(length, init Obj) Obj

func Set_command_line

func Set_command_line(strings Obj) Obj

func String_length

func String_length(x Obj) Obj

func String_ref

func String_ref(x, idx Obj) Obj

func String_set_ex

func String_set_ex(x, idx, ch Obj) Obj

func String_string

func String_string(s string) Obj

func String_to_symbol

func String_to_symbol(x Obj) Obj

func Symbol_to_string

func Symbol_to_string(x Obj) Obj

func Vector_ref

func Vector_ref(x, idx Obj) Obj

func Vector_set_ex

func Vector_set_ex(x, idx, value Obj) Obj

func Write

func Write(x Obj) Obj

type OutputPort

type OutputPort struct {
	// contains filtered or unexported fields
}

type Plugin

type Plugin struct {
	*plugin.Plugin
	// contains filtered or unexported fields
}

type Procedure

type Procedure struct {
	// contains filtered or unexported fields
}

type ScmChar

type ScmChar struct {
	// contains filtered or unexported fields
}

type ScmSym

type ScmSym struct {
	// contains filtered or unexported fields
}

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

type Thread

type Thread struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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