addAll(map, immutable) {
		if (immutable) {
			this.stack.push(map);

			// largest map should go first
			for (let i = this.stack.length - 1; i > 0; i--) {
				const beforeLast = this.stack[i - 1];
				if (beforeLast.size >= map.size) break;
				this.stack[i] = beforeLast;
				this.stack[i - 1] = map;
			}
		} else {
			for (const [key, value] of map) {
				this.map.set(key, value);
			}
		}
	}
If `immutable` is true, the map can be referenced by the StackedCacheMap
and should not be changed afterwards. If the map is mutable, all items
are copied into a fallback Map.
@param {ReadonlyMap<K, V>} map map to add
@param {boolean=} immutable if 'map' is immutable and StackedCacheMap can keep referencing it