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

Issue 8417035: Introduce extended mode. (Closed)

Created:
9 years, 1 month ago by Steven
Modified:
9 years, 1 month ago
Reviewers:
Rico, rossberg
CC:
v8-dev
Visibility:
Public.

Description

Introduce extended mode. This CL introduces a third mode next to the non-strict (henceforth called 'classic mode') and 'strict mode' which is called 'extended mode' as in the current ES.next specification drafts. The extended mode is based on the 'strict mode' and adds new functionality to it. This means that most of the semantics of these two modes coincide. The 'extended mode' is entered instead of the 'strict mode' during parsing when using the 'strict mode' directive "use strict" and when the the harmony-scoping flag is active. This should be changed once it is fully specified how the 'extended mode' is entered. This change introduces a new 3 valued enum LanguageMode (see globals.h) corresponding to the modes which is mostly used by the frontend code. This includes the following components: * (Pre)Parser * Compiler * SharedFunctionInfo, Scope and ScopeInfo * runtime functions: StoreContextSlot, ResolvePossiblyDirectEval, InitializeVarGlobal, DeclareGlobals The old enum StrictModeFlag is still used in the backend when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes: * SetProperty runtime function, Delete builtin * StoreIC and KeyedStoreIC * StubCache Committed: http://code.google.com/p/v8/source/detail?r=10062

Patch Set 1 : Rebased version. #

Total comments: 20

Patch Set 2 : Addressed comments. #

Total comments: 2

Patch Set 3 : Rebased to tip of tree. #

Total comments: 30

Patch Set 4 : Addressed more comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+733 lines, -687 lines) Patch
M src/accessors.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 2 3 16 chunks +37 lines, -37 lines 0 comments Download
M src/arm/lithium-arm.h View 1 2 3 chunks +2 lines, -3 lines 0 comments Download
M src/arm/lithium-codegen-arm.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M src/ast.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/ast.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/code-stubs.h View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M src/compilation-cache.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/compilation-cache.cc View 1 2 4 chunks +6 lines, -5 lines 0 comments Download
M src/compiler.h View 1 2 5 chunks +13 lines, -11 lines 0 comments Download
M src/compiler.cc View 1 2 3 9 chunks +21 lines, -20 lines 0 comments Download
M src/execution.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/factory.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/factory.cc View 1 2 4 chunks +11 lines, -10 lines 0 comments Download
M src/flag-definitions.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/full-codegen.h View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M src/full-codegen.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/globals.h View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
M src/handles.h View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M src/heap.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen-instructions.h View 1 2 6 chunks +8 lines, -8 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 15 chunks +36 lines, -37 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 chunks +2 lines, -3 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M src/ic.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/mips/full-codegen-mips.cc View 1 2 3 17 chunks +40 lines, -38 lines 0 comments Download
M src/mips/lithium-codegen-mips.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M src/mips/lithium-mips.h View 1 2 3 chunks +2 lines, -3 lines 0 comments Download
M src/mips/stub-cache-mips.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M src/objects.h View 1 2 3 6 chunks +29 lines, -12 lines 0 comments Download
M src/objects.cc View 1 2 10 chunks +30 lines, -26 lines 0 comments Download
M src/objects-inl.h View 1 2 3 1 chunk +27 lines, -11 lines 0 comments Download
M src/parser.h View 1 2 4 chunks +8 lines, -7 lines 0 comments Download
M src/parser.cc View 1 2 3 27 chunks +62 lines, -55 lines 0 comments Download
M src/preparse-data.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M src/preparser.h View 1 2 3 5 chunks +21 lines, -13 lines 0 comments Download
M src/preparser.cc View 1 17 chunks +38 lines, -28 lines 0 comments Download
M src/runtime.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/runtime.cc View 1 2 18 chunks +41 lines, -22 lines 0 comments Download
M src/scopeinfo.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M src/scopes.h View 1 2 3 4 chunks +15 lines, -10 lines 0 comments Download
M src/scopes.cc View 5 chunks +17 lines, -5 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 15 chunks +37 lines, -37 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 3 chunks +2 lines, -3 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/test-parsing.cc View 2 chunks +36 lines, -30 lines 0 comments Download
M test/mjsunit/debug-scopes.js View 1 chunk +1 line, -2 lines 0 comments Download
M test/mjsunit/harmony/block-conflicts.js View 1 chunk +3 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/block-for.js View 2 chunks +10 lines, -6 lines 0 comments Download
M test/mjsunit/harmony/block-leave.js View 7 chunks +42 lines, -40 lines 0 comments Download
M test/mjsunit/harmony/block-let-crankshaft.js View 1 chunk +3 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/block-let-declaration.js View 2 chunks +4 lines, -2 lines 0 comments Download
M test/mjsunit/harmony/block-let-semantics.js View 2 chunks +4 lines, -1 line 0 comments Download
M test/mjsunit/harmony/block-scoping.js View 1 chunk +3 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/debug-blockscopes.js View 1 2 4 chunks +5 lines, -110 lines 0 comments Download
M test/mjsunit/harmony/debug-evaluate-blockscopes.js View 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Steven
The extended mode is entered instead of the strict mode during parsing when using the ...
9 years, 1 month ago (2011-10-28 17:38:00 UTC) #1
rossberg
http://codereview.chromium.org/8417035/diff/11001/src/ast.h File src/ast.h (right): http://codereview.chromium.org/8417035/diff/11001/src/ast.h#newcode1635 src/ast.h:1635: bool is_strict_or_extended_mode() const { return !is_classic_mode(); } I forgot ...
9 years, 1 month ago (2011-11-08 15:02:45 UTC) #2
Steven
PTAL. http://codereview.chromium.org/8417035/diff/11001/src/ast.h File src/ast.h (right): http://codereview.chromium.org/8417035/diff/11001/src/ast.h#newcode1635 src/ast.h:1635: bool is_strict_or_extended_mode() const { return !is_classic_mode(); } On ...
9 years, 1 month ago (2011-11-08 16:13:48 UTC) #3
rossberg
lgtm http://codereview.chromium.org/8417035/diff/17001/src/objects.cc File src/objects.cc (right): http://codereview.chromium.org/8417035/diff/17001/src/objects.cc#newcode7278 src/objects.cc:7278: map() == global_context->function_map()); Nit: These two assertions could ...
9 years, 1 month ago (2011-11-09 12:15:29 UTC) #4
Rico
First round http://codereview.chromium.org/8417035/diff/29001/src/arm/full-codegen-arm.cc File src/arm/full-codegen-arm.cc (right): http://codereview.chromium.org/8417035/diff/29001/src/arm/full-codegen-arm.cc#newcode2196 src/arm/full-codegen-arm.cc:2196: // Push the receiver of the enclosing ...
9 years, 1 month ago (2011-11-14 14:58:52 UTC) #5
Rico
Second round of comments http://codereview.chromium.org/8417035/diff/29001/src/globals.h File src/globals.h (right): http://codereview.chromium.org/8417035/diff/29001/src/globals.h#newcode364 src/globals.h:364: enum LanguageMode { could we ...
9 years, 1 month ago (2011-11-15 08:25:07 UTC) #6
Steven
I addressed your comments from both rounds. Please take another look. http://codereview.chromium.org/8417035/diff/29001/src/arm/full-codegen-arm.cc File src/arm/full-codegen-arm.cc (right): ...
9 years, 1 month ago (2011-11-15 13:33:29 UTC) #7
Rico
9 years, 1 month ago (2011-11-16 08:05:10 UTC) #8
LGTM

Powered by Google App Engine
This is Rietveld 408576698