diff options
author | Eduardo Julian | 2019-12-21 06:13:47 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-12-21 06:13:47 -0400 |
commit | 2690a6ba8ff7998f8dbb778b93fa22976eadb4ac (patch) | |
tree | 3e42ebf5b121c85feaacc23f9beac0739086289a /stdlib/source/lux/tool | |
parent | b7cff25b71f024a4da86603e5a0b432fae1601e6 (diff) |
Properly track how the stack changes in the presence of discontinuities.
Diffstat (limited to 'stdlib/source/lux/tool')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux | 25 |
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])] |