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

Issue 18660: Fix handling of const initialization. We did not handle the fact that... (Closed)

Created:
11 years, 11 months ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
Reviewers:
Kasper Lund
CC:
v8-dev
Visibility:
Public.

Description

Fix handling of const initialization. We did not handle the fact that a const variable can be deleted between its declaration and its initialization. This fixes issue 189: http://code.google.com/p/v8/issues/detail?id=189 Committed: http://code.google.com/p/v8/source/detail?r=1127

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -42 lines) Patch
M src/runtime.cc View 1 1 chunk +75 lines, -37 lines 2 comments Download
M test/mjsunit/const.js View 1 chunk +7 lines, -5 lines 1 comment Download
A test/mjsunit/const-eval-init.js View 1 chunk +111 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-189.js View 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
11 years, 11 months ago (2009-01-22 13:28:57 UTC) #1
Kasper Lund
LGTM. http://codereview.chromium.org/18660/diff/8/208 File src/runtime.cc (right): http://codereview.chromium.org/18660/diff/8/208#newcode836 Line 836: // Set it if it is not ...
11 years, 11 months ago (2009-01-22 13:38:47 UTC) #2
Mads Ager (chromium)
11 years, 11 months ago (2009-01-22 13:47:14 UTC) #3
Thanks!

> http://codereview.chromium.org/18660/diff/8/208
> File src/runtime.cc (right):
> 
> http://codereview.chromium.org/18660/diff/8/208#newcode836
> Line 836: // Set it if it is not a read_only property.
> read-only with a - instead of _?

Done.

> http://codereview.chromium.org/18660/diff/8/208#newcode841
> Line 841: // need to convert back to excpetions here.
> exceptions

Done.

> http://codereview.chromium.org/18660/diff/8/206
> File test/mjsunit/const.js (right):
> 
> http://codereview.chromium.org/18660/diff/8/206#newcode55
> Line 55: assertEquals(1, valueOfCount);
> I wonder why this was zero before? It seems to contradict the comment.

That test was completely broken and the code was never run.  What is there now
makes a lot of sense to me.

Powered by Google App Engine
This is Rietveld 408576698