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

Issue 660372: Add syntax checker for side-effect-free expressions to AstOptimizer in rewrit... (Closed)

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

Description

Add syntax checker for side-effect-free expressions to AstOptimizer in rewriter.cc. Add bit fields for syntax checker results to Expression in ast.h. Committed: http://code.google.com/p/v8/source/detail?r=3998

Patch Set 1 #

Total comments: 10

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -1 line) Patch
M src/ast.h View 1 2 chunks +60 lines, -1 line 2 comments Download
M src/rewriter.cc View 1 4 chunks +57 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
William Hesse
Adds a syntax checker for the expressions supported by the side-effect-free expression compiler to AstOptimizer. ...
10 years, 9 months ago (2010-03-02 12:14:08 UTC) #1
Lasse Reichstein
LGTM if we only hit the correct type of slots. http://codereview.chromium.org/660372/diff/1/2 File src/ast.h (right): http://codereview.chromium.org/660372/diff/1/2#newcode239 ...
10 years, 9 months ago (2010-03-02 12:43:57 UTC) #2
William Hesse
http://codereview.chromium.org/660372/diff/1/2 File src/ast.h (right): http://codereview.chromium.org/660372/diff/1/2#newcode239 src/ast.h:239: bitfields_ |= SideEffectFreeField::encode(is_side_effect_free); On 2010/03/02 12:43:57, Lasse Reichstein wrote: ...
10 years, 9 months ago (2010-03-02 14:02:45 UTC) #3
Kevin Millikin (Chromium)
10 years, 9 months ago (2010-03-02 14:33:06 UTC) #4
http://codereview.chromium.org/660372/diff/1004/1005
File src/ast.h (right):

http://codereview.chromium.org/660372/diff/1004/1005#newcode238
src/ast.h:238: bitfields_ = (bitfields_ & ~SideEffectFreeField::mask()) |
It's a little weird that there are three different ways of writing this used in
this same snippet (two have different indenation, one has broken it into two
statements).

http://codereview.chromium.org/660372/diff/1004/1005#newcode268
src/ast.h:268: static const int SideEffectFreeFieldStart = 0;
These constants don't help anything.  They're used in one place in a context
that should be obvious.  Write:

// Bitfields are <type, start, size>.
class SideEffectFreeField: public BitField<bool, 0, 1>;
class ExpressionSizeField: public BitField<int, 1, 5>;
class StackHeightField: public BitField<int, 32 - 6>;

If you want the constants, please use the coding style
"kSideEffectFreeeFieldStart".

Powered by Google App Engine
This is Rietveld 408576698