aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/procedure
diff options
context:
space:
mode:
authorEduardo Julian2019-09-07 19:26:01 -0400
committerEduardo Julian2019-09-07 19:26:01 -0400
commit747abe180b2669b6af5779dcf39ab5a8b6ed11ed (patch)
tree088fca10b0ec3d8f8742060e2cd31a7d1b8c2f9a /new-luxc/source/luxc/lang/translation/jvm/procedure
parentb63ac226cc2ea843f08f7c72b18d22602462c624 (diff)
Got rid of a useless parameter to the INVOKE instructions.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux32
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux38
2 files changed, 25 insertions, 45 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux
index 06ae2ba26..9ed40a99a 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux
@@ -128,9 +128,7 @@
(Unary Inst)
(|>> riskyI
(_.CHECKCAST ///.$Function)
- (_.INVOKESTATIC runtime.$Runtime "try"
- (type.method [(list ///.$Function) ///.$Variant (list)])
- #0)))
+ (_.INVOKESTATIC runtime.$Runtime "try" (type.method [(list ///.$Function) ///.$Variant (list)]))))
(template [<name> <op>]
[(def: (<name> [maskI inputI])
@@ -212,20 +210,20 @@
[i64::f64 (_.unwrap type.long) (<| (_.wrap type.double) _.L2D)]
[i64::char (_.unwrap type.long)
- ((|>> _.L2I _.I2C (_.INVOKESTATIC (type.class "java.lang.Character" (list)) "toString" (type.method [(list type.char) $String (list)]) #0)))]
+ ((|>> _.L2I _.I2C (_.INVOKESTATIC (type.class "java.lang.Character" (list)) "toString" (type.method [(list type.char) $String (list)]))))]
[f64::i64 (_.unwrap type.double) (<| (_.wrap type.long) _.D2L)]
[f64::encode (_.unwrap type.double)
- (_.INVOKESTATIC (type.class "java.lang.Double" (list)) "toString" (type.method [(list type.double) $String (list)]) #0)]
+ (_.INVOKESTATIC (type.class "java.lang.Double" (list)) "toString" (type.method [(list type.double) $String (list)]))]
[f64::decode ..check-stringI
- (_.INVOKESTATIC runtime.$Runtime "decode_frac" (type.method [(list $String) ///.$Variant (list)]) #0)]
+ (_.INVOKESTATIC runtime.$Runtime "decode_frac" (type.method [(list $String) ///.$Variant (list)]))]
)
(def: (text::size inputI)
(Unary Inst)
(|>> inputI
..check-stringI
- (_.INVOKEVIRTUAL $String "length" (type.method [(list) type.int (list)]) #0)
+ (_.INVOKEVIRTUAL $String "length" (type.method [(list) type.int (list)]))
lux-intI))
(template [<name> <pre-subject> <pre-param> <op> <post>]
@@ -236,13 +234,13 @@
<op> <post>))]
[text::= (<|) (<|)
- (_.INVOKEVIRTUAL $Object "equals" (type.method [(list $Object) type.boolean (list)]) #0)
+ (_.INVOKEVIRTUAL $Object "equals" (type.method [(list $Object) type.boolean (list)]))
(_.wrap type.boolean)]
[text::< ..check-stringI ..check-stringI
- (_.INVOKEVIRTUAL $String "compareTo" (type.method [(list $String) type.int (list)]) #0)
+ (_.INVOKEVIRTUAL $String "compareTo" (type.method [(list $String) type.int (list)]))
(predicateI _.IFLT)]
[text::char ..check-stringI jvm-intI
- (_.INVOKEVIRTUAL $String "charAt" (type.method [(list type.int) type.char (list)]) #0)
+ (_.INVOKEVIRTUAL $String "charAt" (type.method [(list type.int) type.char (list)]))
lux-intI]
)
@@ -250,14 +248,14 @@
(Binary Inst)
(|>> leftI ..check-stringI
rightI ..check-stringI
- (_.INVOKEVIRTUAL $String "concat" (type.method [(list $String) $String (list)]) #0)))
+ (_.INVOKEVIRTUAL $String "concat" (type.method [(list $String) $String (list)]))))
(def: (text::clip [startI endI subjectI])
(Trinary Inst)
(|>> subjectI ..check-stringI
startI jvm-intI
endI jvm-intI
- (_.INVOKEVIRTUAL $String "substring" (type.method [(list type.int type.int) $String (list)]) #0)))
+ (_.INVOKEVIRTUAL $String "substring" (type.method [(list type.int type.int) $String (list)]))))
(def: index-method (type.method [(list $String type.int) type.int (list)]))
(def: (text::index [startI partI textI])
@@ -267,7 +265,7 @@
(|>> textI ..check-stringI
partI ..check-stringI
startI jvm-intI
- (_.INVOKEVIRTUAL $String "indexOf" index-method #0)
+ (_.INVOKEVIRTUAL $String "indexOf" index-method)
_.DUP
(_.int -1)
(_.IF_ICMPEQ @not-found)
@@ -286,7 +284,7 @@
(|>> (_.GETSTATIC $System "out" $PrintStream)
messageI
..check-stringI
- (_.INVOKEVIRTUAL $PrintStream "println" string-method #0)
+ (_.INVOKEVIRTUAL $PrintStream "println" string-method)
unitI)))
(def: (io::error messageI)
@@ -296,18 +294,18 @@
_.DUP
messageI
..check-stringI
- (_.INVOKESPECIAL $Error "<init>" string-method #0)
+ (_.INVOKESPECIAL $Error "<init>" string-method)
_.ATHROW)))
(def: (io::exit codeI)
(Unary Inst)
(|>> codeI jvm-intI
- (_.INVOKESTATIC $System "exit" (type.method [(list type.int) type.void (list)]) #0)
+ (_.INVOKESTATIC $System "exit" (type.method [(list type.int) type.void (list)]))
_.NULL))
(def: (io::current-time _)
(Nullary Inst)
- (|>> (_.INVOKESTATIC $System "currentTimeMillis" (type.method [(list) type.long (list)]) #0)
+ (|>> (_.INVOKESTATIC $System "currentTimeMillis" (type.method [(list) type.long (list)]))
(_.wrap type.long)))
(def: bundle::lux
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux
index 58643797b..b01056479 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux
@@ -534,11 +534,7 @@
(do phase.monad
[]
(wrap (|>> (_.string class)
- (_.INVOKESTATIC $Class "forName"
- (type.method [(list (type.class "java.lang.String" (list)))
- $Class
- (list)])
- false))))
+ (_.INVOKESTATIC $Class "forName" (type.method [(list (type.class "java.lang.String" (list))) $Class (list)])))))
_
(phase.throw extension.invalid-syntax [extension-name %synthesis inputs])))
@@ -736,14 +732,10 @@
(do phase.monad
[inputsTI (monad.map @ (generate-input generate) inputsTS)]
(wrap (|>> (_.fuse (list@map product.right inputsTI))
- (_.INVOKESTATIC class method
- (type.method [(list@map product.left inputsTI)
- outputT
- (list)])
- false)
+ (_.INVOKESTATIC class method (type.method [(list@map product.left inputsTI) outputT (list)]))
(prepare-output outputT)))))]))
-(template [<name> <invoke> <interface?>]
+(template [<name> <invoke>]
[(def: <name>
Handler
(..custom
@@ -758,13 +750,12 @@
(<invoke> class method
(type.method [(list@map product.left inputsTI)
outputT
- (list)])
- <interface?>)
+ (list)]))
(prepare-output outputT)))))]))]
- [invoke::virtual _.INVOKEVIRTUAL false]
- [invoke::special _.INVOKESPECIAL false]
- [invoke::interface _.INVOKEINTERFACE true]
+ [invoke::virtual _.INVOKEVIRTUAL]
+ [invoke::special _.INVOKESPECIAL]
+ [invoke::interface _.INVOKEINTERFACE]
)
(def: invoke::constructor
@@ -777,11 +768,7 @@
(wrap (|>> (_.NEW class)
_.DUP
(_.fuse (list@map product.right inputsTI))
- (_.INVOKESPECIAL class "<init>"
- (type.method [(list@map product.left inputsTI)
- type.void
- (list)])
- false)))))]))
+ (_.INVOKESPECIAL class "<init>" (type.method [(list@map product.left inputsTI) type.void (list)]))))))]))
(def: member
Bundle
@@ -931,12 +918,7 @@
(_def.method #$.Public $.noneM "<init>" (anonymous-init-method env)
(|>> (_.ALOAD 0)
((_.fuse (list@map product.right inputsTI)))
- (_.INVOKESPECIAL super-class
- "<init>"
- (type.method [(list@map product.left inputsTI)
- type.void
- (list)])
- #0)
+ (_.INVOKESPECIAL super-class "<init>" (type.method [(list@map product.left inputsTI) type.void (list)]))
store-capturedI
_.RETURN))))
@@ -947,7 +929,7 @@
(wrap (|>> (_.NEW class)
_.DUP
(_.fuse captureI+)
- (_.INVOKESPECIAL class "<init>" (anonymous-init-method env) #0)))))
+ (_.INVOKESPECIAL class "<init>" (anonymous-init-method env))))))
(def: (returnI returnT)
(-> (Type Return) Inst)