aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm
diff options
context:
space:
mode:
authorEduardo Julian2018-07-30 23:40:48 -0400
committerEduardo Julian2018-07-30 23:40:48 -0400
commit748c868680683df1949f62aac274040ac5bf43da (patch)
tree67b3bd8fb402dfd00fc0ee472186fc79e6545ac7 /new-luxc/source/luxc/lang/translation/jvm
parent76b47564f89bac5eb6604da7bbb94aabb83d6d84 (diff)
Now implementing math functionality in stdlib instead of the compiler.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux70
1 files changed, 0 insertions, 70 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
index 2334f9cc2..327a95871 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
@@ -378,53 +378,6 @@
runtimeT.noneI
(_.label @end))))
-## [[Math]]
-(def: math-unary-method ($t.method (list $t.double) (#.Some $t.double) (list)))
-(def: math-binary-method ($t.method (list $t.double $t.double) (#.Some $t.double) (list)))
-
-(do-template [<name> <method>]
- [(def: (<name> inputI)
- Unary
- (|>> inputI
- (_.unwrap #$.Double)
- (_.INVOKESTATIC "java.lang.Math" <method> math-unary-method #0)
- (_.wrap #$.Double)))]
-
- [math//cos "cos"]
- [math//sin "sin"]
- [math//tan "tan"]
- [math//acos "acos"]
- [math//asin "asin"]
- [math//atan "atan"]
- [math//cosh "cosh"]
- [math//sinh "sinh"]
- [math//tanh "tanh"]
- [math//exp "exp"]
- [math//log "log"]
- [math//ceil "ceil"]
- [math//floor "floor"]
- )
-
-(do-template [<name> <method>]
- [(def: (<name> [inputI paramI])
- Binary
- (|>> inputI (_.unwrap #$.Double)
- paramI (_.unwrap #$.Double)
- (_.INVOKESTATIC "java.lang.Math" <method> math-binary-method #0)
- (_.wrap #$.Double)))]
-
- [math//atan2 "atan2"]
- [math//pow "pow"]
- )
-
-(def: (math//round inputI)
- Unary
- (|>> inputI
- (_.unwrap #$.Double)
- (_.INVOKESTATIC "java.lang.Math" "round" ($t.method (list $t.double) (#.Some $t.long) (list)) #0)
- _.L2D
- (_.wrap #$.Double)))
-
## [[IO]]
(def: string-method $.Method ($t.method (list $String) #.None (list)))
(def: (io//log messageI)
@@ -597,28 +550,6 @@
(install "size" (unary array//size))
)))
-(def: math-procs
- Bundle
- (<| (prefix "math")
- (|> (dict.new text.Hash<Text>)
- (install "cos" (unary math//cos))
- (install "sin" (unary math//sin))
- (install "tan" (unary math//tan))
- (install "acos" (unary math//acos))
- (install "asin" (unary math//asin))
- (install "atan" (unary math//atan))
- (install "cosh" (unary math//cosh))
- (install "sinh" (unary math//sinh))
- (install "tanh" (unary math//tanh))
- (install "exp" (unary math//exp))
- (install "log" (unary math//log))
- (install "ceil" (unary math//ceil))
- (install "floor" (unary math//floor))
- (install "round" (unary math//round))
- (install "atan2" (binary math//atan2))
- (install "pow" (binary math//pow))
- )))
-
(def: io-procs
Bundle
(<| (prefix "io")
@@ -661,7 +592,6 @@
(dict.merge frac-procs)
(dict.merge text-procs)
(dict.merge array-procs)
- (dict.merge math-procs)
(dict.merge io-procs)
(dict.merge atom-procs)
(dict.merge box-procs)