Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using obsolete closure primitives #6

Merged
merged 1 commit into from
Sep 4, 2024
Merged

Stop using obsolete closure primitives #6

merged 1 commit into from
Sep 4, 2024

Commits on Sep 3, 2024

  1. Stop using obsolete closure primitives

    Closure compiler looks for these based on the resolved name, which no longer works in es6 modules. So we inline what the compiler would do.
     - object.create -> object literal
     - object.createSet -> object literal with `true` values
     - reflect.objectProperty -> JSCompiler_renameProperty
     - reflect.object => multiple JSCompiler_renameProperty
     - add @pureOrBreakMyCode to reflect.cache calls
    
    There's no documentation for @pureOrBreakMyCode, but Steve Hicks from Google said that's the correct solution and this seems to be the syntax based on google/closure-compiler#4178
    It seems like adding this to reflect.cache itself would work if the call is inlined. However I don't know if that always happens, so I also added it at the callsites.
    ribrdb committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    4d6ec2a View commit details
    Browse the repository at this point in the history