some notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-07-28 01:24:53 +03:00
parent 7288e9acba
commit f27bb40275

15
diff.js
View File

@ -770,16 +770,19 @@ module.Types = {
} }
// same object... // check: if same/matching object...
// XXX this will essentially do a full diff of sub-objects, not // NOTE: this will essentially do a full diff of the input trees
// sure if this is the right way to go here... // skipping only the top level, the actual A and B...
// ...this is not that big a dean as we are caching everything // NOTE: since actual A and B are not diffed here (as we start with
// but still this is not obvious... // bcmp(..) and not cmp(..), see above note), it makes no
// sense to do a cache check after this as we will exit this
// check with everything but the root cached/diffed...
// XXX not sure if this is efficient...
if(bcmp(A, B, cmp)){ if(bcmp(A, B, cmp)){
return null return null
} }
// builtin types... // check: builtin types...
if(this.DIFF_TYPES.has(A) || this.DIFF_TYPES.has(B)){ if(this.DIFF_TYPES.has(A) || this.DIFF_TYPES.has(B)){
return this.handle('Basic', {}, diff, A, B, options) return this.handle('Basic', {}, diff, A, B, options)
} }