aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-15handle printing missing expressions and add tests (#2872)Gravatar Dylan Conway 1-35/+87
* handle missing expressions and add tests * minify missing expression blocks in parser
2023-05-15More DCEGravatar Jarred Sumner 1-27/+34
2023-05-15Set more things to `const`Gravatar Jarred Sumner 1-13/+12
2023-05-14wipGravatar Jarred Sumner 1-3/+3
2023-05-14Fix scope chain bugGravatar Jarred Sumner 1-6/+5
2023-05-12finish #2864Gravatar Jarred Sumner 1-4/+3
2023-05-12disable sloppy mode block level functions when not bundling (#2864)Gravatar Dylan Conway 1-1/+6
* enable only during bundling * add `willUseNumberRenamer()`
2023-05-12[bundler] Disable export star redirect code size optimizationGravatar Jarred Sumner 1-30/+52
2023-05-12[bundler] Implement `export * from` code size optimizationGravatar Jarred Sumner 1-21/+36
2023-05-12[bundler] Fix bug with `export default TypeScriptType`Gravatar Jarred Sumner 1-0/+3
2023-05-12Fix regressionGravatar Jarred Sumner 1-5/+3
2023-05-11Fix our tree shaking optimizationGravatar Jarred Sumner 1-48/+90
2023-05-10make sure vars can be hoisted in catch scope (#2847)Gravatar Dylan Conway 1-23/+34
2023-05-10Fix test failure in scope order verificationGravatar Jarred Sumner 1-3/+6
2023-05-10Fix assertionGravatar Jarred Sumner 1-3/+5
2023-05-10use member from parent scope when hoisting (#2840)Gravatar Dylan Conway 1-1/+1
2023-05-09fix catch scope var declarations (#2839)Gravatar Dylan Conway 1-30/+26
* use `catch_binding` kind and report errors * make hash optional
2023-05-08add the class name to the current scopeGravatar Dylan Conway 1-0/+5
2023-05-07Add tracy (#2817)Gravatar Jarred Sumner 1-13/+16
* Add tracy * RTLD * Linux needs LD_PRELOAD * More tracing * Inline this --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-06:nail_care:Gravatar Jarred Sumner 1-8/+4
2023-05-06Fixes #2811Gravatar Jarred Sumner 1-2/+2
2023-05-06[minifier] Rewrite equality check logicGravatar Jarred Sumner 1-4/+4
2023-05-04parse and visit catch body scope (#2796)Gravatar Dylan Conway 1-10/+14
2023-05-03Fix code splitting for server componentsGravatar Jarred Sumner 1-1/+1
2023-05-03re-enable our CJS optimizationGravatar Jarred Sumner 1-1/+6
2023-05-02Use prettyGravatar Jarred Sumner 1-1/+1
2023-05-01Compress `let f; f=123` => `let f = 123;`Gravatar Jarred Sumner 1-0/+27
2023-05-01Small improvement to minifierGravatar Jarred Sumner 1-114/+114
2023-05-01Fix some splitting bugsGravatar Jarred Sumner 1-1/+2
2023-04-30FIx esm -> cjs require interop with converted CJSGravatar Jarred Sumner 1-1/+1
TODO: make `default` namespace object for these not load the entire wrapper
2023-04-30Implement source maps (#2770)Gravatar Dylan Conway 1-16/+18
* wip * Begin computing source map tables * source map progress * external source maps * fix merge * remove `@as` coercion * inline source maps and output source map shifts * fix `codeWithSourceMapShifts()` after merge * remove second call to `findReachableFiles()` * use `worker.allocator`, remove comment * don't reuse memory for source and sourceContents * don't reuse `quote_buf` * fix writing to stdout * Add comment * Don't include a sourcemap if the text was empty * Make the parser faster * +16% faster sourcemap generation @dylan-conway I'll need you to look this over to make sure I didn't mess anything up Though it currently doesn't generate the offsets in the right order... * 30% performance improvement to Bun.build() * Print `debugId` in source maps cc @mitsuhiko @notzeeg --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-29Fix a load order issueGravatar Jarred Sumner 1-4/+14
2023-04-27Add TODO noteGravatar Jarred Sumner 1-0/+2
2023-04-26Wrap some things in minify_syntax flagGravatar Jarred Sumner 1-31/+34
2023-04-26Inline spreads of array literalsGravatar Jarred Sumner 1-0/+11
2023-04-26ensure `super()` is not merged with adjacent statements (#2757)Gravatar Dylan Conway 1-5/+14
* ensure `super()` is not merged with adjacent statements * add TODO
2023-04-26Fixes #2746 (#2748)Gravatar Jarred Sumner 1-1/+1
* Fixes #2746 * add test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-26Implement `file` loader in `Bun.build` (#2745)Gravatar Jarred Sumner 1-3/+11
* Update bundle_v2.zig * Implement `file` loader * Hash in parallel * Implement `publicPath` * simplify * Update bundle_v2.zig * Implement `#!` * Remove unnecessary optional --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-25Fix error with --jsx-production in runtimeGravatar Jarred Sumner 1-23/+1
2023-04-25Fixes #2738Gravatar Jarred Sumner 1-2/+6
2023-04-22Make `Bun.build` more reliable (#2718)Gravatar Jarred Sumner 1-2/+4
* One possible implementation to make `Bun.build` work better * Pass allocator in * Make our temporary buffers a little safer * rename * Fix memory corruption in symbol table * Add support for deferred idle events in ThreadPool * Free more memory * Use a global allocator FS cache * more `inline` * Make duping keys optional in StringMap * Close file handles more often * Update router.zig * wip possibly delete this commit * Fix memory issues and reduce memory usage * > 0.8 * Switch to AsyncIO.Waker and fix memory leak in JSBundleCompletionTask * We don't need to clone this actually * Fix error * Format * Fixup * Fixup --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-20Fix bug with merging adjacent varsGravatar Jarred Sumner 1-1/+3
2023-04-20Symbol minification (#2695)Gravatar Dylan Conway 1-90/+247
* minify * Update renamer.zig * --minify-whitespace * Speed up minification a little * handle private names * 5% faster minification * use helper function * fix nested scope slots * `bun build --minify` gets another +8% faster * print semicolons afterwards * print semicolon after checking error * after all error checking * Delete code for generating legacy bundes * remove extra whitespace around if statements * print space before import identifier * Use `@constCast` * Make `S.Local#decls` use `BabyList(Decl)` * Add `fromSlice` helper to `BabyList` * Remove unnecessary optional chains * minify `undefined, true, false` * Another @constCast * Implement merge adjacent local var * Support --minify in `bun build --transform` * skip comments when counting character frequencies * Don't wrap commonjs with --transform on (unless targeting bun) * Support --minify in the runtime * Fix edgecase with import * as * don't infinite loop * --trnasform shouldn't mess with require * Only track comments when minifying --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-20`with` body can be an expressionGravatar Dylan Conway 1-2/+2
2023-04-19Fix broken autocompleteGravatar Jarred Sumner 1-3/+3
2023-04-17Fix DCE bug with `new Foo()` when pure without argumentsGravatar Jarred Sumner 1-1/+9
2023-04-17make sure `with` is parsed as a block (#2680)Gravatar Dylan Conway 1-5/+1
2023-04-17fix typescript decorators with index and number keys (#2677)Gravatar Dylan Conway 1-2/+3
* handle index property key case * non-method number property * tests for property keys
2023-04-17moreGravatar Jarred Sumner 1-0/+60
2023-04-17Fix dynamic require()Gravatar Jarred Sumner 1-0/+15