From 9cd2927a4f6175784e081d6b512d3e900c8069e7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 12 Jun 2017 21:14:55 -0400 Subject: - Renamed the "compilation" phase as the "generation" phase. - Implemented compilation of primitives. - Implemented compilation of structures. --- new-luxc/source/luxc/generator/base.jvm.lux | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 new-luxc/source/luxc/generator/base.jvm.lux (limited to 'new-luxc/source/luxc/generator/base.jvm.lux') diff --git a/new-luxc/source/luxc/generator/base.jvm.lux b/new-luxc/source/luxc/generator/base.jvm.lux new file mode 100644 index 000000000..01a97aec4 --- /dev/null +++ b/new-luxc/source/luxc/generator/base.jvm.lux @@ -0,0 +1,29 @@ +(;module: + lux + (lux (control monad) + [io #- run] + (concurrency ["A" atom]) + (data [text] + text/format) + host) + (luxc ["&" base])) + +(jvm-import java.lang.Class) +(jvm-import java.lang.ClassLoader) +(jvm-import org.objectweb.asm.MethodVisitor) + +(type: Blob Byte-Array) + +(type: JVM-State + {#visitor (Maybe MethodVisitor) + #loader ClassLoader + #store (A;Atom (D;Dict Text Blob)) + }) + +(def: host-state + JVM-State + (let [store (A;new (D;new text;Hash))] + {#visitor #;None + #loader (memory-class-loader store) + #store store + })) -- cgit v1.2.3