aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source
diff options
context:
space:
mode:
authorEduardo Julian2022-01-25 21:26:50 -0400
committerEduardo Julian2022-01-25 21:26:50 -0400
commit7661faaa22a253bb4703992b638038d96ead0ade (patch)
tree748bca72a2aad0d33a4268ad0d0d39fa4e24b384 /lux-jvm/source
parent9a08039adfe40f76b9d5a5351005671c15b557bf (diff)
Bug fixes for eval in general and in Lux/Ruby.
Diffstat (limited to 'lux-jvm/source')
-rw-r--r--lux-jvm/source/luxc/lang/directive/jvm.lux18
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm.lux11
2 files changed, 14 insertions, 15 deletions
diff --git a/lux-jvm/source/luxc/lang/directive/jvm.lux b/lux-jvm/source/luxc/lang/directive/jvm.lux
index 009bec5b4..3960a3532 100644
--- a/lux-jvm/source/luxc/lang/directive/jvm.lux
+++ b/lux-jvm/source/luxc/lang/directive/jvm.lux
@@ -40,14 +40,14 @@
["[0]" phase]
[language
[lux
- ["[0]" analysis {"+" Analysis}]
["[0]" synthesis {"+" Synthesis}]
["[0]" generation]
["[0]" directive {"+" Requirements}]
+ ["[0]" analysis {"+" Analysis}
+ ["[0]A" type]]
[phase
[analysis
- ["[0]A" scope]
- ["[0]A" type]]
+ ["[0]A" scope]]
["[0]" extension
["[0]" bundle]
[analysis
@@ -1054,8 +1054,8 @@
constructor_argumentsA (monad.each ! (function (_ [typeJ termC])
(do !
[typeL (//A.reflection_type mapping typeJ)
- termA (typeA.with_type typeL
- (analyse archive termC))]
+ termA (<| (typeA.expecting typeL)
+ (analyse archive termC))]
(in [typeJ termA])))
constructor_argumentsC)
selfT (//A.reflection_type mapping (/type.class class_name class_tvars))
@@ -1069,7 +1069,7 @@
{.#Item [self selfT]}
list.reversed
(list#mix scopeA.with_local (analyse archive bodyC))
- (typeA.with_type returnT)
+ (typeA.expecting returnT)
analysis.with_scope)]
(in [privacy strict_floating_point? annotations method_tvars exceptions
self arguments constructor_argumentsA
@@ -1099,7 +1099,7 @@
{.#Item [self selfT]}
list.reversed
(list#mix scopeA.with_local (analyse archive bodyC))
- (typeA.with_type returnT)
+ (typeA.expecting returnT)
analysis.with_scope)]
(in [[super_name super_tvars] method_name strict_floating_point? annotations
method_tvars self arguments returnJ exceptionsJ
@@ -1127,7 +1127,7 @@
{.#Item [self selfT]}
list.reversed
(list#mix scopeA.with_local (analyse archive bodyC))
- (typeA.with_type returnT)
+ (typeA.expecting returnT)
analysis.with_scope)]
(in [name privacy final? strict_floating_point? annotations method_tvars
self arguments returnJ exceptionsJ
@@ -1152,7 +1152,7 @@
[_scope bodyA] (|> arguments'
list.reversed
(list#mix scopeA.with_local (analyse archive bodyC))
- (typeA.with_type returnT)
+ (typeA.expecting returnT)
analysis.with_scope)]
(in [name privacy strict_floating_point? annotations method_tvars
arguments returnJ exceptionsJ
diff --git a/lux-jvm/source/luxc/lang/translation/jvm.lux b/lux-jvm/source/luxc/lang/translation/jvm.lux
index 0dcb684e9..c2f7cea68 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm.lux
@@ -109,10 +109,9 @@
..class_path_separator (%.nat module_id)
..class_path_separator (%.nat artifact_id)))
-(def: (evaluate! library loader context valueI)
- (-> Library java/lang/ClassLoader generation.Context Inst (Try [Any Definition]))
- (let [eval_class (..class_name context)
- bytecode_name (..bytecode_name eval_class)
+(def: (evaluate! library loader eval_class valueI)
+ (-> Library java/lang/ClassLoader Text Inst (Try [Any Definition]))
+ (let [bytecode_name (..bytecode_name eval_class)
bytecode (def.class {jvm.#V1_6}
{jvm.#Public} jvm.noneC
bytecode_name
@@ -149,7 +148,7 @@
(def: (define! library loader context custom valueI)
(-> Library java/lang/ClassLoader generation.Context (Maybe Text) Inst (Try [Text Any Definition]))
(do try.monad
- [[value definition] (evaluate! library loader context valueI)]
+ [[value definition] (evaluate! library loader (..class_name context) valueI)]
(in [(maybe.else (..class_name context)
custom)
value definition])))
@@ -163,7 +162,7 @@
(implementation
(def: (evaluate context valueI)
(# try.monad each product.left
- (..evaluate! library loader context valueI)))
+ (..evaluate! library loader (format "E" (..class_name context)) valueI)))
(def: execute
(..execute! library loader))