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

Issue 1109223004: [strong] Disallow implicit conversions for add (Closed)

Created:
5 years, 7 months ago by conradw
Modified:
5 years, 7 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[strong] Disallow implicit conversions for add Implements the strong mode proposal's restrictions on implicit conversions for the binary + operator. Test suite is also cleaned up/refactored to allow easier testing of the comparison operators in the future. BUG=v8:3956 LOG=N Committed: https://crrev.com/dea0d9b59e25287ffc1fd5eec29cbe0a71317864 Cr-Commit-Position: refs/heads/master@{#28159}

Patch Set 1 #

Total comments: 2

Patch Set 2 : cl feedback #

Total comments: 2

Patch Set 3 : cl feedback 2 #

Total comments: 2

Patch Set 4 : cl feedback 3 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -84 lines) Patch
M src/builtins.h View 2 chunks +3 lines, -0 lines 0 comments Download
M src/code-stubs-hydrogen.cc View 4 chunks +9 lines, -6 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 2 3 6 chunks +8 lines, -7 lines 0 comments Download
M src/hydrogen.h View 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen.cc View 1 chunk +8 lines, -4 lines 0 comments Download
M src/ic/ic.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.js View 1 13 chunks +37 lines, -10 lines 0 comments Download
M test/mjsunit/strong/implicit-conversions.js View 7 chunks +114 lines, -55 lines 4 comments Download

Messages

Total messages: 15 (3 generated)
conradw
PTAL
5 years, 7 months ago (2015-04-29 15:32:49 UTC) #2
Dmitry Lomov (no reviews)
lgtm, just a minor comment https://codereview.chromium.org/1109223004/diff/1/src/runtime.js File src/runtime.js (right): https://codereview.chromium.org/1109223004/diff/1/src/runtime.js#newcode163 src/runtime.js:163: //ECMA-262, section 11.6.1, page ...
5 years, 7 months ago (2015-04-30 08:43:59 UTC) #3
conradw
https://codereview.chromium.org/1109223004/diff/1/src/runtime.js File src/runtime.js (right): https://codereview.chromium.org/1109223004/diff/1/src/runtime.js#newcode163 src/runtime.js:163: //ECMA-262, section 11.6.1, page 50. On 2015/04/30 08:43:59, Dmitry ...
5 years, 7 months ago (2015-04-30 09:19:33 UTC) #4
Michael Starzinger
As discussed offline: We might consider an approach where ToNumber and ToString operations are still ...
5 years, 7 months ago (2015-04-30 09:25:56 UTC) #5
conradw
https://codereview.chromium.org/1109223004/diff/20001/src/compiler/js-typed-lowering.cc File src/compiler/js-typed-lowering.cc (right): https://codereview.chromium.org/1109223004/diff/20001/src/compiler/js-typed-lowering.cc#newcode324 src/compiler/js-typed-lowering.cc:324: !is_strong(OpParameter<LanguageMode>(node))) { On 2015/04/30 09:25:56, Michael Starzinger wrote: > ...
5 years, 7 months ago (2015-04-30 09:46:04 UTC) #6
Michael Starzinger
LGTM on the TurboFan part. https://codereview.chromium.org/1109223004/diff/40001/src/compiler/js-typed-lowering.cc File src/compiler/js-typed-lowering.cc (right): https://codereview.chromium.org/1109223004/diff/40001/src/compiler/js-typed-lowering.cc#newcode336 src/compiler/js-typed-lowering.cc:336: if (r.OneInputIs(Type::String()) && (!r.IsStrong() ...
5 years, 7 months ago (2015-04-30 10:19:21 UTC) #7
conradw
https://codereview.chromium.org/1109223004/diff/40001/src/compiler/js-typed-lowering.cc File src/compiler/js-typed-lowering.cc (right): https://codereview.chromium.org/1109223004/diff/40001/src/compiler/js-typed-lowering.cc#newcode336 src/compiler/js-typed-lowering.cc:336: if (r.OneInputIs(Type::String()) && (!r.IsStrong() || On 2015/04/30 10:19:21, Michael ...
5 years, 7 months ago (2015-04-30 10:27:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1109223004/60001
5 years, 7 months ago (2015-04-30 11:38:31 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 7 months ago (2015-04-30 11:46:09 UTC) #12
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/dea0d9b59e25287ffc1fd5eec29cbe0a71317864 Cr-Commit-Position: refs/heads/master@{#28159}
5 years, 7 months ago (2015-04-30 11:46:22 UTC) #13
arv (Not doing code reviews)
LGTM I would also like to see some tests with template literals. https://codereview.chromium.org/1109223004/diff/60001/test/mjsunit/strong/implicit-conversions.js File test/mjsunit/strong/implicit-conversions.js ...
5 years, 7 months ago (2015-04-30 16:07:32 UTC) #14
conradw
5 years, 7 months ago (2015-05-04 09:28:22 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/1109223004/diff/60001/test/mjsunit/strong/imp...
File test/mjsunit/strong/implicit-conversions.js (right):

https://codereview.chromium.org/1109223004/diff/60001/test/mjsunit/strong/imp...
test/mjsunit/strong/implicit-conversions.js:80: function add_num_strong(x, y) {
On 2015/04/30 16:07:32, arv wrote:
> Any reason for this over add_strong?

It's a kind of unfortunate way to make sure that the type feedback is starting
over from scratch (the two functions are used in different tests).

There's no way to clear type feedback on the fly for binop ICs using a natives
function. %ClearFunctionTypeFeedback wasn't doing what I thought it was.

https://codereview.chromium.org/1109223004/diff/60001/test/mjsunit/strong/imp...
test/mjsunit/strong/implicit-conversions.js:294: assertThrows(function(){func(2,
"foo");}, TypeError);
On 2015/04/30 16:07:32, arv wrote:
> Shouldn't this use a non smi?

I'm not particularly worried in this case, because of the second argument it's
going to be a miss either way.

Powered by Google App Engine
This is Rietveld 408576698