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

Issue 668256: Add AST analysis that flags expressions that will have ToInt32 applied to the... (Closed)

Created:
10 years, 9 months ago by William Hesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add AST analysis that flags expressions that will have ToInt32 applied to them. Simplify AST analysis of side-effect-free int32 expressions. Committed: http://code.google.com/p/v8/source/detail?r=4056

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 8

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -90 lines) Patch
M src/ast.h View 1 2 2 chunks +12 lines, -41 lines 0 comments Download
M src/flag-definitions.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/rewriter.cc View 1 2 6 chunks +53 lines, -49 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
I have two places where a flag is set without using the FLAG_safe_int32_compiler flag, since ...
10 years, 9 months ago (2010-03-08 14:09:49 UTC) #1
Kevin Millikin (Chromium)
LGTM with some suggestions for cleanup. http://codereview.chromium.org/668256/diff/1006/7 File src/ast.h (right): http://codereview.chromium.org/668256/diff/1006/7#newcode244 src/ast.h:244: // Will ToInt32 ...
10 years, 9 months ago (2010-03-08 14:43:30 UTC) #2
William Hesse
10 years, 9 months ago (2010-03-08 15:20:50 UTC) #3
http://codereview.chromium.org/668256/diff/1006/7
File src/ast.h (right):

http://codereview.chromium.org/668256/diff/1006/7#newcode244
src/ast.h:244: // Will ToInt32 be immediately applied to the result of this
function?
On 2010/03/08 14:43:30, Kevin Millikin wrote:
> Comment should say "Will ToInt32 (ECMA 262-3 9.5) or ToUunt32 (ECMA 262-3 9.6)
> be applied to the result of this expression?"
> 
> I.e., mention ToUint32, don't say "immediately", "function" ==> "expression".

Done.

http://codereview.chromium.org/668256/diff/1006/7#newcode260
src/ast.h:260: class SideEffectFreeField : public BitField<bool, 0, 1> {};
On 2010/03/08 14:43:30, Kevin Millikin wrote:
> Comment here saying "BitFields have <type, start, size>." or some such.

Done.

http://codereview.chromium.org/668256/diff/1006/8
File src/rewriter.cc (right):

http://codereview.chromium.org/668256/diff/1006/8#newcode430
src/rewriter.cc:430: node->expression()->set_to_int32(true);
I want to_int32 to be correct even if --nosafe-int32-compiler.  Moved into the
switch if flag is true.

On 2010/03/08 14:43:30, Kevin Millikin wrote:
> You could move this inside the switch inside the if, and put it before ADD and
> let it fall through.

Done.

Powered by Google App Engine
This is Rietveld 408576698