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...
// XXX this will essentially do a full diff of sub-objects, not
// sure if this is the right way to go here...
// ...this is not that big a dean as we are caching everything
// but still this is not obvious...
// check: if same/matching object...
// NOTE: this will essentially do a full diff of the input trees
// skipping only the top level, the actual A and B...
// NOTE: since actual A and B are not diffed here (as we start with
// 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)){
return null
}
// builtin types...
// check: builtin types...
if(this.DIFF_TYPES.has(A) || this.DIFF_TYPES.has(B)){
return this.handle('Basic', {}, diff, A, B, options)
}