src: remove unused env->vm_parsing_context_symbol#22034
src: remove unused env->vm_parsing_context_symbol#22034maclover7 wants to merge 1 commit intonodejs:masterfrom maclover7:jm-rm-parsingcontext
Conversation
TimothyGu
left a comment
There was a problem hiding this comment.
This is still very much used in https://github.com/nodejs/node/blob/master/lib/vm.js. The way the symbol was used in that file made the tests magically pass (as the string key 'undefined' is used in place).
In that particular file the symbol could just be changed to a regular local one declared with Symbol().
|
@TimothyGu But is the property read anywhere? At a glance, it looks like this would be safe to remove from |
|
Ah, sorry, missed the I agree with @addaleax though that the use in |
|
+1 for removal and using a |
|
@TimothyGu I updated to use a symbol declared inside |
|
Looks good, thanks! |
|
Landed in bd2ee60, thank you for the reviews! |
Stopped being used via 77b52fd, was originally added in d932e80. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: #22034 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
@maclover7 @TimothyGu Uh … this seems to have gotten lost in the discussion, but still, does anything speak against removing this key completely? |
|
@addaleax The symbol is used to transmit the parsing context information from |
Stopped being used via 77b52fd, was originally added in d932e80. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: #22034 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Stopped being used via 77b52fd, was originally added in d932e80. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: nodejs/node#22034 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Stopped being used via 77b52fd, was
originally added in d932e80.
For the one remaining usecase inside of
lib/vm.js, define a Symbol atthe top of the file.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes