ClojureScript

remove arguments usage from defrecord constructor

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

There is no need for the arguments usage in the defrecord constructor and it's a perf hit for construction. We should always construct defrecords by passing in the extra three arguments: __extmap, __meta, and hash automatically.

Activity

David Nolen made changes -
Field Original Value New Value
Summary removed arguments usage from defrecord constructor remove arguments usage from defrecord constructor
David Nolen made changes -
Assignee David Nolen [ dnolen ]
David Nolen made changes -
Priority Minor [ 4 ] Major [ 3 ]
Hide
Peter Schuck added a comment -

The constructor now has __extmap, __meta, and __hash in all the places it's constructor is called, the positional factory, map factory, and direct constructor invocation. This is the first time going deep into the ClojureScript compiler so there may be some clean up to do or other places a records constructor is called that I didn't take care of.

Show
Peter Schuck added a comment - The constructor now has __extmap, __meta, and __hash in all the places it's constructor is called, the positional factory, map factory, and direct constructor invocation. This is the first time going deep into the ClojureScript compiler so there may be some clean up to do or other places a records constructor is called that I didn't take care of.
Peter Schuck made changes -
Patch Code [ 10001 ]
Attachment cljs_696_v1.patch [ 13629 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: