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

Issue 289843006: Avoid extra arity and type check on distinguishing argument (Closed)

Created:
6 years, 7 months ago by Jens Widell
Modified:
6 years, 7 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Avoid extra arity and type check on distinguishing argument For wrapper type distinguishing arguments (at least) we don't need to check the type in the method implementation, since the same check is part of the overload resolution that lead to the method being called at all. BUG=293561

Patch Set 1 : add test #

Patch Set 2 : the actual fix #

Patch Set 3 : additional test #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -2 lines) Patch
M Source/bindings/scripts/v8_interface.py View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 1 chunk +4 lines, -2 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 2 1 chunk +5 lines, -0 lines 3 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 2 chunks +138 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Jens Widell
Please review when convenient. A pretty simple fix, removing a bit of redundant code for ...
6 years, 7 months ago (2014-05-15 11:24:02 UTC) #1
Jens Widell
On 2014/05/15 11:24:02, Jens Lindström wrote: > A pretty simple fix, [...] But not as ...
6 years, 7 months ago (2014-05-15 12:25:12 UTC) #2
haraken
I might want to hear Nils' thoughts first :)
6 years, 7 months ago (2014-05-15 17:11:42 UTC) #3
Nils Barth (inactive)
not LGTM: agreed, this is too fragile, and this is a rare corner case anyway. ...
6 years, 7 months ago (2014-05-16 02:15:38 UTC) #4
Nils Barth (inactive)
https://codereview.chromium.org/289843006/diff/40001/Source/bindings/tests/idls/TestObject.idl File Source/bindings/tests/idls/TestObject.idl (right): https://codereview.chromium.org/289843006/diff/40001/Source/bindings/tests/idls/TestObject.idl#newcode415 Source/bindings/tests/idls/TestObject.idl:415: [TypeChecking=Interface] void overloadedMethodN(double a, TestInterface b); You don't need ...
6 years, 7 months ago (2014-05-16 02:15:45 UTC) #5
Jens Widell
On 2014/05/16 02:15:38, Nils Barth wrote: > not LGTM: agreed, this is too fragile, and ...
6 years, 7 months ago (2014-05-16 05:58:43 UTC) #6
Jens Widell
https://codereview.chromium.org/289843006/diff/40001/Source/bindings/tests/idls/TestObject.idl File Source/bindings/tests/idls/TestObject.idl (right): https://codereview.chromium.org/289843006/diff/40001/Source/bindings/tests/idls/TestObject.idl#newcode415 Source/bindings/tests/idls/TestObject.idl:415: [TypeChecking=Interface] void overloadedMethodN(double a, TestInterface b); On 2014/05/16 02:15:46, ...
6 years, 7 months ago (2014-05-16 05:59:17 UTC) #7
Nils Barth (inactive)
6 years, 7 months ago (2014-05-16 06:05:31 UTC) #8
https://codereview.chromium.org/289843006/diff/40001/Source/bindings/tests/id...
File Source/bindings/tests/idls/TestObject.idl (right):

https://codereview.chromium.org/289843006/diff/40001/Source/bindings/tests/id...
Source/bindings/tests/idls/TestObject.idl:415: [TypeChecking=Interface] void
overloadedMethodN(double a, TestInterface b);
On 2014/05/16 05:59:17, Jens Lindström wrote:
> Do you think it meaningful to add these methods on their own?

I don't think that's necessary, but thanks for asking!
Generally we only add test cases when there's an actual use case that fails
otherwise, not just for internal correctness tests.

(We try to keep CG and test cases close to actual usage: that's why I've been
avoiding adding correct CG code that's unused: dead code rots quickly around
here.)

Powered by Google App Engine
This is Rietveld 408576698