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

Issue 379893002: Clean up and update const / var (Closed)

Created:
6 years, 5 months ago by Toon Verwaest
Modified:
6 years, 5 months ago
Reviewers:
rossberg
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

This CL simplifies var / const by ensuring the behavior is consistent in itself, and with regular JS semantics; between regular var/const and eval-ed var/const. Legacy const is changed so that a declaration declares a configurable, but non-writable, slot, and the initializer reconfigures it (when possible) to non-configurable non-writable. This avoids the need for "the hole" as marker value in JSContextExtensionObjects and GlobalObjects. Undefined is used instead. BUG= R=rossberg@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=22379

Patch Set 1 : #

Total comments: 26

Patch Set 2 : Addressed comments #

Patch Set 3 : Addressed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+709 lines, -1093 lines) Patch
M src/arm/full-codegen-arm.cc View 1 5 chunks +26 lines, -32 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 1 5 chunks +28 lines, -34 lines 0 comments Download
M src/full-codegen.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 5 chunks +24 lines, -30 lines 0 comments Download
M src/objects.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/parser.cc View 1 3 chunks +15 lines, -14 lines 0 comments Download
M src/runtime.h View 1 1 chunk +299 lines, -299 lines 0 comments Download
M src/runtime.cc View 1 2 9 chunks +215 lines, -362 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 5 chunks +24 lines, -30 lines 0 comments Download
M test/cctest/test-decls.cc View 10 chunks +26 lines, -180 lines 0 comments Download
M test/mjsunit/const-eval-init.js View 1 4 chunks +17 lines, -16 lines 0 comments Download
M test/mjsunit/const-redecl.js View 1 4 chunks +14 lines, -68 lines 0 comments Download
M test/mjsunit/global-const-var-conflicts.js View 1 chunk +8 lines, -5 lines 0 comments Download
M test/mjsunit/regress/regress-1170.js View 3 chunks +4 lines, -7 lines 0 comments Download
M test/mjsunit/regress/regress-1213575.js View 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/regress/regress-freeze-setter.js View 1 1 chunk +2 lines, -2 lines 0 comments Download
M test/mjsunit/regress/regress-global-freeze-const.js View 1 1 chunk +0 lines, -7 lines 0 comments Download
M test/mozilla/mozilla.status View 1 chunk +0 lines, -4 lines 0 comments Download
M tools/generate-runtime-tests.py View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Toon Verwaest
PTAL
6 years, 5 months ago (2014-07-10 14:12:47 UTC) #1
rossberg
https://codereview.chromium.org/379893002/diff/120001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/379893002/diff/120001/src/objects.cc#newcode2354 src/objects.cc:2354: FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate), Hm, how exactly is this related ...
6 years, 5 months ago (2014-07-11 12:54:49 UTC) #2
Toon Verwaest
Addressed comments, PTAL again https://codereview.chromium.org/379893002/diff/120001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/379893002/diff/120001/src/objects.cc#newcode2354 src/objects.cc:2354: FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate), On 2014/07/11 ...
6 years, 5 months ago (2014-07-14 07:39:56 UTC) #3
rossberg
https://codereview.chromium.org/379893002/diff/120001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/379893002/diff/120001/src/runtime.cc#newcode2146 src/runtime.cc:2146: return *value; On 2014/07/14 07:39:55, Toon Verwaest wrote: > ...
6 years, 5 months ago (2014-07-14 12:04:22 UTC) #4
Toon Verwaest
Returning undefined now.
6 years, 5 months ago (2014-07-14 12:16:02 UTC) #5
rossberg
lgtm
6 years, 5 months ago (2014-07-14 12:23:57 UTC) #6
Toon Verwaest
6 years, 5 months ago (2014-07-14 14:01:28 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 manually as r22379 (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698