src: remove duplicated code in GenerateSingleExecutableBlob()#49119
Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom Aug 14, 2023
Merged
src: remove duplicated code in GenerateSingleExecutableBlob()#49119nodejs-github-bot merged 2 commits intonodejs:mainfrom
GenerateSingleExecutableBlob()#49119nodejs-github-bot merged 2 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
lpinca
approved these changes
Aug 12, 2023
deokjinkim
reviewed
Aug 12, 2023
Comment on lines
499
to
504
| std::optional<std::string> optional_code_cache = | ||
| GenerateCodeCache(config.main_path, main_script); | ||
| if (!optional_code_cache.has_value()) { | ||
| FPrintF(stderr, "Cannot generate V8 code cache\n"); | ||
| return ExitCode::kGenericUserError; | ||
| } |
Contributor
There was a problem hiding this comment.
IMO, these lines(499-504) are only needed if flag for code cache is enabled. So how about removing above declaration(489-494) instead of this? Plus, declaration of code_cache variable(497) can be moved into if statement.
@RaisinTen PTAL when you are available.
Contributor
Author
There was a problem hiding this comment.
@deokjinkim
Thank you for your good comments.
You are right. It seems like a better idea. I reflected what you said.
4026cf4 to
0f27c01
Compare
deokjinkim
approved these changes
Aug 13, 2023
Collaborator
tony-go
approved these changes
Aug 14, 2023
RaisinTen
approved these changes
Aug 14, 2023
Member
RaisinTen
left a comment
There was a problem hiding this comment.
LGTM, thanks for catching this
Collaborator
|
Landed in 6476c99 |
RafaelGSS
pushed a commit
that referenced
this pull request
Aug 15, 2023
PR-URL: #49119 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Merged
RafaelGSS
pushed a commit
to RafaelGSS/node
that referenced
this pull request
Aug 15, 2023
PR-URL: nodejs#49119 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
rluvaton
pushed a commit
to rluvaton/node
that referenced
this pull request
Aug 15, 2023
PR-URL: nodejs#49119 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
RafaelGSS
pushed a commit
that referenced
this pull request
Aug 16, 2023
PR-URL: #49119 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
RafaelGSS
pushed a commit
that referenced
this pull request
Aug 17, 2023
PR-URL: #49119 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The removed
optional_code_cachevariable is already declared with the same name in the line below.In my opinion, it was judged to be unnecessary redundant code and was removed.
node/src/node_sea.cc
Lines 489 to 494 in 3224527