From ca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 6 Apr 2018 08:32:41 -0400 Subject: - Adapted new-luxc's code to latest stdlib changes. --- new-luxc/source/luxc/lang/host/jvm/def.lux | 10 +++++----- new-luxc/source/luxc/lang/host/jvm/inst.lux | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'new-luxc/source/luxc/lang/host/jvm') diff --git a/new-luxc/source/luxc/lang/host/jvm/def.lux b/new-luxc/source/luxc/lang/host/jvm/def.lux index 8c73c1086..4cb7aba3e 100644 --- a/new-luxc/source/luxc/lang/host/jvm/def.lux +++ b/new-luxc/source/luxc/lang/host/jvm/def.lux @@ -63,7 +63,7 @@ (def: (string-array values) (-> (List Text) (Array Text)) (let [output (host.array String (list.size values))] - (exec (list/map (function [[idx value]] + (exec (list/map (function (_ [idx value]) (host.array-write idx value output)) (list.enumerate values)) output))) @@ -206,7 +206,7 @@ (def: #export (method visibility config name type then) (-> $.Visibility $.Method-Config Text $.Method $.Inst $.Def) - (function [writer] + (function (_ writer) (let [=method (ClassWriter::visitMethod [($_ i/+ (visibility-flag visibility) (method-flags config)) @@ -224,7 +224,7 @@ (def: #export (abstract-method visibility config name type) (-> $.Visibility $.Method-Config Text $.Method $.Def) - (function [writer] + (function (_ writer) (let [=method (ClassWriter::visitMethod [($_ i/+ (visibility-flag visibility) (method-flags config) @@ -239,7 +239,7 @@ (def: #export (field visibility config name type) (-> $.Visibility $.Field-Config Text $.Type $.Def) - (function [writer] + (function (_ writer) (let [=field (do-to (ClassWriter::visitField [($_ i/+ (visibility-flag visibility) (field-flags config)) @@ -253,7 +253,7 @@ (do-template [ ] [(def: #export ( visibility config name value) (-> $.Visibility $.Field-Config Text $.Def) - (function [writer] + (function (_ writer) (let [=field (do-to (ClassWriter::visitField [($_ i/+ (visibility-flag visibility) (field-flags config)) diff --git a/new-luxc/source/luxc/lang/host/jvm/inst.lux b/new-luxc/source/luxc/lang/host/jvm/inst.lux index 0b1904020..f993f0c48 100644 --- a/new-luxc/source/luxc/lang/host/jvm/inst.lux +++ b/new-luxc/source/luxc/lang/host/jvm/inst.lux @@ -20,7 +20,7 @@ (syntax: (declare [codes (p.many s.local-symbol)]) (|> codes - (list/map (function [code] (` ((~' #static) (~ (code.local-symbol code)) (~' int))))) + (list/map (function (_ code) (` ((~' #static) (~ (code.local-symbol code)) (~' int))))) wrap)) (`` (host.import org/objectweb/asm/Opcodes @@ -113,7 +113,7 @@ ## [Insts] (def: #export make-label (Meta Label) - (function [compiler] + (function (_ compiler) (#e.Success [compiler (Label::new [])]))) (def: #export (with-label action) @@ -123,7 +123,7 @@ (do-template [ ] [(def: #export ( value) (-> $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitLdcInsn [( value)]))))] @@ -140,14 +140,14 @@ (def: #export NULL $.Inst - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitInsn [(prefix ACONST_NULL)])))) (do-template [] [(def: #export $.Inst - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitInsn [(prefix )]))))] @@ -208,7 +208,7 @@ (do-template [] [(def: #export ( register) (-> Nat $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitVarInsn [(prefix ) (nat-to-int register)]))))] @@ -219,7 +219,7 @@ (do-template [ ] [(def: #export ( class field type) (-> Text Text $.Type $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitFieldInsn [ ($t.binary-name class) field ($t.descriptor type)]))))] @@ -233,7 +233,7 @@ (do-template [ ] [(def: #export ( class) (-> Text $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitTypeInsn [ ($t.binary-name class)]))))] @@ -245,7 +245,7 @@ (def: #export (NEWARRAY type) (-> $.Primitive $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitIntInsn [Opcodes::NEWARRAY (case type #$.Boolean Opcodes::T_BOOLEAN @@ -260,7 +260,7 @@ (do-template [ ] [(def: #export ( class method-name method-signature interface?) (-> Text Text $.Method Bool $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitMethodInsn [ ($t.binary-name class) method-name ($t.method-descriptor method-signature) interface?]))))] @@ -273,7 +273,7 @@ (do-template [] [(def: #export ( @where) (-> $.Label $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitJumpInsn [(prefix ) @where]))))] @@ -284,7 +284,7 @@ (def: #export (TABLESWITCH min max default labels) (-> Int Int $.Label (List $.Label) $.Inst) - (function [visitor] + (function (_ visitor) (let [num-labels (list.size labels) labels-array (host.array Label num-labels) _ (loop [idx +0] @@ -299,13 +299,13 @@ (def: #export (try @from @to @handler exception) (-> $.Label $.Label $.Label Text $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitTryCatchBlock [@from @to @handler ($t.binary-name exception)])))) (def: #export (label @label) (-> $.Label $.Inst) - (function [visitor] + (function (_ visitor) (do-to visitor (MethodVisitor::visitLabel [@label])))) -- cgit v1.2.3