Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

debuggin work. We can now analyze clojure.core.match

  • Loading branch information...
1 parent cf3a48c commit a6f23781441b50ceeb21f23dd3e28b0638585c91 @jonase jonase committed
Showing with 11 additions and 5 deletions.
  1. +11 −5 src/analyze/core.clj
16 src/analyze/core.clj
@@ -12,7 +12,7 @@
Compiler$NewInstanceExpr Compiler$MetaExpr Compiler$BodyExpr Compiler$ImportExpr Compiler$AssignExpr
Compiler$TryExpr$CatchClause Compiler$TryExpr Compiler$C Compiler$LocalBindingExpr Compiler$RecurExpr
Compiler$MapExpr Compiler$IfExpr Compiler$KeywordInvokeExpr Compiler$InstanceFieldExpr Compiler$InstanceOfExpr
- Compiler$CaseExpr Compiler$Expr Compiler$SetExpr))
+ Compiler$CaseExpr Compiler$Expr Compiler$SetExpr Compiler$MethodParamExpr))
(:require [clojure.reflect :as reflect]
[ :as io]
[clojure.repl :as repl]
@@ -95,7 +95,7 @@
(defmethod Expr->map Compiler$LetFnExpr
[^Compiler$LetFnExpr expr env]
(let [body (Expr->map (.body expr) env)
- binding-inits (-> (doall (map BindingInit->vec (.bindingInits expr)))
+ binding-inits (-> (doall (map BindingInit->vec (.bindingInits expr) (repeat env)))
{:op :letfn
:env env
@@ -400,12 +400,13 @@
(defmethod Expr->map Compiler$NewInstanceExpr
[^Compiler$NewInstanceExpr expr env]
- (let [methods (doall (map ObjMethod->map (.methods expr) (repeat env)))]
+ (let [field (partial field-accessor Compiler$NewInstanceExpr)
+ methods (doall (map ObjMethod->map (field 'methods expr) (repeat env)))]
{:op :new-instance-expr
:env env
:methods methods
- :mmap (.mmap expr)
- :covariants (.covariants expr)
+ :mmap (field 'mmap expr)
+ :covariants (field 'covariants expr)
:tag (.tag expr)
:children methods
:Expr-obj expr}))
@@ -546,6 +547,11 @@
:children (concat loop-locals args)
:Expr-obj expr}))
+(defmethod Expr->map Compiler$MethodParamExpr
+ [expr & args]
+ ;; TODO
+ {})
(defmethod Expr->map :default
[expr & args]
(println expr)

0 comments on commit a6f2378

Please sign in to comment.
Something went wrong with that request. Please try again.