# Changelist ## 0.0.6 Internal refactor of `aspect.ts`. No public API changes. ### Performance - `Aspect.getAdvicelist` no longer allocates throwaway `Map` instances on a cache miss. Since this method runs on every call to a `@Pointcut`-decorated method (not just when advices are registered), the old fallback pattern (`this.aspectMap.get(Ctor) || new Map()`) produced garbage on every single invocation of an advised method that had no advices attached to it. It now walks the lookup chain with plain guards and returns a shared empty-array sentinel on a miss. That sentinel is frozen with `Object.freeze` so that mutating a miss result directly (bypassing `addAdviceBefore`/`addAdviceAfter`) throws instead of silently leaking state into unrelated pointcuts. - The `@Pointcut` wrapper no longer converts `arguments` via `Array.from` or dispatches advices through `.forEach` with a fresh arrow-function closure. It now uses rest parameters and plain `for` loops, removing per-call allocations from the hottest path in the library. - `@Pointcut` now mutates the property descriptor in place instead of cloning it with `Object.assign({}, descriptor, {...})`. This runs once per decoration (not per call), but it's simpler and avoids an unnecessary object copy. ### Fixes / cleanup - Fixed `interface MappingArray extends Array`, where the generic type parameter was named the same as the outer `MappingPair` interface, silently shadowing it. Removed the redundant generic (also fixed in `index.d.ts`). - Fixed a parameter shadowing bug in `@Before`/`@After` where the mapping loop's local `method` variable shadowed the decorator's own `method` parameter. - `parseArgs` is now called directly instead of through `parseArgs.apply(this, arguments)`, which had no purpose. - Deduplicated `addAdviceBefore`/`addAdviceAfter` into a shared private `addAdvice` method. ### Tests - Added coverage for the shared empty-list optimization: unrelated `(Ctor, method, point)` misses return an equal but isolated `[]`, and mutating a miss result directly now throws instead of corrupting shared state. - Added coverage for registering multiple advices on the same `(Ctor, method, point)`, exercising the array-reuse branch of `addAdvice` that wasn't previously under test. - Added coverage confirming an advice registered for one method/point does not leak into an unrelated method or point. ## 0.0.5 and earlier See git history.