Skip to main content

module lang::flybytes::Compiler

rascal-0.40.17
flybytes-0.2.8

Usage

import lang::flybytes::Compiler;

Source code

http://github.com/usethesource/flybytes/blob/main/src/lang/flybytes/Compiler.rsc

Dependencies

extend lang::flybytes::Mirror;
extend lang::flybytes::Syntax;
extend util::Maybe;

data JDKVersion

data JDKVersion  
= v1_6()
| v1_7()
| v1_8()
| v9()
| v10()
| v11()
| v12()
| v13()
| v14()
| v15()
| v16()
| v17()
| v18()
;

function compileClass

void compileClass(Class cls, loc classFile, bool enableAsserts=false, JDKVersion version=v11(), bool debugMode=false)

compiles a flybytes class to a JVM bytecode class and saves the result to the target location

function loadClass

Mirror loadClass(Class cls, Maybe[loc] file=nothing(), list[loc] classpath=[], bool enableAsserts=false, JDKVersion version=v11(), bool debugMode=false)

compiles a flybytes class to a JVM bytecode class and loads the result as a class Mirror value.

function loadClasses

map[str,Mirror] loadClasses(list[Class] classes, Maybe[loc] prefix=nothing(), list[loc] classpath=[], bool enableAsserts=false, JDKVersion version=v11(), bool debugMode=false)

compiles a list of flybytes classes to JVM bytecode classes and loads the results as a class Mirror values (into the same classloader such that the classes can see eachother.