diff options
Diffstat (limited to 'new-luxc')
37 files changed, 195 insertions, 195 deletions
diff --git a/new-luxc/source/luxc/io.jvm.lux b/new-luxc/source/luxc/io.jvm.lux index 16c2f4726..c0c913772 100644 --- a/new-luxc/source/luxc/io.jvm.lux +++ b/new-luxc/source/luxc/io.jvm.lux @@ -11,7 +11,7 @@ (world [file #+ File] [blob #+ Blob]))) -(host.import java/lang/String +(host.import: java/lang/String (new [(Array byte)])) (def: host-extension Text ".jvm") diff --git a/new-luxc/source/luxc/lang/host.jvm.lux b/new-luxc/source/luxc/lang/host.jvm.lux index 0491cae25..b9f0588b1 100644 --- a/new-luxc/source/luxc/lang/host.jvm.lux +++ b/new-luxc/source/luxc/lang/host.jvm.lux @@ -17,24 +17,24 @@ (luxc [lang] (lang (translation (jvm [".T" common]))))) -(host.import org/objectweb/asm/Label) +(host.import: org/objectweb/asm/Label) -(host.import java/lang/reflect/AccessibleObject +(host.import: java/lang/reflect/AccessibleObject (setAccessible [boolean] void)) -(host.import java/lang/reflect/Method +(host.import: java/lang/reflect/Method (invoke [Object (Array Object)] #try Object)) -(host.import (java/lang/Class a) +(host.import: (java/lang/Class a) (getDeclaredMethod [String (Array (Class Object))] #try Method)) -(host.import java/lang/Object +(host.import: java/lang/Object (getClass [] (Class Object))) -(host.import java/lang/Integer +(host.import: java/lang/Integer (#static TYPE (Class Integer))) -(host.import java/lang/ClassLoader) +(host.import: java/lang/ClassLoader) (def: ClassLoader::defineClass Method diff --git a/new-luxc/source/luxc/lang/host/jvm.lux b/new-luxc/source/luxc/lang/host/jvm.lux index 20dd4c37b..d30df3fd3 100644 --- a/new-luxc/source/luxc/lang/host/jvm.lux +++ b/new-luxc/source/luxc/lang/host/jvm.lux @@ -9,11 +9,11 @@ [host])) ## [Host] -(host.import org/objectweb/asm/MethodVisitor) +(host.import: org/objectweb/asm/MethodVisitor) -(host.import org/objectweb/asm/ClassWriter) +(host.import: org/objectweb/asm/ClassWriter) -(host.import #long org/objectweb/asm/Label +(host.import: #long org/objectweb/asm/Label (new [])) ## [Type] diff --git a/new-luxc/source/luxc/lang/host/jvm/def.lux b/new-luxc/source/luxc/lang/host/jvm/def.lux index 86f7999ba..c973f79c3 100644 --- a/new-luxc/source/luxc/lang/host/jvm/def.lux +++ b/new-luxc/source/luxc/lang/host/jvm/def.lux @@ -11,10 +11,10 @@ (// ["$t" type])) ## [Host] -(host.import #long java/lang/Object) -(host.import #long java/lang/String) +(host.import: #long java/lang/Object) +(host.import: #long java/lang/String) -(host.import org/objectweb/asm/Opcodes +(host.import: org/objectweb/asm/Opcodes (#static ACC_PUBLIC int) (#static ACC_PROTECTED int) (#static ACC_PRIVATE int) @@ -41,15 +41,15 @@ (#static V1_8 int) ) -(host.import org/objectweb/asm/FieldVisitor +(host.import: org/objectweb/asm/FieldVisitor (visitEnd [] void)) -(host.import org/objectweb/asm/MethodVisitor +(host.import: org/objectweb/asm/MethodVisitor (visitCode [] void) (visitMaxs [int int] void) (visitEnd [] void)) -(host.import org/objectweb/asm/ClassWriter +(host.import: org/objectweb/asm/ClassWriter (#static COMPUTE_MAXS int) (#static COMPUTE_FRAMES int) (new [int]) diff --git a/new-luxc/source/luxc/lang/host/jvm/inst.lux b/new-luxc/source/luxc/lang/host/jvm/inst.lux index 671a2bb3c..c3088ec7d 100644 --- a/new-luxc/source/luxc/lang/host/jvm/inst.lux +++ b/new-luxc/source/luxc/lang/host/jvm/inst.lux @@ -15,15 +15,15 @@ [//type]) ## [Host] -(host.import #long java/lang/Object) -(host.import #long java/lang/String) +(host.import: #long java/lang/Object) +(host.import: #long java/lang/String) (syntax: (declare {codes (p.many s.local-symbol)}) (|> codes (list/map (function (_ code) (` ((~' #static) (~ (code.local-symbol code)) (~' int))))) wrap)) -(`` (host.import org/objectweb/asm/Opcodes +(`` (host.import: org/objectweb/asm/Opcodes (#static NOP int) ## Conversion @@ -90,10 +90,10 @@ (~~ (declare RETURN IRETURN LRETURN DRETURN ARETURN)) )) -(host.import org/objectweb/asm/Label +(host.import: org/objectweb/asm/Label (new [])) -(host.import org/objectweb/asm/MethodVisitor +(host.import: org/objectweb/asm/MethodVisitor (visitCode [] void) (visitMaxs [int int] void) (visitEnd [] void) diff --git a/new-luxc/source/luxc/lang/macro.lux b/new-luxc/source/luxc/lang/macro.lux index 4e22047b2..17ed2436b 100644 --- a/new-luxc/source/luxc/lang/macro.lux +++ b/new-luxc/source/luxc/lang/macro.lux @@ -7,11 +7,11 @@ (luxc (lang [".L" host] (translation (jvm [".T" common]))))) -(for {"JVM" (as-is (host.import java/lang/reflect/Method +(for {"JVM" (as-is (host.import: java/lang/reflect/Method (invoke [Object (Array Object)] #try Object)) - (host.import (java/lang/Class c) + (host.import: (java/lang/Class c) (getMethod [String (Array (Class Object))] #try Method)) - (host.import java/lang/Object) + (host.import: java/lang/Object) (def: _object-class (Class Object) (host.class-for Object)) (def: _apply-args (Array (Class Object)) diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux index 0ed65378d..7c1de9883 100644 --- a/new-luxc/source/luxc/lang/translation.lux +++ b/new-luxc/source/luxc/lang/translation.lux @@ -162,7 +162,7 @@ (#e.Success [(set@ #.source source' compiler) output])))) -(for {"JVM" (as-is (host.import java/lang/String +(for {"JVM" (as-is (host.import: java/lang/String (getBytes [String] #try (Array byte))) (def: text-to-blob diff --git a/new-luxc/source/luxc/lang/translation/common-lisp.lux b/new-luxc/source/luxc/lang/translation/common-lisp.lux index 4341e5e4c..d407ae7ab 100644 --- a/new-luxc/source/luxc/lang/translation/common-lisp.lux +++ b/new-luxc/source/luxc/lang/translation/common-lisp.lux @@ -28,21 +28,21 @@ [No-Anchor] ) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import org/armedbear/lisp/LispObject) +(host.import: org/armedbear/lisp/LispObject) -(host.import org/armedbear/lisp/Interpreter +(host.import: org/armedbear/lisp/Interpreter (#static getInstance [] Interpreter) (#static createInstance [] #? Interpreter) (eval [String] #try LispObject)) diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux index 0108d2e83..a10fa0d5d 100644 --- a/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux @@ -13,14 +13,14 @@ (lang (host ["_" common-lisp #+ Expression]))) [//]) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String) (getClass [] (Class Object))) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) -(host.import (java/lang/Class ?) +(host.import: (java/lang/Class ?) (#static forName [String] #try (Class Object))) (def: _0 @@ -46,27 +46,27 @@ text-representation (:coerce Text (Object::toString [] (:coerce Object host-object)))] (format object-class " --- " text-representation))) -(host.import org/armedbear/lisp/LispObject) +(host.import: org/armedbear/lisp/LispObject) -(host.import org/armedbear/lisp/SimpleString +(host.import: org/armedbear/lisp/SimpleString (getStringValue [] String)) -(host.import org/armedbear/lisp/Symbol +(host.import: org/armedbear/lisp/Symbol (#static T Symbol) (getName [] String)) -(host.import org/armedbear/lisp/DoubleFloat +(host.import: org/armedbear/lisp/DoubleFloat (doubleValue [] double)) -(host.import org/armedbear/lisp/Bignum +(host.import: org/armedbear/lisp/Bignum (longValue [] long)) -(host.import org/armedbear/lisp/Fixnum +(host.import: org/armedbear/lisp/Fixnum (longValue [] long)) -(host.import org/armedbear/lisp/Nil) +(host.import: org/armedbear/lisp/Nil) -(host.import org/armedbear/lisp/SimpleVector +(host.import: org/armedbear/lisp/SimpleVector (length [] int) (elt [int] LispObject)) @@ -93,7 +93,7 @@ (host.null))) value]) -(host.import org/armedbear/lisp/Cons +(host.import: org/armedbear/lisp/Cons (car LispObject) (cdr LispObject)) diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux index 7387c0dda..43ef5c384 100644 --- a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux @@ -211,7 +211,7 @@ ))) ## [[Numbers]] -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double)) diff --git a/new-luxc/source/luxc/lang/translation/js.lux b/new-luxc/source/luxc/lang/translation/js.lux index 9fd2d098f..9a7f55dd0 100644 --- a/new-luxc/source/luxc/lang/translation/js.lux +++ b/new-luxc/source/luxc/lang/translation/js.lux @@ -30,43 +30,43 @@ [Unknown-Member] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String)) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/Integer +(host.import: java/lang/Integer (longValue [] Long)) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import javax/script/ScriptEngine +(host.import: javax/script/ScriptEngine (eval [String] #try #? Object)) -(host.import javax/script/ScriptEngineFactory +(host.import: javax/script/ScriptEngineFactory (getScriptEngine [] ScriptEngine)) -(host.import jdk/nashorn/api/scripting/NashornScriptEngineFactory +(host.import: jdk/nashorn/api/scripting/NashornScriptEngineFactory (new [])) -(host.import jdk/nashorn/api/scripting/NashornScriptEngine) +(host.import: jdk/nashorn/api/scripting/NashornScriptEngine) -(host.import jdk/nashorn/api/scripting/JSObject) +(host.import: jdk/nashorn/api/scripting/JSObject) -(host.import jdk/nashorn/api/scripting/AbstractJSObject) +(host.import: jdk/nashorn/api/scripting/AbstractJSObject) -(host.import java/util/Arrays +(host.import: java/util/Arrays (#static [t] copyOfRange [(Array t) int int] (Array t))) (type: #export Anchor [Text Register]) @@ -230,7 +230,7 @@ (interface: IntValue (getValue [] Long)) -(host.import luxc/lang/translation/js/IntValue) +(host.import: luxc/lang/translation/js/IntValue) (def: (js-int value) (-> Int JSObject) @@ -254,7 +254,7 @@ (interface: StructureValue (getValue [] (Array Object))) -(host.import luxc/lang/translation/js/StructureValue) +(host.import: luxc/lang/translation/js/StructureValue) (def: (js-structure value) (-> (Array Object) JSObject) diff --git a/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux index 8019ded53..89f419cc3 100644 --- a/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/eval.jvm.lux @@ -21,37 +21,37 @@ [Cannot-Evaluate] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String)) -(host.import java/lang/Integer +(host.import: java/lang/Integer (longValue [] Long)) -(host.import java/lang/Number +(host.import: java/lang/Number (doubleValue [] double) (longValue [] Long) (intValue [] Integer)) -(host.import javax/script/ScriptEngine +(host.import: javax/script/ScriptEngine (eval [String] #try #? Object)) -(host.import jdk/nashorn/api/scripting/JSObject +(host.import: jdk/nashorn/api/scripting/JSObject (isArray [] boolean) (isFunction [] boolean) (getMember [String] #? Object) (hasMember [String] boolean)) -(host.import jdk/nashorn/api/scripting/AbstractJSObject) +(host.import: jdk/nashorn/api/scripting/AbstractJSObject) -(host.import jdk/nashorn/api/scripting/ScriptObjectMirror +(host.import: jdk/nashorn/api/scripting/ScriptObjectMirror (size [] int)) -(host.import jdk/nashorn/internal/runtime/Undefined) +(host.import: jdk/nashorn/internal/runtime/Undefined) -(host.import luxc/lang/translation/js/IntValue +(host.import: luxc/lang/translation/js/IntValue (getValue [] Long)) -(host.import luxc/lang/translation/js/StructureValue +(host.import: luxc/lang/translation/js/StructureValue (getValue [] (Array Object))) (def: (int js-object) diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux index fede43875..7b4a19b91 100644 --- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux @@ -190,11 +190,11 @@ (format arrayJS ".length")) ## [[Numbers]] -(host.import java/lang/Long +(host.import: java/lang/Long (#static MIN_VALUE Long) (#static MAX_VALUE Long)) -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double) (#static NaN Double) diff --git a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux index 2f35bad7c..2dab7b6ac 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux @@ -20,20 +20,20 @@ ["$d" def] ["$i" inst]))))) -(host.import org/objectweb/asm/Opcodes +(host.import: org/objectweb/asm/Opcodes (#static V1_6 int)) -(host.import org/objectweb/asm/Label) +(host.import: org/objectweb/asm/Label) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import java/lang/reflect/Field +(host.import: java/lang/reflect/Field (get [#? Object] #try #? Object)) -(host.import (java/lang/Class c) +(host.import: (java/lang/Class c) (getField [String] #try Field)) -(host.import java/lang/ClassLoader +(host.import: java/lang/ClassLoader (loadClass [String] (Class Object))) (type: #export Bytecode Blob) diff --git a/new-luxc/source/luxc/lang/translation/jvm/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/eval.jvm.lux index d8e8ffd5e..aed1abca3 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/eval.jvm.lux @@ -14,10 +14,10 @@ ["ls" synthesis])) (// [".T" common])) -(host.import java/lang/reflect/Field +(host.import: java/lang/reflect/Field (get [Object] Object)) -(host.import (java/lang/Class a) +(host.import: (java/lang/Class a) (getField [String] Field)) (def: #export (eval valueI) diff --git a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux index 61061c3af..22fdfbece 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux @@ -30,10 +30,10 @@ [Circular-Dependency] ) -(host.import (java/util/concurrent/Future a) +(host.import: (java/util/concurrent/Future a) (get [] #io a)) -(host.import (java/util/concurrent/CompletableFuture a) +(host.import: (java/util/concurrent/CompletableFuture a) (new []) (complete [a] boolean) (#static [a] completedFuture [a] (CompletableFuture a))) 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 689724bae..7daf35fb5 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 @@ -26,11 +26,11 @@ [".T" function] [".T" loop])) -(host.import java/lang/Long +(host.import: java/lang/Long (#static MIN_VALUE Long) (#static MAX_VALUE Long)) -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double) (#static NaN Double) diff --git a/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux index 07c85e58c..df9cd6be2 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux @@ -30,10 +30,10 @@ [Cannot-Evaluate-Definition] ) -(host.import java/lang/reflect/Field +(host.import: java/lang/reflect/Field (get [#? Object] #try #? Object)) -(host.import (java/lang/Class c) +(host.import: (java/lang/Class c) (getField [String] #try Field)) (def: #export (translate-def def-name valueT valueI metaV) diff --git a/new-luxc/source/luxc/lang/translation/lua.lux b/new-luxc/source/luxc/lang/translation/lua.lux index 307b6a181..e1cb1a2ac 100644 --- a/new-luxc/source/luxc/lang/translation/lua.lux +++ b/new-luxc/source/luxc/lang/translation/lua.lux @@ -28,48 +28,48 @@ [No-Anchor] ) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import net/sandius/rembulan/StateContext) +(host.import: net/sandius/rembulan/StateContext) -(host.import net/sandius/rembulan/impl/StateContexts +(host.import: net/sandius/rembulan/impl/StateContexts (#static newDefaultInstance [] StateContext)) -(host.import net/sandius/rembulan/env/RuntimeEnvironment) +(host.import: net/sandius/rembulan/env/RuntimeEnvironment) -(host.import net/sandius/rembulan/env/RuntimeEnvironments +(host.import: net/sandius/rembulan/env/RuntimeEnvironments (#static system [] RuntimeEnvironment)) -(host.import net/sandius/rembulan/Table) +(host.import: net/sandius/rembulan/Table) -(host.import net/sandius/rembulan/lib/StandardLibrary +(host.import: net/sandius/rembulan/lib/StandardLibrary (#static in [RuntimeEnvironment] StandardLibrary) (installInto [StateContext] Table)) -(host.import net/sandius/rembulan/Variable +(host.import: net/sandius/rembulan/Variable (new [Object])) -(host.import net/sandius/rembulan/runtime/LuaFunction) +(host.import: net/sandius/rembulan/runtime/LuaFunction) -(host.import net/sandius/rembulan/load/ChunkLoader +(host.import: net/sandius/rembulan/load/ChunkLoader (loadTextChunk [Variable String String] LuaFunction)) -(host.import net/sandius/rembulan/compiler/CompilerChunkLoader +(host.import: net/sandius/rembulan/compiler/CompilerChunkLoader (#static of [String] CompilerChunkLoader)) -(host.import net/sandius/rembulan/exec/DirectCallExecutor +(host.import: net/sandius/rembulan/exec/DirectCallExecutor (#static newExecutor [] DirectCallExecutor) (call [StateContext Object (Array Object)] (Array Object))) diff --git a/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux index 0330f79c2..18ae10e0a 100644 --- a/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/eval.jvm.lux @@ -20,22 +20,22 @@ [Cannot-Evaluate] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String) (getClass [] (Class Object))) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) -(host.import net/sandius/rembulan/ByteString +(host.import: net/sandius/rembulan/ByteString (decode [] String)) -(host.import net/sandius/rembulan/Table +(host.import: net/sandius/rembulan/Table (rawget #as get-idx [long] #? Object) (rawget #as get-key [Object] #? Object) (rawlen [] long)) -(host.import net/sandius/rembulan/impl/DefaultTable) +(host.import: net/sandius/rembulan/impl/DefaultTable) (def: (variant lux-object host-object) (-> (-> Object (Error Any)) DefaultTable (Maybe Any)) diff --git a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux index 50fe74f58..b49d4951c 100644 --- a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux @@ -181,7 +181,7 @@ lua.length) ## [[Numbers]] -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double) (#static NaN Double) diff --git a/new-luxc/source/luxc/lang/translation/php.lux b/new-luxc/source/luxc/lang/translation/php.lux index fe4e6095c..67234f998 100644 --- a/new-luxc/source/luxc/lang/translation/php.lux +++ b/new-luxc/source/luxc/lang/translation/php.lux @@ -29,24 +29,24 @@ [No-Anchor] ) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import javax/script/ScriptEngine +(host.import: javax/script/ScriptEngine (eval [String] #try Object)) -(host.import org/develnext/jphp/scripting/JPHPScriptEngine +(host.import: org/develnext/jphp/scripting/JPHPScriptEngine (new [])) (type: #export Anchor [Text Register]) diff --git a/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux index 4b954c4f1..3768bb5c7 100644 --- a/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux @@ -21,11 +21,11 @@ [Cannot-Evaluate] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String) (getClass [] (Class Object))) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) (exception: #export (Unknown-Kind-Of-Host-Object {host-object Object}) @@ -33,28 +33,28 @@ text-representation (:coerce Text (Object::toString [] (:coerce Object host-object)))] (format object-class " --- " text-representation))) -(host.import php/runtime/Memory) +(host.import: php/runtime/Memory) -(host.import php/runtime/memory/NullMemory) +(host.import: php/runtime/memory/NullMemory) -(host.import php/runtime/memory/FalseMemory) -(host.import php/runtime/memory/TrueMemory) +(host.import: php/runtime/memory/FalseMemory) +(host.import: php/runtime/memory/TrueMemory) -(host.import php/runtime/memory/LongMemory +(host.import: php/runtime/memory/LongMemory (new [long]) (toLong [] long)) -(host.import php/runtime/memory/DoubleMemory +(host.import: php/runtime/memory/DoubleMemory (toDouble [] double)) -(host.import php/runtime/memory/StringMemory +(host.import: php/runtime/memory/StringMemory (new [String]) (toString [] String)) -(host.import php/runtime/memory/ReferenceMemory +(host.import: php/runtime/memory/ReferenceMemory (getValue [] Memory)) -(host.import php/runtime/memory/ArrayMemory +(host.import: php/runtime/memory/ArrayMemory (size [] int) (isMap [] boolean) (get [Memory] Memory)) diff --git a/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux index be1a87761..0e0931b1e 100644 --- a/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux @@ -218,7 +218,7 @@ ## ))) ## ## [[Numbers]] -## (host.import java/lang/Double +## (host.import: java/lang/Double ## (#static MIN_VALUE Double) ## (#static MAX_VALUE Double)) diff --git a/new-luxc/source/luxc/lang/translation/python.lux b/new-luxc/source/luxc/lang/translation/python.lux index 8dac22fca..2e1b74340 100644 --- a/new-luxc/source/luxc/lang/translation/python.lux +++ b/new-luxc/source/luxc/lang/translation/python.lux @@ -28,23 +28,23 @@ [No-Anchor] ) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import org/python/core/PyObject) +(host.import: org/python/core/PyObject) -(host.import org/python/util/PythonInterpreter +(host.import: org/python/util/PythonInterpreter (new []) (exec [String] void) (eval [String] PyObject)) diff --git a/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux index 88fdd3173..1ffcc5a1f 100644 --- a/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux @@ -21,20 +21,20 @@ [Cannot-Evaluate] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String) (getClass [] (Class Object))) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) -(host.import org/python/core/PyType +(host.import: org/python/core/PyType (getName [] String)) -(host.import org/python/core/PyString +(host.import: org/python/core/PyString (new [String])) -(host.import org/python/core/PyObject +(host.import: org/python/core/PyObject (asLong [] long) (asDouble [] double) (asString [] String) diff --git a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux index 6cd163210..a83a897d1 100644 --- a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux @@ -218,7 +218,7 @@ ))) ## [[Numbers]] -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double)) diff --git a/new-luxc/source/luxc/lang/translation/r.lux b/new-luxc/source/luxc/lang/translation/r.lux index e9c984636..9b8746008 100644 --- a/new-luxc/source/luxc/lang/translation/r.lux +++ b/new-luxc/source/luxc/lang/translation/r.lux @@ -28,27 +28,27 @@ [No-Anchor] ) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import javax/script/ScriptEngine +(host.import: javax/script/ScriptEngine (eval [String] #try #? Object)) -(host.import javax/script/ScriptEngineFactory +(host.import: javax/script/ScriptEngineFactory (getScriptEngine [] ScriptEngine)) -(host.import org/renjin/script/RenjinScriptEngineFactory +(host.import: org/renjin/script/RenjinScriptEngineFactory (new [])) (type: #export Anchor [Text Register]) diff --git a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux index eb20d73c5..0bfd50aa8 100644 --- a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux @@ -21,33 +21,33 @@ [Cannot-Evaluate] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String) (getClass [] (Class Object))) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) -(host.import org/renjin/sexp/SEXP) +(host.import: org/renjin/sexp/SEXP) -(host.import org/renjin/sexp/StringArrayVector +(host.import: org/renjin/sexp/StringArrayVector (getElementAsString [int] String)) -(host.import org/renjin/sexp/LogicalArrayVector +(host.import: org/renjin/sexp/LogicalArrayVector (getElementAsRawLogical [int] int)) -(host.import org/renjin/sexp/IntArrayVector +(host.import: org/renjin/sexp/IntArrayVector (getElementAsInt [int] int)) -(host.import org/renjin/sexp/DoubleArrayVector +(host.import: org/renjin/sexp/DoubleArrayVector (getElementAsDouble [int] double)) -(host.import org/renjin/sexp/ListVector +(host.import: org/renjin/sexp/ListVector (length [] int) (getElementAsSEXP [int] #try SEXP) (getElementAsSEXP #as get-field-sexp [String] #try SEXP)) -(host.import org/renjin/sexp/Null) +(host.import: org/renjin/sexp/Null) (def: (parse-tuple lux-object host-object) (-> (-> Object (Error Any)) ListVector (Error Any)) diff --git a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux index 03cc802fc..885837078 100644 --- a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux @@ -209,7 +209,7 @@ ))) ## [[Numbers]] -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double)) diff --git a/new-luxc/source/luxc/lang/translation/ruby.lux b/new-luxc/source/luxc/lang/translation/ruby.lux index 1ed9f30e1..a42dae024 100644 --- a/new-luxc/source/luxc/lang/translation/ruby.lux +++ b/new-luxc/source/luxc/lang/translation/ruby.lux @@ -28,21 +28,21 @@ [No-Anchor] ) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import org/jruby/embed/ScriptingContainer +(host.import: org/jruby/embed/ScriptingContainer (new []) (runScriptlet [String] #? Object)) diff --git a/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux index 3c590e8ee..52a261b2a 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux @@ -21,18 +21,18 @@ [Cannot-Evaluate] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String) (getClass [] (Class Object))) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) -(host.import org/jruby/RubyArray +(host.import: org/jruby/RubyArray (getLength [] int) (get [int] #? Object)) -(host.import org/jruby/RubyHash +(host.import: org/jruby/RubyHash (get [Object] #? Object)) (def: (tuple lux-object host-object) diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux index 7fb521751..f26cefad6 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux @@ -219,7 +219,7 @@ ))) ## [[Numbers]] -(host.import java/lang/Double +(host.import: java/lang/Double (#static MIN_VALUE Double) (#static MAX_VALUE Double)) diff --git a/new-luxc/source/luxc/lang/translation/scheme.lux b/new-luxc/source/luxc/lang/translation/scheme.lux index af3208414..44a5808cb 100644 --- a/new-luxc/source/luxc/lang/translation/scheme.lux +++ b/new-luxc/source/luxc/lang/translation/scheme.lux @@ -28,26 +28,26 @@ [No-Anchor] ) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import java/lang/String +(host.import: java/lang/String (getBytes [String] #try (Array byte))) -(host.import java/lang/CharSequence) +(host.import: java/lang/CharSequence) -(host.import java/lang/Appendable +(host.import: java/lang/Appendable (append [CharSequence] Appendable)) -(host.import java/lang/StringBuilder +(host.import: java/lang/StringBuilder (new []) (toString [] String)) -(host.import gnu/mapping/Environment) +(host.import: gnu/mapping/Environment) -(host.import gnu/expr/Language +(host.import: gnu/expr/Language (eval [String] #try #? Object)) -(host.import kawa/standard/Scheme +(host.import: kawa/standard/Scheme (#static getR7rsInstance [] Scheme)) (type: #export Anchor [Text Register]) diff --git a/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux index 72c58587c..cbdd43d94 100644 --- a/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/scheme/eval.jvm.lux @@ -23,40 +23,40 @@ [invalid-variant] ) -(host.import java/lang/Object +(host.import: java/lang/Object (toString [] String) (getClass [] (Class Object))) -(host.import java/lang/Long +(host.import: java/lang/Long (intValue [] Integer)) -(host.import java/lang/Boolean) -(host.import java/lang/String) +(host.import: java/lang/Boolean) +(host.import: java/lang/String) -(host.import gnu/math/IntNum +(host.import: gnu/math/IntNum (longValue [] long)) -(host.import gnu/math/DFloNum +(host.import: gnu/math/DFloNum (doubleValue [] double)) -(host.import (gnu/lists/FVector E) +(host.import: (gnu/lists/FVector E) (getBufferLength [] int) (get [int] E)) -(host.import gnu/lists/EmptyList) +(host.import: gnu/lists/EmptyList) -(host.import gnu/lists/FString +(host.import: gnu/lists/FString (toString [] String)) -(host.import gnu/lists/Pair +(host.import: gnu/lists/Pair (getCar [] Object) (getCdr [] Object) (get [int] Object)) -(host.import gnu/mapping/Symbol +(host.import: gnu/mapping/Symbol (getName [] String)) -(host.import gnu/mapping/SimpleSymbol) +(host.import: gnu/mapping/SimpleSymbol) (def: (parse-tuple lux-object host-object) (-> (-> Object (Error Any)) (FVector Object) (Error Any)) diff --git a/new-luxc/test/test/luxc/lang/translation/jvm.lux b/new-luxc/test/test/luxc/lang/translation/jvm.lux index 23877a51e..ae66b68af 100644 --- a/new-luxc/test/test/luxc/lang/translation/jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/jvm.lux @@ -395,7 +395,7 @@ false))) ))))) -(host.import java/lang/Class +(host.import: java/lang/Class (getName [] String)) (def: classes @@ -510,7 +510,7 @@ false))) )))) -(host.import java/util/GregorianCalendar +(host.import: java/util/GregorianCalendar (#static AD int)) (context: "Member [Field]" @@ -578,9 +578,9 @@ false))) )))) -(host.import java/lang/Object) +(host.import: java/lang/Object) -(host.import (java/util/ArrayList a)) +(host.import: (java/util/ArrayList a)) (context: "Member [Method]" (<| (times +100) diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux index 2a757d3a6..df1350395 100644 --- a/new-luxc/test/test/luxc/lang/translation/structure.lux +++ b/new-luxc/test/test/luxc/lang/translation/structure.lux @@ -20,7 +20,7 @@ [synthesis #+ Synthesis])) (test/luxc common)) -(host.import java/lang/Integer) +(host.import: java/lang/Integer) (def: (tuples-spec run) (-> Runner Test) |