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

[compiler] General-purpose function outlining #30331

Merged
merged 6 commits into from
Jul 17, 2024

Commits on Jul 15, 2024

  1. [compiler] General-purpose function outlining

    Implements general-purpose function outlining. Specifically, anonymous function expressions which have no dependencies/context variables are extracted into named top-level functions. The original function expression is replaced with a `LoadGlobal` of the generated name.
    
    Note that the architecture is designed to allow very general purpose forms of outlining, though we currently are very conservative in what we outline. Specifically, the outlining allows annotating functions with an optional ReactiveFunctionType, which if set will cause the outlined function to get compiled as that type. So we could for example outline a helper hook or helper component, set the type, and then have the hook/component get memoized as well. For now though we just outline with no type set, and generate the function as-is without running it through compilation.
    
    [ghstack-poisoned]
    josephsavona committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    d852a12 View commit details
    Browse the repository at this point in the history
  2. Update on "[compiler] General-purpose function outlining"

    Implements general-purpose function outlining. Specifically, anonymous function expressions which have no dependencies/context variables are extracted into named top-level functions. The original function expression is replaced with a `LoadGlobal` of the generated name.
    
    Note that the architecture is designed to allow very general purpose forms of outlining, though we currently are very conservative in what we outline. Specifically, the outlining allows annotating functions with an optional ReactiveFunctionType, which if set will cause the outlined function to get compiled as that type. So we could for example outline a helper hook or helper component, set the type, and then have the hook/component get memoized as well. For now though we just outline with no type set, and generate the function as-is without running it through compilation.
    
    [ghstack-poisoned]
    josephsavona committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    2848418 View commit details
    Browse the repository at this point in the history
  3. Update on "[compiler] General-purpose function outlining"

    Implements general-purpose function outlining. Specifically, anonymous function expressions which have no dependencies/context variables are extracted into named top-level functions. The original function expression is replaced with a `LoadGlobal` of the generated name.
    
    Note that the architecture is designed to allow very general purpose forms of outlining, though we currently are very conservative in what we outline. Specifically, the outlining allows annotating functions with an optional ReactiveFunctionType, which if set will cause the outlined function to get compiled as that type. So we could for example outline a helper hook or helper component, set the type, and then have the hook/component get memoized as well. For now though we just outline with no type set, and generate the function as-is without running it through compilation.
    
    [ghstack-poisoned]
    josephsavona committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    cdffa69 View commit details
    Browse the repository at this point in the history
  4. Update on "[compiler] General-purpose function outlining"

    Implements general-purpose function outlining. Specifically, anonymous function expressions which have no dependencies/context variables are extracted into named top-level functions. The original function expression is replaced with a `LoadGlobal` of the generated name.
    
    Note that the architecture is designed to allow very general purpose forms of outlining, though we currently are very conservative in what we outline. Specifically, the outlining allows annotating functions with an optional ReactiveFunctionType, which if set will cause the outlined function to get compiled as that type. So we could for example outline a helper hook or helper component, set the type, and then have the hook/component get memoized as well. For now though we just outline with no type set, and generate the function as-is without running it through compilation.
    
    [ghstack-poisoned]
    josephsavona committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    0f30a14 View commit details
    Browse the repository at this point in the history
  5. Update on "[compiler] General-purpose function outlining"

    Implements general-purpose function outlining. Specifically, anonymous function expressions which have no dependencies/context variables are extracted into named top-level functions. The original function expression is replaced with a `LoadGlobal` of the generated name.
    
    Note that the architecture is designed to allow very general purpose forms of outlining, though we currently are very conservative in what we outline. Specifically, the outlining allows annotating functions with an optional ReactiveFunctionType, which if set will cause the outlined function to get compiled as that type. So we could for example outline a helper hook or helper component, set the type, and then have the hook/component get memoized as well. For now though we just outline with no type set, and generate the function as-is without running it through compilation.
    
    [ghstack-poisoned]
    josephsavona committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b78cd6e View commit details
    Browse the repository at this point in the history
  6. Update on "[compiler] General-purpose function outlining"

    Implements general-purpose function outlining. Specifically, anonymous function expressions which have no dependencies/context variables are extracted into named top-level functions. The original function expression is replaced with a `LoadGlobal` of the generated name.
    
    Note that the architecture is designed to allow very general purpose forms of outlining, though we currently are very conservative in what we outline. Specifically, the outlining allows annotating functions with an optional ReactiveFunctionType, which if set will cause the outlined function to get compiled as that type. So we could for example outline a helper hook or helper component, set the type, and then have the hook/component get memoized as well. For now though we just outline with no type set, and generate the function as-is without running it through compilation.
    
    [ghstack-poisoned]
    josephsavona committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    28278fc View commit details
    Browse the repository at this point in the history