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

Editorial: Rename some aliases #2353

Merged
merged 2 commits into from
Jan 20, 2022
Merged

Editorial: Rename some aliases #2353

merged 2 commits into from
Jan 20, 2022

Conversation

jmdyck
Copy link
Collaborator

@jmdyck jmdyck commented Mar 20, 2021

No description provided.

Copy link
Contributor

@syg syg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the scope to env change, but still like the original closure name. Happy to hear preferences from @bakkot and @michaelficarra.

@michaelficarra
Copy link
Member

michaelficarra commented Mar 24, 2021

Slightly in favour of scope to env, no preference on closure to function.

edit: Also in favour of body to script rename.

@syg syg added the editor call to be discussed in the next editor call label Mar 31, 2021
@syg
Copy link
Contributor

syg commented Mar 31, 2021

@jmdyck Discussed this on the editor call. We favor the _scope_ to _env_ change, but let's keep the _closure_ ones as is.

@syg syg removed the editor call to be discussed in the next editor call label Mar 31, 2021
@jmdyck
Copy link
Collaborator Author

jmdyck commented Apr 1, 2021

(force-pushed to resolve merge conflicts)

@jmdyck
Copy link
Collaborator Author

jmdyck commented Apr 1, 2021

let's keep the _closure_ ones as is.

So is it that the gain is not worth the churn, or do you actively prefer _closure_ in these cases? Because if the latter, then there are other parallel cases that don't use _closure_ that you might want changed:

Currently, every use of _closure_ for a function object is getting the direct result of OrdinaryFunctionCreate. But for about a third of such calls, the alias used is _F_ rather than _closure_. Do you want _F_ changed to _closure_ in those cases?

@syg
Copy link
Contributor

syg commented Apr 28, 2021

So is it that the gain is not worth the churn, or do you actively prefer closure in these cases? Because if the latter, then there are other parallel cases that don't use closure that you might want changed:

I personally actively prefer closure, but IIRC @bakkot's preference here was leaning towards less churn, so I think for this PR we can leave the uses of F as is.

@jmdyck
Copy link
Collaborator Author

jmdyck commented Apr 30, 2021

Okay, dropping the first commit then.

jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Apr 30, 2021
Specifically:
    `_scope_`      -> `_env_` (or sometimes `_outerEnv_`)
    `_Scope_`      -> `_env_`
    `_classScope_` -> `_classEnv_`
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Apr 30, 2021
In ParseScript:
ParseText is invoked with |Script| as the goal,
so the result (if it isn't errors) is an instance of |Script|,
so change the alias `_body_` to `_script_`.

And note that the Script Record's [[ECMAScriptCode]] field
is also an instance of |Script|.

In ScriptEvaluation:
Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|,
change the alias `_scriptBody_` to `_script_`.
@jmdyck
Copy link
Collaborator Author

jmdyck commented Apr 30, 2021

force-pushed to:

  • rebase to master
  • drop the _closure_ -> _function_ commit

jmdyck added a commit to jmdyck/ecma262 that referenced this pull request May 13, 2021
Specifically:
    `_scope_`      -> `_env_` (or sometimes `_outerEnv_`)
    `_Scope_`      -> `_env_`
    `_classScope_` -> `_classEnv_`
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request May 13, 2021
In ParseScript:
ParseText is invoked with |Script| as the goal,
so the result (if it isn't errors) is an instance of |Script|,
so change the alias `_body_` to `_script_`.

And note that the Script Record's [[ECMAScriptCode]] field
is also an instance of |Script|.

In ScriptEvaluation:
Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|,
change the alias `_scriptBody_` to `_script_`.
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request May 13, 2021
Specifically:
    `_scope_`        -> `_env_` (or sometimes `_outerEnv_`)
    `_Scope_`        -> `_env_`
    `_classScope_`   -> `_classEnv_`
    `_privateScope_` -> `_privateEnv_`
    `_PrivateScope_` -> `_privateEnv_`
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request May 13, 2021
In ParseScript:
ParseText is invoked with |Script| as the goal,
so the result (if it isn't errors) is an instance of |Script|,
so change the alias `_body_` to `_script_`.

And note that the Script Record's [[ECMAScriptCode]] field
is also an instance of |Script|.

In ScriptEvaluation:
Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|,
change the alias `_scriptBody_` to `_script_`.
@jmdyck
Copy link
Collaborator Author

jmdyck commented May 13, 2021

force-pushed to:

@ljharb ljharb force-pushed the master branch 3 times, most recently from 3d0c24c to 7a79833 Compare June 29, 2021 02:21
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Jul 18, 2021
Specifically:
    `_scope_`        -> `_env_` (or sometimes `_outerEnv_`)
    `_Scope_`        -> `_env_`
    `_classScope_`   -> `_classEnv_`
    `_privateScope_` -> `_privateEnv_`
    `_PrivateScope_` -> `_privateEnv_`
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Jul 18, 2021
In ParseScript:
ParseText is invoked with |Script| as the goal,
so the result (if it isn't errors) is an instance of |Script|,
so change the alias `_body_` to `_script_`.

And note that the Script Record's [[ECMAScriptCode]] field
is also an instance of |Script|.

In ScriptEvaluation:
Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|,
change the alias `_scriptBody_` to `_script_`.
@jmdyck
Copy link
Collaborator Author

jmdyck commented Jul 18, 2021

force-pushed to:

  • rebase to master, and
  • resolve merge conflicts from PR 545

jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Sep 14, 2021
Specifically:
    `_scope_`        -> `_env_` (or sometimes `_outerEnv_`)
    `_Scope_`        -> `_env_`
    `_classScope_`   -> `_classEnv_`
    `_privateScope_` -> `_privateEnv_`
    `_PrivateScope_` -> `_privateEnv_`
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Sep 14, 2021
In ParseScript:
ParseText is invoked with |Script| as the goal,
so the result (if it isn't errors) is an instance of |Script|,
so change the alias `_body_` to `_script_`.

And note that the Script Record's [[ECMAScriptCode]] field
is also an instance of |Script|.

In ScriptEvaluation:
Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|,
change the alias `_scriptBody_` to `_script_`.
@jmdyck
Copy link
Collaborator Author

jmdyck commented Sep 14, 2021

force-pushed to rebase to master, resolve merge-conflicts

jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Sep 24, 2021
Specifically:
    `_scope_`        -> `_env_` (or sometimes `_outerEnv_`)
    `_Scope_`        -> `_env_`
    `_classScope_`   -> `_classEnv_`
    `_privateScope_` -> `_privateEnv_`
    `_PrivateScope_` -> `_privateEnv_`
jmdyck added a commit to jmdyck/ecma262 that referenced this pull request Sep 24, 2021
In ParseScript:
ParseText is invoked with |Script| as the goal,
so the result (if it isn't errors) is an instance of |Script|,
so change the alias `_body_` to `_script_`.

And note that the Script Record's [[ECMAScriptCode]] field
is also an instance of |Script|.

In ScriptEvaluation:
Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|,
change the alias `_scriptBody_` to `_script_`.
Copy link
Contributor

@syg syg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for updating.

@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Jan 19, 2022
Specifically:
    `_scope_`        -> `_env_` (or sometimes `_outerEnv_`)
    `_Scope_`        -> `_env_`
    `_classScope_`   -> `_classEnv_`
    `_privateScope_` -> `_privateEnv_`
    `_PrivateScope_` -> `_privateEnv_`
In ParseScript:
ParseText is invoked with |Script| as the goal,
so the result (if it isn't errors) is an instance of |Script|,
so change the alias `_body_` to `_script_`.

And note that the Script Record's [[ECMAScriptCode]] field
is also an instance of |Script|.

In ScriptEvaluation:
Since _scriptRecord_.[[ECMAScriptCode]] is an instance of |Script|,
change the alias `_scriptBody_` to `_script_`.
@ljharb ljharb merged commit 38a2584 into tc39:main Jan 20, 2022
@jmdyck jmdyck deleted the rename_aliases branch January 20, 2022 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants