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

Issue 6026006: Simple support for const variables in Crankshaft.... (Closed)

Created:
10 years ago by fschneider
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Simple support for const variables in Crankshaft. The approach is to handle the common case in the optimizing compiler and to bailout for the rare corner cases. This is done by initializing all local const-variables with the hole value and disallowing any use of the hole value statically. Committed: http://code.google.com/p/v8/source/detail?r=8104

Patch Set 1 #

Patch Set 2 : fixed lintos #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 8

Patch Set 5 : '' #

Total comments: 10

Patch Set 6 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -6 lines) Patch
M src/arm/lithium-arm.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M src/hydrogen.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 4 5 8 chunks +41 lines, -6 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
A test/mjsunit/compiler/regress-const.js View 1 2 3 4 1 chunk +60 lines, -0 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
fschneider
10 years ago (2010-12-20 18:44:51 UTC) #1
Kevin Millikin (Chromium)
This needs to disallow more things. It doesn't correctly handle function f() { const x ...
10 years ago (2010-12-21 16:10:19 UTC) #2
fschneider
Uploaded a new version. Now const-initializations in the optimizer are more restricted to handle the ...
10 years ago (2010-12-22 13:41:41 UTC) #3
Kevin Millikin (Chromium)
I don't really like our const semantics, but I think we should find a way ...
9 years, 11 months ago (2011-01-04 13:46:33 UTC) #4
Kevin Millikin (Chromium)
LGTM, small comments below. http://codereview.chromium.org/6026006/diff/21001/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/6026006/diff/21001/src/hydrogen.cc#newcode2315 src/hydrogen.cc:2315: //if (scope->HasIllegalRedeclaration()) BAILOUT("illegal redeclaration"); This ...
9 years, 6 months ago (2011-05-30 10:50:34 UTC) #5
fschneider
http://codereview.chromium.org/6026006/diff/21001/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/6026006/diff/21001/src/hydrogen.cc#newcode2315 src/hydrogen.cc:2315: //if (scope->HasIllegalRedeclaration()) BAILOUT("illegal redeclaration"); On 2011/05/30 10:50:34, Kevin Millikin ...
9 years, 6 months ago (2011-05-30 11:15:40 UTC) #6
Rico
http://codereview.chromium.org/6026006/diff/21005/test/mjsunit/compiler/regress-const.js File test/mjsunit/compiler/regress-const.js (right): http://codereview.chromium.org/6026006/diff/21005/test/mjsunit/compiler/regress-const.js#newcode44 test/mjsunit/compiler/regress-const.js:44: f(); Could we use %OptimizeFunctionOnNextCall(f) instead of running this ...
9 years, 6 months ago (2011-05-31 07:29:47 UTC) #7
Rico
9 years, 6 months ago (2011-05-31 07:35:13 UTC) #8
On 2011/05/31 07:29:47, Rico wrote:
>
http://codereview.chromium.org/6026006/diff/21005/test/mjsunit/compiler/regre...
> File test/mjsunit/compiler/regress-const.js (right):
> 
>
http://codereview.chromium.org/6026006/diff/21005/test/mjsunit/compiler/regre...
> test/mjsunit/compiler/regress-const.js:44: f();
> Could we use %OptimizeFunctionOnNextCall(f) instead of running this 1000000
> times + below, this times out on arm sim novfp3

Sorry, did not see that you already fixed this (stupid slow arm simulator :-))

Powered by Google App Engine
This is Rietveld 408576698