aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/common.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/common.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/common.jvm.lux36
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")