diff options
author | Eduardo Julian | 2017-11-01 00:51:45 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-01 00:51:45 -0400 |
commit | 012f6bd41e527479dddbccbdab10daa78fd9a0fd (patch) | |
tree | 621f344a09acd52736f343d94582b3f1a2f0c5f9 /new-luxc/source/luxc/host.jvm.lux | |
parent | 71d7a4c7206155e09f3e1e1d8699561ea6967382 (diff) |
- Re-organized code-generation, and re-named it "translation".
Diffstat (limited to 'new-luxc/source/luxc/host.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/host.jvm.lux | 25 |
1 files changed, 12 insertions, 13 deletions
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<Text>)))] - {#&&common;loader (memory-class-loader store) - #&&common;store store - #&&common;function-class #;None - #&&common;artifacts (dict;new text;Hash<Text>)}))) + {#commonT;loader (memory-class-loader store) + #commonT;store store + #commonT;function-class #;None + #commonT;artifacts (dict;new text;Hash<Text>)}))) (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") |