diff options
Diffstat (limited to '')
-rw-r--r-- | lux-r/source/luxc/lang/synthesis/variable.lux | 14 | ||||
-rw-r--r-- | lux-r/source/program.lux | 186 | ||||
-rw-r--r-- | lux-r/source/test/program.lux | 2 | ||||
-rw-r--r-- | lux-ruby/source/program.lux | 10 |
4 files changed, 106 insertions, 106 deletions
diff --git a/lux-r/source/luxc/lang/synthesis/variable.lux b/lux-r/source/luxc/lang/synthesis/variable.lux index f6a45b02e..932cb3dcb 100644 --- a/lux-r/source/luxc/lang/synthesis/variable.lux +++ b/lux-r/source/luxc/lang/synthesis/variable.lux @@ -89,10 +89,10 @@ ))] (s.to-list tracker))) -## (def: (optimize-register-use current-arity [pathS bodyS]) -## (-> ls.Arity [ls.Path ls.Synthesis] [ls.Path ls.Synthesis]) -## (let [bound (bound-vars pathS) -## unused (unused-vars current-arity bound bodyS) -## adjusted (adjust-vars unused bound)] -## [(|> pathS (clean-pattern adjusted) simplify-pattern) -## (clean-expression adjusted bodyS)])) +... (def: (optimize-register-use current-arity [pathS bodyS]) +... (-> ls.Arity [ls.Path ls.Synthesis] [ls.Path ls.Synthesis]) +... (let [bound (bound-vars pathS) +... unused (unused-vars current-arity bound bodyS) +... adjusted (adjust-vars unused bound)] +... [(|> pathS (clean-pattern adjusted) simplify-pattern) +... (clean-expression adjusted bodyS)])) diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux index a42c5f06d..19b417b4d 100644 --- a/lux-r/source/program.lux +++ b/lux-r/source/program.lux @@ -171,104 +171,104 @@ [cannot_apply_a_non_function] ) -## (def: host_bit -## (-> Bit org/armedbear/lisp/LispObject) -## (|>> (case> #0 (org/armedbear/lisp/Nil::NIL) -## #1 (org/armedbear/lisp/Symbol::T)))) +... (def: host_bit +... (-> Bit org/armedbear/lisp/LispObject) +... (|>> (case> #0 (org/armedbear/lisp/Nil::NIL) +... #1 (org/armedbear/lisp/Symbol::T)))) (syntax: (%%code term) (wrap (list (code.text (%.code term))))) (def: (host_value value) (-> Any org/renjin/sexp/SEXP) - (let [## to_sub (: (-> Any org/armedbear/lisp/LispObject) - ## (function (_ sub_value) - ## (let [sub_value (:as java/lang/Object sub_value)] - ## (`` (<| (~~ (template [<type> <then>] - ## [(case (ffi.check <type> sub_value) - ## (#.Some sub_value) - ## (`` (|> sub_value (~~ (template.splice <then>)))) - ## #.None)] - - ## [[java/lang/Object] [host_value]] - ## [java/lang/Boolean [..host_bit]] - ## [java/lang/Integer [java/lang/Integer::longValue org/armedbear/lisp/Fixnum::getInstance]] - ## [java/lang/Long [org/armedbear/lisp/Bignum::getInstance]] - ## [java/lang/Double [org/armedbear/lisp/DoubleFloat::new]] - ## [java/lang/String [org/armedbear/lisp/SimpleString::new]] - ## )) - ## ## else - ## (:as org/armedbear/lisp/LispObject sub_value)))))) + (let [... to_sub (: (-> Any org/armedbear/lisp/LispObject) + ... (function (_ sub_value) + ... (let [sub_value (:as java/lang/Object sub_value)] + ... (`` (<| (~~ (template [<type> <then>] + ... [(case (ffi.check <type> sub_value) + ... (#.Some sub_value) + ... (`` (|> sub_value (~~ (template.splice <then>)))) + ... #.None)] + + ... [[java/lang/Object] [host_value]] + ... [java/lang/Boolean [..host_bit]] + ... [java/lang/Integer [java/lang/Integer::longValue org/armedbear/lisp/Fixnum::getInstance]] + ... [java/lang/Long [org/armedbear/lisp/Bignum::getInstance]] + ... [java/lang/Double [org/armedbear/lisp/DoubleFloat::new]] + ... [java/lang/String [org/armedbear/lisp/SimpleString::new]] + ... )) + ... ... else + ... (:as org/armedbear/lisp/LispObject sub_value)))))) ] (`` (macro.log_expand_once! (ffi.object [] - ## org/renjin/sexp/AbstractSEXP + ... org/renjin/sexp/AbstractSEXP org/renjin/sexp/ListVector - ## java/lang/Object - [ ## program/LuxADT - ## org/renjin/sexp/SEXP + ... java/lang/Object + [ ... program/LuxADT + ... org/renjin/sexp/SEXP ] [{[org/renjin/sexp/SEXP] (ffi.array org/renjin/sexp/SEXP 0) - ## (java/util/List java/lang/Object) - ## (:assume (..fake_list [])) + ... (java/util/List java/lang/Object) + ... (:assume (..fake_list [])) }] - ## Methods - ## (program/LuxADT - ## [] (getValue self) java/lang/Object - ## (:as java/lang/Object value)) - - ## (org/renjin/sexp/AbstractSEXP - ## [] (eval self {context org/renjin/eval/Context} {environment org/renjin/sexp/Environment}) - ## org/renjin/sexp/SEXP - ## (exec - ## ("lux io log" (exception.report - ## ["@@" "eval"] - ## ["context" (debug.inspect context)] - ## ["environment" (debug.inspect environment)])) - ## self)) - - ## (org/renjin/sexp/AbstractSEXP - ## [] (getAttributes self) - ## org/renjin/sexp/AttributeMap - ## (org/renjin/sexp/AttributeMap::EMPTY)) - - ## (org/renjin/sexp/AbstractSEXP - ## [] (getTypeName self) - ## java/lang/String - ## "LUX") + ... Methods + ... (program/LuxADT + ... [] (getValue self) java/lang/Object + ... (:as java/lang/Object value)) + + ... (org/renjin/sexp/AbstractSEXP + ... [] (eval self {context org/renjin/eval/Context} {environment org/renjin/sexp/Environment}) + ... org/renjin/sexp/SEXP + ... (exec + ... ("lux io log" (exception.report + ... ["@@" "eval"] + ... ["context" (debug.inspect context)] + ... ["environment" (debug.inspect environment)])) + ... self)) + + ... (org/renjin/sexp/AbstractSEXP + ... [] (getAttributes self) + ... org/renjin/sexp/AttributeMap + ... (org/renjin/sexp/AttributeMap::EMPTY)) + + ... (org/renjin/sexp/AbstractSEXP + ... [] (getTypeName self) + ... java/lang/String + ... "LUX") (org/renjin/sexp/ListVector [] (get self {_ int}) org/renjin/sexp/SEXP (exec - ## ("lux io log" (..%%code <call>)) + ... ("lux io log" (..%%code <call>)) _jvm_this)) (org/renjin/sexp/ListVector [] (get self {_ java/lang/String}) org/renjin/sexp/SEXP (exec - ## ("lux io log" (..%%code <call>)) + ... ("lux io log" (..%%code <call>)) _jvm_this)) (~~ (template [<call> <output>] [(org/renjin/sexp/ListVector - ## org/renjin/sexp/AbstractSEXP - ## org/renjin/sexp/SEXP + ... org/renjin/sexp/AbstractSEXP + ... org/renjin/sexp/SEXP [] <call> <output> - ## (exec - ## ## ("lux io log" (..%%code <call>)) - ## (error! (..%%code <call>))) + ... (exec + ... ... ("lux io log" (..%%code <call>)) + ... (error! (..%%code <call>))) (error! (..%%code <call>)))] - ## org/renjin/sexp/ListVector + ... org/renjin/sexp/ListVector [(accept self {_ org/renjin/sexp/SexpVisitor}) void] [(anyNA self) boolean] [(contains self {_ org/renjin/sexp/Vector} {_ int}) boolean] - ## [(copyTo self {_ [double]} {_ int} {_ int}) void] + ... [(copyTo self {_ [double]} {_ int} {_ int}) void] [(equals self {_ java/lang/Object}) boolean] [(getComputationDepth self) int] @@ -315,31 +315,31 @@ [(toArrayUnsafe self) [org/renjin/sexp/SEXP]] [(toString self) java/lang/String] - ## org/renjin/sexp/AbstractSEXP - ## org/renjin/sexp/SEXP - ## [(accept self {_ org/renjin/sexp/SexpVisitor}) void] - ## [(asInt self) int] - ## [(asLogical self) org/renjin/sexp/Logical] - ## [(asReal self) double] - ## [(asString self) java/lang/String] - ## [(force self {_ org/renjin/eval/Context}) org/renjin/sexp/SEXP] - ## [(getAttribute self {_ org/renjin/sexp/Symbol}) org/renjin/sexp/SEXP] - ## [(getElementAsSEXP self {_ int}) org/renjin/sexp/SEXP] - ## [(getImplicitClass self) java/lang/String] - ## ## [(getIndexByName self {_ java/lang/String}) int] - ## [(getName self {_ int}) java/lang/String] - ## [(getNames self) org/renjin/sexp/AtomicVector] - ## [(getS3Class self) org/renjin/sexp/StringVector] - ## ## [(hasAttributes self) boolean] - ## [(hasNames self) boolean] - ## [(inherits self {_ java/lang/String}) boolean] - ## [(isNumeric self) boolean] - ## ## [(isObject self) boolean] - ## [(length self) int] - ## ## [(setAttribute self {_ java/lang/String} {_ org/renjin/sexp/SEXP}) org/renjin/sexp/SEXP] - ## [(setAttribute self {_ org/renjin/sexp/Symbol} {_ org/renjin/sexp/SEXP}) org/renjin/sexp/SEXP] - ## [(setAttributes self {_ org/renjin/sexp/AttributeMap$Builder}) org/renjin/sexp/SEXP] - ## [(setAttributes self {_ org/renjin/sexp/AttributeMap}) org/renjin/sexp/SEXP] + ... org/renjin/sexp/AbstractSEXP + ... org/renjin/sexp/SEXP + ... [(accept self {_ org/renjin/sexp/SexpVisitor}) void] + ... [(asInt self) int] + ... [(asLogical self) org/renjin/sexp/Logical] + ... [(asReal self) double] + ... [(asString self) java/lang/String] + ... [(force self {_ org/renjin/eval/Context}) org/renjin/sexp/SEXP] + ... [(getAttribute self {_ org/renjin/sexp/Symbol}) org/renjin/sexp/SEXP] + ... [(getElementAsSEXP self {_ int}) org/renjin/sexp/SEXP] + ... [(getImplicitClass self) java/lang/String] + ... ... [(getIndexByName self {_ java/lang/String}) int] + ... [(getName self {_ int}) java/lang/String] + ... [(getNames self) org/renjin/sexp/AtomicVector] + ... [(getS3Class self) org/renjin/sexp/StringVector] + ... ... [(hasAttributes self) boolean] + ... [(hasNames self) boolean] + ... [(inherits self {_ java/lang/String}) boolean] + ... [(isNumeric self) boolean] + ... ... [(isObject self) boolean] + ... [(length self) int] + ... ... [(setAttribute self {_ java/lang/String} {_ org/renjin/sexp/SEXP}) org/renjin/sexp/SEXP] + ... [(setAttribute self {_ org/renjin/sexp/Symbol} {_ org/renjin/sexp/SEXP}) org/renjin/sexp/SEXP] + ... [(setAttributes self {_ org/renjin/sexp/AttributeMap$Builder}) org/renjin/sexp/SEXP] + ... [(setAttributes self {_ org/renjin/sexp/AttributeMap}) org/renjin/sexp/SEXP] )) ))))) @@ -408,7 +408,7 @@ (def: (read host_object) (Reader java/lang/Object) (exec - ## ("lux io log" (exception.construct ..unknown_kind_of_object [host_object])) + ... ("lux io log" (exception.construct ..unknown_kind_of_object [host_object])) (`` (<| (case (ffi.check org/renjin/sexp/ListVector host_object) (#.Some host_object) (<| (case (..read_variant read host_object) @@ -437,10 +437,10 @@ org/renjin/sexp/Logical::toBooleanStrict #try.Success]] [org/renjin/sexp/Closure [#try.Success]] - ## [org/armedbear/lisp/DoubleFloat [org/armedbear/lisp/DoubleFloat::doubleValue #try.Success]] - ## [program/LuxADT [program/LuxADT::getValue #try.Success]] + ... [org/armedbear/lisp/DoubleFloat [org/armedbear/lisp/DoubleFloat::doubleValue #try.Success]] + ... [program/LuxADT [program/LuxADT::getValue #try.Success]] )) - ## else + ... else (exception.throw ..unknown_kind_of_object [host_object]) )))) @@ -506,7 +506,7 @@ (def: (execute! input) (exec ("lux io log" "@execute!") - ## ("lux io log" (_.code input)) + ... ("lux io log" (_.code input)) (javax/script/ScriptEngine::eval (_.code input) interpreter))) (def: (define! context input) @@ -515,7 +515,7 @@ (do try.monad [#let [definition (_.set! $global input)] #let [_ ("lux io log" "@define! 0") - ## _ ("lux io log" (_.code definition)) + ... _ ("lux io log" (_.code definition)) ] _ (javax/script/ScriptEngine::eval (_.code definition) interpreter) #let [_ ("lux io log" "@define! 1")] @@ -554,7 +554,7 @@ (for {@.old (def: extender Extender - ## TODO: Stop relying on coercions ASAP. + ... TODO: Stop relying on coercions ASAP. (<| (:as Extender) (function (@self handler)) (:as Handler) diff --git a/lux-r/source/test/program.lux b/lux-r/source/test/program.lux index 270f9005d..46e2a2b71 100644 --- a/lux-r/source/test/program.lux +++ b/lux-r/source/test/program.lux @@ -13,6 +13,6 @@ (program: args (<| io.io _.run! - ## (_.times 100) + ... (_.times 100) (_.seed 1985013625126912890) (compositor.spec /.jvm /.bundle /.expander /.program))) diff --git a/lux-ruby/source/program.lux b/lux-ruby/source/program.lux index c0342f441..33a7ff9cb 100644 --- a/lux-ruby/source/program.lux +++ b/lux-ruby/source/program.lux @@ -159,7 +159,7 @@ (runScriptlet [java/lang/String] #try #? java/lang/Object) (getProvider [] org/jruby/embed/internal/LocalContextProvider)]) -## TODO; Figure out a way to not need "interpreter" to be a global variable. +... TODO; Figure out a way to not need "interpreter" to be a global variable. (def: interpreter (org/jruby/embed/ScriptingContainer::new)) @@ -523,7 +523,7 @@ (^or "==" "equal?" "to_s" "inspect" "[]" "length" "respond_to?" - ## "to_hash" + ... "to_hash" ) true @@ -672,7 +672,7 @@ org/jruby/runtime/BlockBody (ffi.object [] org/jruby/runtime/BlockBody [] [{org/jruby/runtime/Signature ..phase_block_signature}] - ## Methods + ... Methods (org/jruby/runtime/BlockBody [] (getFile self) java/lang/String @@ -692,7 +692,7 @@ org/jruby/RubyProc)) (let [block (ffi.object [] org/jruby/runtime/Block [] [{org/jruby/runtime/BlockBody ..phase_block_body}] - ## Methods + ... Methods (org/jruby/runtime/Block [] (call self {_ org/jruby/runtime/ThreadContext} @@ -762,7 +762,7 @@ (def: (extender phase_wrapper) (-> platform.Phase_Wrapper Extender) - ## TODO: Stop relying on coercions ASAP. + ... TODO: Stop relying on coercions ASAP. (<| (:as Extender) (function (@self handler)) (:as Handler) |