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

Issue 219263002: Improve chances for inlining of ExceptionState::throwIfNeeded() (Closed)

Created:
6 years, 8 months ago by fs
Modified:
6 years, 8 months ago
Reviewers:
haraken, Mike West
CC:
blink-reviews, Nils Barth (inactive), kojih, arv+blink, jsbell+bindings_chromium.org, sof, kouhei+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, Inactive
Visibility:
Public.

Description

Improve chances for inlining of ExceptionState::throwIfNeeded() Since throwIfNeeded() is called quite often in generated bindings code (and should generally return false), attempt to make is smaller by moving the exception setup/throwing to a new method, and leave throwIfNeeded() as a predicate guarding a call to that method. This seems to get rid of a large number of direct calls to throwIfNeeded(). It also shrinks the binary by a non-negligible amount (~15k). (Linux, x86-64, gcc-4.8.2) Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170447

Patch Set 1 #

Total comments: 7

Patch Set 2 : Drop LIKELY. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -7 lines) Patch
M Source/bindings/v8/ExceptionState.h View 1 2 chunks +4 lines, -7 lines 0 comments Download
M Source/bindings/v8/ExceptionState.cpp View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
fs
6 years, 8 months ago (2014-03-31 12:42:37 UTC) #1
Mike West
LGTM!
6 years, 8 months ago (2014-03-31 12:46:40 UTC) #2
haraken
LGTM. https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp File Source/bindings/v8/ExceptionState.cpp (right): https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp#newcode84 Source/bindings/v8/ExceptionState.cpp:84: ASSERT(!m_exception.isEmpty() || m_code); Can this simply be ASSERT(!m_exception.isEmpty()) ...
6 years, 8 months ago (2014-03-31 12:49:16 UTC) #3
fs
https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp File Source/bindings/v8/ExceptionState.cpp (right): https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp#newcode84 Source/bindings/v8/ExceptionState.cpp:84: ASSERT(!m_exception.isEmpty() || m_code); On 2014/03/31 12:49:16, haraken wrote: > ...
6 years, 8 months ago (2014-03-31 12:57:00 UTC) #4
haraken
https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp File Source/bindings/v8/ExceptionState.cpp (right): https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp#newcode84 Source/bindings/v8/ExceptionState.cpp:84: ASSERT(!m_exception.isEmpty() || m_code); On 2014/03/31 12:57:00, fs wrote: > ...
6 years, 8 months ago (2014-03-31 13:00:05 UTC) #5
fs
On 2014/03/31 13:00:05, haraken wrote: > https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp > File Source/bindings/v8/ExceptionState.cpp (right): > > https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.cpp#newcode84 > ...
6 years, 8 months ago (2014-03-31 13:09:20 UTC) #6
fs
https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.h File Source/bindings/v8/ExceptionState.h (right): https://codereview.chromium.org/219263002/diff/1/Source/bindings/v8/ExceptionState.h#newcode89 Source/bindings/v8/ExceptionState.h:89: if (LIKELY(!hadException())) On 2014/03/31 12:57:00, fs wrote: > On ...
6 years, 8 months ago (2014-03-31 13:20:30 UTC) #7
fs
The CQ bit was checked by fs@opera.com
6 years, 8 months ago (2014-03-31 13:20:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/219263002/20001
6 years, 8 months ago (2014-03-31 13:20:40 UTC) #9
commit-bot: I haz the power
6 years, 8 months ago (2014-03-31 14:32:25 UTC) #10
Message was sent while issue was closed.
Change committed as 170447

Powered by Google App Engine
This is Rietveld 408576698