Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Don't leave parameters in function's original scope when call evaluation is complete #1407

Copy link
Copy link
@jakebailey

Description

@jakebailey
Issue body actions

Part of #1402 masks the fact that when we call a function, we declare parameters inside of the scope of the function (DeclareParametersInScope) before evaluating it, but never "undo" that work. This means that we may leave traces of an old analysis around. This is particularly bad for the builtins module, whose scopes are never cleared.

The way we evaluate functions with parameters should be modified to either:

  • Restore the old parameters or remove the parameters after calling. This will likely need to be locked so two parallel calls to the same function don't cause weirdness.
  • Create a wrapper scope to evaluate the function body in that can be thrown away. This would lack the locking requirement, but many places do casts from IScope to concrete types and would break.
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.