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

Issue 8835: Track whether a node or variable are likely to be a Smi value. Propagate that... (Closed)

Created:
12 years, 1 month ago by iposva
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Track whether a node or variable are likely to be a Smi value. Propagate that knowledge in the AST and inline the Smi check into the generated code if it is deemed high value (e.g. in loops). Committed: http://code.google.com/p/v8/source/detail?r=630

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+604 lines, -29 lines) Patch
M src/ast.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/codegen-ia32.h View 1 4 chunks +8 lines, -0 lines 0 comments Download
M src/codegen-ia32.cc View 1 2 3 12 chunks +30 lines, -14 lines 0 comments Download
M src/compiler.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/prettyprinter.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/prettyprinter.cc View 1 7 chunks +36 lines, -14 lines 0 comments Download
M src/rewriter.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/rewriter.cc View 1 2 3 2 chunks +449 lines, -0 lines 0 comments Download
M src/variables.h View 1 3 chunks +47 lines, -0 lines 0 comments Download
M src/variables.cc View 1 chunk +17 lines, -0 lines 0 comments Download
M tools/v8.xcodeproj/project.pbxproj View 1 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
iposva
Opening up for a first set of comments. I know already that: - the loop_nesting_ ...
12 years, 1 month ago (2008-10-28 15:18:46 UTC) #1
Kasper Lund
LGTM. Seems easy to extend and understand. http://codereview.chromium.org/8835/diff/1/12 File src/codegen-ia32.cc (right): http://codereview.chromium.org/8835/diff/1/12#newcode817 Line 817: flags ...
12 years, 1 month ago (2008-10-28 15:25:38 UTC) #2
iposva
Thanks for the feedback. Applied the changes, made it lint and now I am running ...
12 years, 1 month ago (2008-10-28 18:30:32 UTC) #3
Kevin Millikin (Chromium)
Overall it looks like a good start. The flow of values down and up (and ...
12 years, 1 month ago (2008-10-28 19:10:41 UTC) #4
iposva
12 years, 1 month ago (2008-10-28 22:29:51 UTC) #5
http://codereview.chromium.org/8835/diff/229/239
File src/rewriter.cc (right):

http://codereview.chromium.org/8835/diff/229/239#newcode58
Line 58: void AstOptimizer::Optimize(ZoneList<Statement*>* statements) {
Agreed, but not in this change list.

On 2008/10/28 19:10:41, Kevin Millikin wrote:
> The Visitor base class should have VisitStatements and VisitExpressions that
do
> just this by default.

http://codereview.chromium.org/8835/diff/229/239#newcode95
Line 95: if (node->init()) {
Agreed and fixed. I was just mimicking other style from similar methods.

On 2008/10/28 19:10:41, Kevin Millikin wrote:
> I prefer explicit "!= NULL" here.  It seems to fit the rest of our code base.

http://codereview.chromium.org/8835/diff/229/233
File src/variables.h (right):

http://codereview.chromium.org/8835/diff/229/233#newcode86
Line 86: static char* Type2String(StaticType* type);
Again, I agree with your general suggestion, but I will leave this alone until
we change the other code that is in this style such as Variable::Mode2String().
Preferably we could use type()->ToString() instead of
StaticType::Type2String(type()).

On 2008/10/28 19:10:41, Kevin Millikin wrote:
> ToString is a better name.

Powered by Google App Engine
This is Rietveld 408576698