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

Issue 21505002: Fixed Typefeedback for Number Truncation (Closed)

Created:
7 years, 4 months ago by oliv
Modified:
7 years, 4 months ago
Reviewers:
Sven Panne
CC:
v8-dev
Visibility:
Public.

Description

Fixed Typefeedback for Number Truncation Additionally split BuildBinaryOperation into two parts for future usage by a stub. BUG=

Patch Set 1 : #

Total comments: 5

Patch Set 2 : address review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -16 lines) Patch
M src/hydrogen.h View 2 chunks +15 lines, -5 lines 0 comments Download
M src/hydrogen.cc View 1 6 chunks +26 lines, -11 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
oliv
7 years, 4 months ago (2013-08-01 09:04:12 UTC) #1
Sven Panne
LGTM with nits. https://codereview.chromium.org/21505002/diff/3001/src/hydrogen.cc File src/hydrogen.cc (right): https://codereview.chromium.org/21505002/diff/3001/src/hydrogen.cc#newcode7635 src/hydrogen.cc:7635: HValue* right, Nit: Fix indentation of ...
7 years, 4 months ago (2013-08-01 09:21:09 UTC) #2
oliv
7 years, 4 months ago (2013-08-01 09:53:43 UTC) #3
https://codereview.chromium.org/21505002/diff/3001/src/hydrogen.cc
File src/hydrogen.cc (right):

https://codereview.chromium.org/21505002/diff/3001/src/hydrogen.cc#newcode7731
src/hydrogen.cc:7731: HValue* context) {
On 2013/08/01 09:21:09, Sven Panne wrote:
> Hmmm, having 8 arguments is not very nice, but let's see how it will be used
> elsewhere and perhaps refactor that. A TODO would be nice.

well i know that the stub will have to pass exactly those args, since in the
case of stybs the type-feedback comes directly from the extra-ic-state and not
the Type system....

https://codereview.chromium.org/21505002/diff/3001/src/hydrogen.cc#newcode7736
src/hydrogen.cc:7736: if (op != Token::ADD ||
On 2013/08/01 09:21:09, Sven Panne wrote:
> Brain explosion caused by heavy use of negation... o_O Pushing the negation
> outwards, things are much clearer:
> 
>   if (!(op == Token::ADD &&
>         (left_type->Maybe(Type::String()) ||
>          right_type->Maybe(Type::String())))) {
> 
> Naming the expression would be even better:
> 
>   bool maybe_string_addition = ...
>   if (!maybe_string_addition) {
> 
> This would even make the comment in the if body obsolete.
> 
> "Comments are a sign of our inability to express things in code." :-)

yup, mechanical refactoring issue...

Powered by Google App Engine
This is Rietveld 408576698