From aab604028e117e505bc408f69dc416fe6d9f46a7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 27 Oct 2019 01:10:13 -0400 Subject: Almost completely ported JVM runtime generation to the new JVM bytecode machinery. --- new-luxc/source/luxc/lang/packager.lux | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'new-luxc/source/luxc/lang/packager.lux') 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 -- cgit v1.2.3