<< Back to previous view

[JVMTA-2] :required-params and :rest-param not included in children Created: 17/Nov/13  Updated: 17/Nov/13

Status: Open
Project: jvm.tools.analyzer
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Miikka Koskinen Assignee: Ambrose Bonnaire-Sergeant
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Clojure 1.4.1, jvm.tools.analyzer 0.5.2



 Description   

Consider this example:

user=> (pprint (ast (fn [x] x) {:children true}))
{:children [[[:methods] {:exprs? true}]],
 :op :fn-expr,
 :env {:line 53, :locals {}, :ns {:name user}},
 :methods
 ({:children [[[:body] {}]],
   :op :fn-method,
   :env {:locals {}, :ns {:name user}},
   :body
   {:children [[[:exprs] {:exprs? true}]],
    :op :do,
    :env {:locals {}, :ns {:name user}},
    :exprs
    ({:children [[[:local-binding] {}]],
      :op :local-binding-expr,
      :env {:locals {}, :ns {:name user}},
      :local-binding
      {:children [[[:init] {}]],
       :op :local-binding,
       :env {:locals {}, :ns {:name user}},
       :sym x,
       :tag nil,
       :init nil},
      :tag nil})},
   :required-params
   ({:children [[[:init] {}]],
     :op :local-binding,
     :env {:locals {}, :ns {:name user}},
     :sym x,
     :tag nil,
     :init nil}),
   :rest-param nil}),
 :variadic-method nil,
 :tag nil}

I would expect :required-params (and :rest-param) to be included in the :children list of the :fn-method node.






[JVMTA-1] ns form should be first in files where it appears Created: 27/Mar/13  Updated: 18/Sep/13  Resolved: 18/Sep/13

Status: Closed
Project: jvm.tools.analyzer
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Andy Fingerhut Assignee: Ambrose Bonnaire-Sergeant
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File jvmta-1-patch-v1.txt    

 Description   

Some tools for analyzing Clojure files expect an ns form to appear first, if one appears in the file at all, e.g. some functions in tools.namespace. A couple of files in jvm.tools.analyzer have it second, after (set! *warn-on-reflection true), or false.



 Comments   
Comment by Andy Fingerhut [ 27/Mar/13 3:15 AM ]

Patch jvmta-1-patch-v1.txt simply moves the (set! *warn-on-reflection true) (or false) forms after the ns forms in two files.

Comment by Ambrose Bonnaire-Sergeant [ 18/Sep/13 4:55 AM ]

Sorry, I completely missed this issue. All warn-on-reflection calls should now be deleted.





Generated at Tue Sep 02 11:57:12 CDT 2014 using JIRA 4.4#649-r158309.