src/Acc.js
function notifyAccess({object, name}) {

    // Create an observer for changes in properties accessed during execution of this function.
    function makeAccessedObserver() {
      return Observer(object, function(changes) {
        changes.forEach(({type, name}) => {
          var {names} = accessEntry;
          if (!names || type === 'update' && names.indexOf(name) !== -1)
            rerun();
        });
      });
    }

    // Make a new entry in the access table, containing initial property name if any
    // and observer for properties accessed on the object.
    function makeAccessEntry() {
      accesses.set(object, {
        names:    name ? [name] : null,
        observer: makeAccessedObserver()
      });
    }

    // If properties on this object are already being watched, there is already an entry
    // in the access table for it. Add a new property name to the existing entry.
    function setAccessEntry() {
      if (name && accessEntry.names) accessEntry.names.push(name);
      else accessEntry.names = null;
    }

    var accessEntry = accesses.get(object);
    if (accessEntry) setAccessEntry();
    else makeAccessEntry();
  }
function notifyAccess({object, name}) {

    // Create an observer for changes in properties accessed during execution of this function.
    function makeAccessedObserver() {
      return Observer(object, function(changes) {
        changes.forEach(({type, name}) => {
          var {names} = accessEntry;
          if (!names || type === 'update' && names.indexOf(name) !== -1)
            rerun();
        });
      });
    }

    // Make a new entry in the access table, containing initial property name if any
    // and observer for properties accessed on the object.
    function makeAccessEntry() {
      accesses.set(object, {
        names:    name ? [name] : null,
        observer: makeAccessedObserver()
      });
    }

    // If properties on this object are already being watched, there is already an entry
    // in the access table for it. Add a new property name to the existing entry.
    function setAccessEntry() {
      if (name && accessEntry.names) accessEntry.names.push(name);
      else accessEntry.names = null;
    }

    var accessEntry = accesses.get(object);
    if (accessEntry) setAccessEntry();
    else makeAccessEntry();
  }
function notifyAccess ( { object , name } ) { // Create an observer for changes in properties accessed during execution of this function. function makeAccessedObserver ( ) { return Observer ( object , function ( changes ) { changes . forEach ( ( { type , name } ) => { var { names } = accessEntry ; if ( ! names || type === 'update' && names . indexOf ( name ) !== - 1 ) rerun ( ) ; } ) ; } ) ; } // Make a new entry in the access table, containing initial property name if any // and observer for properties accessed on the object. function makeAccessEntry ( ) { accesses . set ( object , { names : name ? [ name ] : null , observer : makeAccessedObserver ( ) } ) ; } // If properties on this object are already being watched, there is already an entry // in the access table for it. Add a new property name to the existing entry. function setAccessEntry ( ) { if ( name && accessEntry . names ) accessEntry . names . push ( name ) ; else accessEntry . names = null ; } var accessEntry = accesses . get ( object ) ; if ( accessEntry ) setAccessEntry ( ) ; else makeAccessEntry ( ) ; }
`notifyAccess` is the callback invoked by upwardables when a property is accessed. It records the access in the `accesses` map.
notifyAccess is the callback invoked by upwardables when a property is accessed . It records the access in the accesses map .