Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Issue 2509143003: Treat a '!' preceding a function literal as eager-compile hint. (Closed)

Created:
4 years, 1 month ago by vogelheim
Modified:
4 years, 1 month ago
Reviewers:
Toon Verwaest
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Treat a '!' preceding a function literal as eager-compile hint. Some minifiers use the pattern !function ... () for JS code that should be immediately executed. This change recognizes that pattern and treats it equally to parenthesized functions. A bit more background info is in the referenced bug. R=verwaest@chromium.org BUG=v8:5643 Committed: https://crrev.com/eefe11a1e6516f4ceda9d581b6c28ec792896e7d Cr-Commit-Position: refs/heads/master@{#41114}

Patch Set 1 #

Total comments: 1

Patch Set 2 : remove empty line. #

Total comments: 2

Patch Set 3 : Rename, and remove this_function_* variants. #

Total comments: 2

Patch Set 4 : Review feedback. #

Patch Set 5 : Rebase + drop now obsolete FLAG_min_preparse_length. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -23 lines) Patch
M src/parsing/parser.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 chunks +21 lines, -22 lines 0 comments Download
M test/cctest/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/cctest.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A test/cctest/parsing/test-parse-decision.cc View 1 2 3 4 1 chunk +68 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (14 generated)
vogelheim
https://codereview.chromium.org/2509143003/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2509143003/diff/1/src/parsing/parser-base.h#newcode1491 src/parsing/parser-base.h:1491: outer_function_state_->next_function_is_exclaimed_ = false; self-nitpick: :) All this flag handling ...
4 years, 1 month ago (2016-11-17 12:09:49 UTC) #3
Toon Verwaest
lgtm https://codereview.chromium.org/2509143003/diff/20001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2509143003/diff/20001/src/parsing/parser.cc#newcode2534 src/parsing/parser.cc:2534: (function_state_->next_function_is_parenthesized() || What about just something like: next_function_is_likely_called?
4 years, 1 month ago (2016-11-17 13:56:49 UTC) #6
vogelheim
https://codereview.chromium.org/2509143003/diff/20001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2509143003/diff/20001/src/parsing/parser.cc#newcode2534 src/parsing/parser.cc:2534: (function_state_->next_function_is_parenthesized() || On 2016/11/17 13:56:48, Toon Verwaest wrote: > ...
4 years, 1 month ago (2016-11-17 14:56:31 UTC) #7
Toon Verwaest
I don't really see the problem with anyone being able to set it since it's ...
4 years, 1 month ago (2016-11-17 15:08:42 UTC) #8
vogelheim
On 2016/11/17 15:08:42, Toon Verwaest wrote: > I don't really see the problem with anyone ...
4 years, 1 month ago (2016-11-18 12:58:15 UTC) #11
Toon Verwaest
lgtm https://codereview.chromium.org/2509143003/diff/40001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2509143003/diff/40001/src/parsing/parser-base.h#newcode1781 src/parsing/parser-base.h:1781: if (peek() == Token::FUNCTION) use {} after if ...
4 years, 1 month ago (2016-11-18 13:59:48 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2509143003/60001
4 years, 1 month ago (2016-11-18 14:10:15 UTC) #17
vogelheim
https://codereview.chromium.org/2509143003/diff/40001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2509143003/diff/40001/src/parsing/parser-base.h#newcode1781 src/parsing/parser-base.h:1781: if (peek() == Token::FUNCTION) On 2016/11/18 13:59:48, Toon Verwaest ...
4 years, 1 month ago (2016-11-18 14:10:30 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/12415) v8_linux64_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 1 month ago (2016-11-18 14:13:06 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2509143003/80001
4 years, 1 month ago (2016-11-18 14:28:26 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-18 14:56:39 UTC) #24
commit-bot: I haz the power
4 years, 1 month ago (2016-11-18 14:57:10 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/eefe11a1e6516f4ceda9d581b6c28ec792896e7d
Cr-Commit-Position: refs/heads/master@{#41114}

Powered by Google App Engine
This is Rietveld 408576698