Common Lisp Package: AVM2-ASM

README:

FUNCTION

Public

Undocumented

ASSEMBLE (FORMS)

ASSEMBLE-METHOD-BODY (FORMS &KEY (INIT-SCOPE 0) (MAX-SCOPE 1 MAX-SCOPE-P) (MAX-STACK 1 MAX-STACK-P) (ARG-COUNT 0) TRAITS)

Private

%ASSEMBLE (FORMS)

simple assembler, returns sequence of octets containing the bytecode corresponding to forms, interns stuff as needed, or optionally uses constant pool indices (with no error checking currently) when operand is a list of the form (:id ###).

PEEPHOLE (FORMS)

avm2 asm peephole optimizer, pass in list of asm forms, returns optimized version

RUNTIME-NAME-COUNT (INDEX)

some opcodes need extra args when passed a runtime multiname, check for that here and return count of extra args

Undocumented

%AVM2-VALIDATE (PEEPHOLE-CODE &KEY DUMP (TEST-LIVE NIL) (ARG-COUNT 1))

%PEEPHOLE (FORMS)

ADJUST-SCOPE (POP PUSH)

ADJUST-STACK (POP PUSH)

ASM-INTERN-DOUBLE (VALUE)

ASM-INTERN-EXCEPTION (EXCEPTION)

ASM-INTERN-INT (VALUE)

ASM-INTERN-METHOD (VALUE)

ASM-INTERN-MULTINAME (MN)

ASM-INTERN-NAMESPACE (VALUE)

ASM-INTERN-STRING (VALUE)

ASM-INTERN-UINT (VALUE)

AVM2-CLASS (NAME-MN SUPER-MN FLAGS INTERFACES INSTANCE-INIT TRAITS CLASS-INIT &KEY PROTECTED-NS CLASS-TRAITS)

AVM2-DISASSEMBLE (SEQUENCE &KEY (START 0))

AVM2-INTERN (STRING-DESIGNATOR)

AVM2-INTERN-DOUBLE (DOUBLE)

AVM2-INTERN-INT (INT)

AVM2-INTERN-UINT (INT)

AVM2-METHOD (LABEL NAME PARAM-TYPES RETURN-TYPE FLAGS &KEY OPTION-PARAMS PNAMES BODY)

AVM2-NS-INTERN (STRING-DESIGNATOR &KEY (KIND +PACKAGE-NAMESPACE+))

AVM2-NS-SET-INTERN (NAMESPACES)

AVM2-STRING (S)

COUNT+1-S24-TO-SEQUENCE (SEQ)

COUNTED-S24-TO-SEQUENCE (SEQ)

DECODE-COUNTED-S24 (SEQUENCE &KEY (START 0))

DECODE-U16 (SEQUENCE &KEY (START 0))

DECODE-U24 (SEQUENCE &KEY (START 0))

DECODE-VARIABLE-LENGTH (SEQUENCE &KEY (START 0))

DOUBLE-TO-SEQUENCE (DOUBLE)

FIX-LABELS (FORMS)

INTERN-METHOD-ID (ID)

INTERN-MULTINAME (KIND NS NAME)

INTERN-MULTINAME-L (KIND &REST NS-LIST)

LABEL-TO-OFFSET (NAME OP)

LABELS-TO-OFFSETS (NAME)

LOOKUP-DOUBLE (VALUE)

LOOKUP-INT (VALUE)

LOOKUP-METHOD (VALUE)

LOOKUP-MULTINAME (ID)

LOOKUP-NAMESPACE (VALUE)

LOOKUP-STRING (VALUE)

LOOKUP-UINT (VALUE)

PARSED-QNAME (NAME)

QNAME (NS NAME)

QNAME-STRING (MN-ID)

SYMBOL-NAME-TO-STRING (NAME &KEY INIT-CAP)

SYMBOL-TO-EXPORT-STRING (NAME &KEY INIT-CAP)

SYMBOL-TO-QNAME-LIST (NAME &KEY INIT-CAP)

SYMBOL-TO-QNAME-OLD (NAME &KEY INIT-CAP)

U16-TO-SEQUENCE (U16)

U24-TO-SEQUENCE (U24)

VARIABLE-LENGTH-ENCODE (INTEGER)

MACRO

Private

Undocumented

DEF-PEEPHOLE (NAME LENGTH ARGS &BODY BODY)

DEFINE-ASM-MACRO (NAME (&REST ARGS) &BODY BODY)

DEFINE-ASM-MACRO-STACK (NAME (&REST ARGS) &BODY BODY)

DEFINE-OPS (&BODY OPS)

WITH-ASSEMBLER-CONTEXT (&BODY BODY)

SLOT-ACCESSOR

Private

Undocumented

CLASS-ID (OBJECT)

SETFCLASS-ID (NEW-VALUE OBJECT)

CLASSES (OBJECT)

CLASSI (OBJECT)

SETFCLASSI (NEW-VALUE OBJECT)

CODE (OBJECT)

SETFCODE (NEW-VALUE OBJECT)

CURRENT-SCOPE (OBJECT)

SETFCURRENT-SCOPE (NEW-VALUE OBJECT)

CURRENT-STACK (OBJECT)

SETFCURRENT-STACK (NEW-VALUE OBJECT)

DOUBLES (OBJECT)

EXC-TYPE (OBJECT)

SETFEXC-TYPE (NEW-VALUE OBJECT)

EXCEPTION-NAMES (OBJECT)

SETFEXCEPTION-NAMES (NEW-VALUE OBJECT)

EXCEPTIONS (OBJECT)

SETFEXCEPTIONS (NEW-VALUE OBJECT)

FIXUPS (OBJECT)

SETFFIXUPS (NEW-VALUE OBJECT)

FLAGS (OBJECT)

SETFFLAGS (NEW-VALUE OBJECT)

FN (OBJECT)

SETFFN (NEW-VALUE OBJECT)

FROM (OBJECT)

SETFFROM (NEW-VALUE OBJECT)

INIT-SCOPE-DEPTH (OBJECT)

SETFINIT-SCOPE-DEPTH (NEW-VALUE OBJECT)

INSTANCES (OBJECT)

INTS (OBJECT)

KIND (OBJECT)

SETFKIND (NEW-VALUE OBJECT)

LABEL (OBJECT)

SETFLABEL (NEW-VALUE OBJECT)

LOCAL-COUNT (OBJECT)

SETFLOCAL-COUNT (NEW-VALUE OBJECT)

MAX-SCOPE-DEPTH (OBJECT)

SETFMAX-SCOPE-DEPTH (NEW-VALUE OBJECT)

MAX-STACK (OBJECT)

SETFMAX-STACK (NEW-VALUE OBJECT)

METADATA (OBJECT)

SETFMETADATA (NEW-VALUE OBJECT)

METHOD-BODIES (OBJECT)

METHOD-ID (OBJECT)

SETFMETHOD-ID (NEW-VALUE OBJECT)

METHOD-ID-HASH (OBJECT)

METHOD-INFOS (OBJECT)

MULTINAME-HASH (OBJECT)

MULTINAMES (OBJECT)

NAME (OBJECT)

SETFNAME (NEW-VALUE OBJECT)

NAMESPACE-ID (OBJECT)

SETFNAMESPACE-ID (NEW-VALUE OBJECT)

NAMESPACES (OBJECT)

NS-SET-HASH (OBJECT)

NS-SETS (OBJECT)

SCRIPTS (OBJECT)

SLOT-ID (OBJECT)

SETFSLOT-ID (NEW-VALUE OBJECT)

STRING-ID (OBJECT)

SETFSTRING-ID (NEW-VALUE OBJECT)

STRING-INTERN-HASH (OBJECT)

STRINGS (OBJECT)

TARGET (OBJECT)

SETFTARGET (NEW-VALUE OBJECT)

TO (OBJECT)

SETFTO (NEW-VALUE OBJECT)

TRAIT-DATA (OBJECT)

SETFTRAIT-DATA (NEW-VALUE OBJECT)

TRAITS (OBJECT)

SETFTRAITS (NEW-VALUE OBJECT)

TYPE-NAME (OBJECT)

SETFTYPE-NAME (NEW-VALUE OBJECT)

UINTS (OBJECT)

VAR-NAME (OBJECT)

SETFVAR-NAME (NEW-VALUE OBJECT)

VINDEX (OBJECT)

SETFVINDEX (NEW-VALUE OBJECT)

VKIND (OBJECT)

SETFVKIND (NEW-VALUE OBJECT)

VARIABLE

Private

Undocumented

*ASSEMBLER-CONTEXT*

*CODE-OFFSET*

*CURRENT-METHOD*

*DISASSEMBLE-OPCODES*

*EMPTY-SYM*

*MULTINAME-KINDS*

*OPCODES*

*PEEPHOLE-PATTERNS*

*STACK-EFFECTS-OPCODES*

+CLASS-FINAL+

+CLASS-INTERFACE+

+CLASS-PROTECTED-NS+

+CLASS-SEALED+

+EXPLICIT-NAMESPACE+

+HAS-OPTIONAL+

+HAS-PARAM-NAMES+

+MULTINAME+

+MULTINAME-A+

+MULTINAME-L+

+MULTINAME-LA+

+NAMESPACE+

+NEED-ACTIVATION+

+NEED-ARGS+

+NEED-REST+

+PACKAGE-INTERNAL-NS+

+PACKAGE-NAMESPACE+

+PRIVATE-NS+

+PROTECTED-NAMESPACE+

+QNAME+

+QNAME-A+

+RT-QNAME+

+RT-QNAME-A+

+RT-QNAME-L+

+RT-QNAME-LA+

+SET-DXNS+

+STATIC-PROTECTED-NS+

CLASS

Private

Undocumented

ASSEMBLER-CONTEXT

AVM2SYM

EXCEPTION-INFO

METHOD-BODY

TRAIT-DATA-CLASS

TRAIT-DATA-FUNCTION

TRAIT-DATA-METHOD/GET/SET

TRAIT-DATA-SLOT/CONST

TRAIT-INFO