From a79927892174c3564c83a0e741e5cc0aaaeeb37c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 30 Jun 2017 18:43:07 -0400 Subject: - WIP: Added generation for common procedures. --- new-luxc/source/luxc/generator/runtime.jvm.lux | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'new-luxc/source/luxc/generator/runtime.jvm.lux') diff --git a/new-luxc/source/luxc/generator/runtime.jvm.lux b/new-luxc/source/luxc/generator/runtime.jvm.lux index 5c6ce29a6..8c0b294c1 100644 --- a/new-luxc/source/luxc/generator/runtime.jvm.lux +++ b/new-luxc/source/luxc/generator/runtime.jvm.lux @@ -39,6 +39,10 @@ (visitEnd [] void) (toByteArray [] Byte-Array)) +(def: #export runtime-name Text "LuxRT") +(def: #export function-name Text "LuxFunction") +(def: #export unit Text "\u0000") + (def: $Object $;Type ($t;class "java.lang.Object" (list))) (def: add-adt-methods @@ -65,9 +69,9 @@ #let [writer (|> (do-to (ClassWriter.new ClassWriter.COMPUTE_MAXS) (ClassWriter.visit [&common;bytecode-version ($_ i.+ Opcodes.ACC_PUBLIC Opcodes.ACC_FINAL Opcodes.ACC_SUPER) - &common;runtime-class-name (host;null) + runtime-name (host;null) "java/lang/Object" (host;null)])) add-adt-methods) bytecode (ClassWriter.toByteArray [] (do-to writer (ClassWriter.visitEnd [])))] - _ (&common;store-class &common;runtime-class-name bytecode)] + _ (&common;store-class runtime-name bytecode)] (wrap bytecode))) -- cgit v1.2.3