Open timsgardner opened 5 years ago
Would be nice if this worked:
(m/faster (System.Tuple/Create :a :b))
Instead, throws:
clojure.lang.ExceptionInfo: Could not find static method Create with args [clojure.lang.Keyword clojure.lang.Keyword] for type System.Tuple while analyzing form (System.Tuple/Create :a :b) * magic/analyzer/errors/fn * clojure.lang.MultiFn * magic/analyzer/analyze-host-forms/analyze-host-call * clojure.lang.Var * clojure/tools/analyzer/passes/compile-passesfnfn * clojure/tools/analyzer/passes/compile-passesfnfn * clojure/core/partialfn * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/utils/mapv' * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walk * clojure/tools/analyzer/ast/postwalk * clojure/tools/analyzer/passes/compile-passesanalyze * clojure/core/compfn * magic/analyzer/analyze * magic/faster/faster-type * magic/api/faster * clojure.lang.RestFn * clojure.lang.Var clojure.lang.Compiler.MacroexpandSeq1 (clojure.lang.ISeq) clojure.lang.Compiler.macroexpand1 (object) clojure.lang.Compiler.Macroexpand (object) clojure.lang.Compiler.eval (object) clojure.lang.Compiler.eval (object) * clojure/core/eval * arcadia/internal/socket-repl/game-thread-evalfnfn
Without Magic, the following works:
(System.Tuple/Create (type-args clojure.lang.Keyword, clojure.lang.Keyword) :a :b)
but the type-args defeat the purpose, you might as well construct the Tuple directly. In Magic, this doesn't work:
type-args
(m/faster (System.Tuple/Create (type-args clojure.lang.Keyword, clojure.lang.Keyword) :a :b))
throws:
clojure.lang.ExceptionInfo: Could not find static method Create with args [System.Object clojure.lang.Keyword clojure.lang.Keyword] for type System.Tuple while analyzing form (System.Tuple/Create (type-args clojure.lang.Keyword clojure.lang.Keyword) :a :b) * magic/analyzer/errors/fn * clojure.lang.MultiFn * magic/analyzer/analyze-host-forms/analyze-host-call * clojure.lang.Var * clojure/tools/analyzer/passes/compile-passesfnfn * clojure/tools/analyzer/passes/compile-passesfnfn * clojure/core/partialfn * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walkwalkwalk * clojure/tools/analyzer/utils/mapv' * clojure/tools/analyzer/ast/-update-childrenfn * clojure.lang.PersistentVector.reduce * clojure/core/reduce * clojure/tools/analyzer/ast/-update-children * clojure/tools/analyzer/ast/update-children-reduced * clojure/tools/analyzer/ast/walkwalk * clojure/tools/analyzer/ast/walk * clojure/tools/analyzer/ast/postwalk * clojure/tools/analyzer/passes/compile-passesanalyze * clojure/core/compfn * magic/analyzer/analyze * magic/faster/faster-type * magic/api/faster * clojure.lang.RestFn * clojure.lang.Var clojure.lang.Compiler.MacroexpandSeq1 (clojure.lang.ISeq) clojure.lang.Compiler.macroexpand1 (object) clojure.lang.Compiler.Macroexpand (object) clojure.lang.Compiler.eval (object) clojure.lang.Compiler.eval (object) * clojure/core/eval * arcadia/internal/socket-repl/game-thread-evalfnfn
Notably the following also breaks
(m/faster (System.Tuple/Create|[System.Int64 System.Int64]| 1 2))
Would be nice if this worked:
Instead, throws:
Without Magic, the following works:
but the
type-args
defeat the purpose, you might as well construct the Tuple directly. In Magic, this doesn't work:throws: