aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/runtime.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-05-01 22:33:17 -0400
committerEduardo Julian2019-05-01 22:33:17 -0400
commitb52409599fc5e93ad20e1aa61e44b75f5d6d2789 (patch)
treedb39a8208b316c0e47d9d0fffce12108e2e7b82a /new-luxc/source/luxc/lang/translation/jvm/runtime.lux
parent868c300ada4095e0e32ad4495b61aed02b23bfc0 (diff)
Now inlining the pattern-matching POP and PEEK operations.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/runtime.lux20
1 files changed, 9 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/runtime.lux b/new-luxc/source/luxc/lang/translation/jvm/runtime.lux
index fa250e2bf..175a60e80 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/runtime.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/runtime.lux
@@ -132,6 +132,15 @@
(_.wrap #$t.Double))))
))
+(def: #export popI
+ (|>> (_.int +0)
+ _.AALOAD
+ (_.CHECKCAST ($t.descriptor $Stack))))
+
+(def: #export peekI
+ (|>> (_.int +1)
+ _.AALOAD))
+
(def: pm-methods
Def
(let [tuple-sizeI (|>> (_.ALOAD 0) _.ARRAYLENGTH)
@@ -171,17 +180,6 @@
(_.ALOAD 1)
_.AASTORE
_.ARETURN))
- ($d.method #$.Public $.staticM "pm_pop" ($t.method (list $Stack) (#.Some $Stack) (list))
- (|>> (_.ALOAD 0)
- (_.int +0)
- _.AALOAD
- (_.CHECKCAST ($t.descriptor $Stack))
- _.ARETURN))
- ($d.method #$.Public $.staticM "pm_peek" ($t.method (list $Stack) (#.Some $Object) (list))
- (|>> (_.ALOAD 0)
- (_.int +1)
- _.AALOAD
- _.ARETURN))
($d.method #$.Public $.staticM "pm_variant" ($t.method (list $Variant $Tag $Flag) (#.Some $Object) (list))
(<| _.with-label (function (_ @loop))
_.with-label (function (_ @just-return))