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

Issue 1507283003: Fix FuncNameInferrer usage in ParseAssignmentExpression (Closed)

Created:
5 years ago by adamk
Modified:
5 years ago
Reviewers:
Dan Ehrenberg
CC:
caitp (gmail), rossberg, v8-reviews_googlegroups.com, wingo
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix FuncNameInferrer usage in ParseAssignmentExpression Without this fix, AssignmentExpressions that happen to be arrow functions would lead to unbalanced Enter/Leave calls on the fni_, causing thrashing while trying to infer function names. Symptoms include slow parsing or OOM (when we create too many AstConsStrings). To try to keep this from happening in the future, added an RAII helper class to handle Entering/Leaving FNI state. The included regression test crashes on my workstation without the patch. Note that it's too slow in debug mode (as well as under TurboFan), so I've skipped it there. BUG=v8:4595 LOG=y Committed: https://crrev.com/eb67f85439dcc273501e9fba5a9e883585505aa8 Cr-Commit-Position: refs/heads/master@{#32768}

Patch Set 1 #

Patch Set 2 : Really fix FNI #

Patch Set 3 : Add a basic RAII object and skip turbofan #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10048 lines, -35 lines) Patch
M src/parsing/func-name-inferrer.h View 1 2 3 chunks +25 lines, -13 lines 0 comments Download
M src/parsing/parser.cc View 1 2 6 chunks +5 lines, -12 lines 2 comments Download
M src/parsing/parser-base.h View 1 2 8 chunks +7 lines, -10 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-4595.js View 1 1 chunk +10008 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
adamk
5 years ago (2015-12-09 23:05:08 UTC) #3
Dan Ehrenberg
You were suggesting off-line that RAII would've made this a lot easier to prevent. Do ...
5 years ago (2015-12-10 01:06:23 UTC) #4
adamk
RAII'd https://codereview.chromium.org/1507283003/diff/40001/src/parsing/parser.cc File src/parsing/parser.cc (left): https://codereview.chromium.org/1507283003/diff/40001/src/parsing/parser.cc#oldcode2588 src/parsing/parser.cc:2588: if (single_name && fni_ != NULL) fni_->Leave(); Pretty ...
5 years ago (2015-12-10 01:56:53 UTC) #6
Dan Ehrenberg
lgtm I really like this more comprehensive fix https://codereview.chromium.org/1507283003/diff/40001/src/parsing/parser.cc File src/parsing/parser.cc (left): https://codereview.chromium.org/1507283003/diff/40001/src/parsing/parser.cc#oldcode2588 src/parsing/parser.cc:2588: if ...
5 years ago (2015-12-10 18:22:41 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1507283003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1507283003/40001
5 years ago (2015-12-10 19:17:37 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-10 19:18:59 UTC) #11
commit-bot: I haz the power
5 years ago (2015-12-10 19:19:43 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/eb67f85439dcc273501e9fba5a9e883585505aa8
Cr-Commit-Position: refs/heads/master@{#32768}

Powered by Google App Engine
This is Rietveld 408576698