aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/packager.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-10-27 01:10:13 -0400
committerEduardo Julian2019-10-27 01:10:13 -0400
commitaab604028e117e505bc408f69dc416fe6d9f46a7 (patch)
tree5184e162e8524ea687d5567656029197742b9302 /new-luxc/source/luxc/lang/packager.lux
parent87a9d756a9e94fb81fc14fea39df3e20d394afdb (diff)
Almost completely ported JVM runtime generation to the new JVM bytecode machinery.
Diffstat (limited to 'new-luxc/source/luxc/lang/packager.lux')
-rw-r--r--new-luxc/source/luxc/lang/packager.lux8
1 files changed, 5 insertions, 3 deletions
diff --git a/new-luxc/source/luxc/lang/packager.lux b/new-luxc/source/luxc/lang/packager.lux
index f18055b18..d72506da2 100644
--- a/new-luxc/source/luxc/lang/packager.lux
+++ b/new-luxc/source/luxc/lang/packager.lux
@@ -65,8 +65,10 @@
(putNextEntry [java/util/zip/ZipEntry] void))
(def: byte 1)
-(def: kilo-byte (n.* 1,000 byte))
-(def: mega-byte (n.* 1,000 kilo-byte))
+## https://en.wikipedia.org/wiki/Kibibyte
+(def: kibi-byte (n.* 1,024 byte))
+## https://en.wikipedia.org/wiki/Mebibyte
+(def: mebi-byte (n.* 1,024 kibi-byte))
(def: manifest-version "1.0")
@@ -99,7 +101,7 @@
(def: #export (package program-class outputs)
(-> External (Output Definition) Binary)
- (let [buffer (java/io/ByteArrayOutputStream::new (.int mega-byte))
+ (let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi-byte))
sink (java/util/jar/JarOutputStream::new buffer (manifest program-class))]
(exec (|> outputs
row.to-list