Uh oh!
There was an error while loading. Please reload this page.
src: remove unused env->vm_parsing_context_symbol - #22034
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().
addaleax
commented
Jul 31, 2018
@TimothyGu But is the property read anywhere? At a glance, it looks like this would be safe to remove from |
maclover7
commented
Jul 31, 2018
Ah, sorry, missed the I agree with @addaleax though that the use in |
targos
commented
Jul 31, 2018
+1 for removal and using a |
maclover7
commented
Aug 2, 2018
@TimothyGu I updated to use a symbol declared inside |
TimothyGu
commented
Aug 2, 2018
Looks good, thanks! |
maclover7
commented
Aug 3, 2018
maclover7
commented
Aug 4, 2018
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>
addaleax
commented
Aug 5, 2018
@maclover7@TimothyGu Uh … this seems to have gotten lost in the discussion, but still, does anything speak against removing this key completely? |
TimothyGu
commented
Aug 5, 2018
@addaleax The symbol is used to transmit the parsing context information from |
targos
commented
Aug 6, 2018
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