minify makes shl operation (<<) bigger
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
Hi
thanks for babel-minify! I use it for a js1k compo and discovered that the code
```js
array.fill(0xff<<24 | (time%16 ? 0 : 0x38));
```
is minified to
```js
g.fill(-16777216|(n%16?0:56))
```
I use minify without any additional parameter, only `node_modules/babel-minify/bin/minify.js index.js`
#### Expected Output (updated)
```js
g.fill(0xff<<24|(n%16?0:56))
```
Contributor guide
Research direction
Start with the command shown in the issue, node_modules/babel-minify/bin/minify.js, and reproduce the transformation using the provided JavaScript snippet. Trace the minification path that changes 0xff<<24 into -16777216, then verify the result against the expected output and confirm the generated code is no longer larger.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100