diff options
author | Eduardo Julian | 2017-11-06 18:34:51 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-06 18:34:51 -0400 |
commit | cab9451961fa25fd6683c1c7bd836941bd84e48b (patch) | |
tree | a03e681579ecc34a84881a2efd8efacea2420e9f /new-luxc/source/luxc/lang/translation/common.jvm.lux | |
parent | 4e932a33ac56bb3cb1d7b49771e770e8c373bf8e (diff) |
- Fixed some bugs.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/common.jvm.lux | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/new-luxc/source/luxc/lang/translation/common.jvm.lux b/new-luxc/source/luxc/lang/translation/common.jvm.lux index 1870530c2..f9825614a 100644 --- a/new-luxc/source/luxc/lang/translation/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/common.jvm.lux @@ -33,8 +33,8 @@ (type: #export Host {#loader ClassLoader #store Class-Store - #function-class (Maybe Text) - #artifacts Artifacts}) + #artifacts Artifacts + #context [Text Nat]}) (exception: Unknown-Class) (exception: Class-Already-Stored) @@ -93,38 +93,6 @@ (#e;Success [compiler (ClassLoader.loadClass [name] (get@ #loader host))]) (ex;throw Unknown-Class name))))) -(def: #export (with-function class expr) - (All [a] (-> Text (Meta a) (Meta a))) - (;function [compiler] - (let [host (:! Host (get@ #;host compiler)) - old-function-class (get@ #function-class host)] - (case (expr (set@ #;host - (:! Void (set@ #function-class - (#;Some class) - host)) - compiler)) - (#e;Success [compiler' output]) - (#e;Success [(update@ #;host - (|>. (:! Host) - (set@ #function-class old-function-class) - (:! Void)) - compiler') - output]) - - (#e;Error error) - (#e;Error error))))) - -(def: #export function - (Meta Text) - (;function [compiler] - (let [host (:! Host (get@ #;host compiler))] - (case (get@ #function-class host) - #;None - (ex;throw No-Function-Being-Compiled "") - - (#;Some function-class) - (#e;Success [compiler function-class]))))) - (def: #export bytecode-version Int Opcodes.V1_6) (def: #export value-field Text "_value") |