mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
Fix due to this plugin transforming the async method and async arrow function, it caused arguments no longer point the original function.
For example:
Before
```js
class Cls {
async method() {
() => {
console.log(arguments)
}
}
}
```
After:
```js
class Cls {
method() {
var _arguments = arguments;
return babelHelpers.asyncToGenerator(function* () {
() => {
console.log(_arguments);
};
})();
}
}
```
In this way, the `_arguments` is its original function's arguments
### For performance regression
It seems we need to check the IdentifierReference and BindingIdentifier if it's an `arguments`, that causes a significant regression, we may need a cheap way to do checking
|
||
|---|---|---|
| .. | ||
| babel.snap.md | ||
| babel_exec.snap.md | ||
| oxc.snap.md | ||
| oxc_exec.snap.md | ||