From 012f6bd41e527479dddbccbdab10daa78fd9a0fd Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 1 Nov 2017 00:51:45 -0400 Subject: - Re-organized code-generation, and re-named it "translation". --- new-luxc/source/luxc/host.jvm.lux | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'new-luxc/source/luxc/host.jvm.lux') diff --git a/new-luxc/source/luxc/host.jvm.lux b/new-luxc/source/luxc/host.jvm.lux index b74c9748c..2cbdf5883 100644 --- a/new-luxc/source/luxc/host.jvm.lux +++ b/new-luxc/source/luxc/host.jvm.lux @@ -11,8 +11,7 @@ [host #+ do-to object] [io]) (luxc ["&" base] - (generator ["&&;" common]) - )) + (lang (translation [";T" common])))) (host;import java.lang.reflect.AccessibleObject (setAccessible [boolean] void)) @@ -48,7 +47,7 @@ (error! error))) (def: (define-class class-name byte-code loader) - (-> Text &&common;Bytecode ClassLoader (e;Error Object)) + (-> Text commonT;Bytecode ClassLoader (e;Error Object)) (Method.invoke [loader (array;from-list (list (:! Object class-name) (:! Object byte-code) @@ -57,11 +56,11 @@ ClassLoader::defineClass)) (def: (fetch-byte-code class-name store) - (-> Text &&common;Class-Store (Maybe &&common;Bytecode)) + (-> Text commonT;Class-Store (Maybe commonT;Bytecode)) (|> store A;get io;run (dict;get class-name))) (def: (memory-class-loader store) - (-> &&common;Class-Store ClassLoader) + (-> commonT;Class-Store ClassLoader) (object ClassLoader [] [] (ClassLoader (findClass [class-name String]) Class @@ -79,13 +78,13 @@ (error! (format "Class not found: " class-name)))))) (def: #export init-host - (io;IO &&common;Host) - (io;io (let [store (: &&common;Class-Store + (io;IO commonT;Host) + (io;io (let [store (: commonT;Class-Store (A;atom (dict;new text;Hash)))] - {#&&common;loader (memory-class-loader store) - #&&common;store store - #&&common;function-class #;None - #&&common;artifacts (dict;new text;Hash)}))) + {#commonT;loader (memory-class-loader store) + #commonT;store store + #commonT;function-class #;None + #commonT;artifacts (dict;new text;Hash)}))) (def: #export class-loader (Meta ClassLoader) @@ -93,8 +92,8 @@ (#e;Success [compiler (|> compiler (get@ #;host) - (:! &&common;Host) - (get@ #&&common;loader))]))) + (:! commonT;Host) + (get@ #commonT;loader))]))) (def: #export runtime-class Text "LuxRuntime") (def: #export function-class Text "LuxFunction") -- cgit v1.2.3