aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux25
1 files changed, 11 insertions, 14 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
index c8076cada..f2349ff41 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
@@ -162,19 +162,18 @@
(def: (risky $unsafe)
(-> (Bytecode Any) (Bytecode Any))
(do _.monad
- [@from _.new-label
- @to _.new-label
+ [@try _.new-label
@handler _.new-label]
($_ _.compose
- (_.try @from @to @handler //type.error)
- (_.set-label @from)
+ (_.try @try @handler @handler //type.error)
+ (_.set-label @try)
$unsafe
..some-injection
_.areturn
- (_.set-label @to)
(_.set-label @handler)
..none-injection
- _.areturn)))
+ _.areturn
+ )))
(def: decode-frac::name "decode_frac")
(def: decode-frac::type (type.method [(list //type.text) //type.variant (list)]))
@@ -189,7 +188,8 @@
($_ _.compose
..this
(_.invokestatic //type.frac "parseDouble" (type.method [(list //type.text) type.double (list)]))
- (//value.wrap type.double))))))
+ (//value.wrap type.double)
+ )))))
(def: #export log!
(Bytecode Any)
@@ -450,8 +450,7 @@
(list)
(#.Some
(do _.monad
- [@from _.new-label
- @to _.new-label
+ [@try _.new-label
@handler _.new-label
#let [$unsafe ..this
unit _.aconst-null
@@ -473,11 +472,10 @@
## WTP
)]]
($_ _.compose
- (_.try @from @to @handler //type.error)
- (_.set-label @from)
+ (_.try @try @handler @handler //type.error)
+ (_.set-label @try)
$unsafe unit ..apply
..right-injection _.areturn
- (_.set-label @to)
(_.set-label @handler) ## T
string-writer ## TW
_.dup-x1 ## WTW
@@ -520,8 +518,7 @@
left-projection::method
right-projection::method
- ..try::method
- ))
+ ..try::method))
(row.row)))]
(do ////.monad
[_ (///.execute! class [class bytecode])]