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

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed)

Created:
5 years, 10 months ago by marja
Modified:
5 years, 10 months ago
Reviewers:
rossberg
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Introduce LanguageMode, drop StrictMode. This enables adding more language modes in the future. For maximum flexibility, LanguageMode is a bitmask, so we're not restricted to use a sequence of language modes which are progressively stricter, but we can express the language mode as combination of features. For now, LanguageMode can only be "sloppy" or "strict", and there are STATIC_ASSERTS in places which need to change when more modes are added. LanguageMode is a bit like the old LanguageMode when "extended" mode was still around (see https://codereview.chromium.org/8417035 and https://codereview.chromium.org/181543002 ) except that it's transmitted through all the layers (there's no StrictModeFlag). BUG= Committed: https://crrev.com/c7851da4aefb644ab198ead1fa284932fd424797 Cr-Commit-Position: refs/heads/master@{#26419}

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 15

Patch Set 4 : code review (rossberg@) #

Patch Set 5 : backends #

Patch Set 6 : rebased (w/ conflicts) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+823 lines, -830 lines) Patch
M src/accessors.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/api.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 2 3 4 5 13 chunks +20 lines, -18 lines 0 comments Download
M src/arm/lithium-arm.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm/lithium-codegen-arm.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 3 4 4 chunks +4 lines, -5 lines 0 comments Download
M src/arm64/full-codegen-arm64.cc View 1 2 3 4 5 14 chunks +19 lines, -17 lines 0 comments Download
M src/arm64/lithium-arm64.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm64/lithium-codegen-arm64.cc View 1 2 3 4 4 chunks +4 lines, -5 lines 0 comments Download
M src/ast.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/ast.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M src/code-factory.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/code-factory.cc View 1 1 chunk +7 lines, -6 lines 0 comments Download
M src/code-stubs.h View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download
M src/code-stubs-hydrogen.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/compilation-cache.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/compilation-cache.cc View 1 3 chunks +6 lines, -5 lines 0 comments Download
M src/compiler.h View 1 2 3 4 5 3 chunks +6 lines, -4 lines 0 comments Download
M src/compiler.cc View 1 2 3 4 5 10 chunks +18 lines, -11 lines 0 comments Download
M src/compiler/ast-graph-builder.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 5 21 chunks +33 lines, -32 lines 0 comments Download
M src/compiler/js-generic-lowering.cc View 1 2 3 4 5 1 chunk +5 lines, -5 lines 0 comments Download
M src/compiler/js-inlining.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/js-operator.h View 1 2 chunks +8 lines, -7 lines 0 comments Download
M src/compiler/js-operator.cc View 1 2 3 4 5 5 chunks +18 lines, -19 lines 0 comments Download
M src/contexts.h View 1 1 chunk +8 lines, -8 lines 0 comments Download
M src/elements.h View 1 chunk +1 line, -1 line 0 comments Download
M src/elements.cc View 1 9 chunks +14 lines, -12 lines 0 comments Download
M src/execution.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M src/factory.cc View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M src/full-codegen.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/full-codegen.cc View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M src/globals.h View 1 2 3 4 5 1 chunk +19 lines, -1 line 0 comments Download
M src/hydrogen.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 4 5 8 chunks +14 lines, -12 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 3 4 5 9 chunks +18 lines, -22 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 3 4 5 13 chunks +19 lines, -17 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 4 chunks +4 lines, -5 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/ic/arm/ic-arm.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/ic/arm/ic-compiler-arm.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M src/ic/arm64/ic-arm64.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/ic/arm64/ic-compiler-arm64.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M src/ic/ia32/ic-compiler-ia32.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M src/ic/ia32/ic-ia32.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/ic/ic.h View 1 5 chunks +22 lines, -18 lines 0 comments Download
M src/ic/ic.cc View 1 2 3 4 5 21 chunks +25 lines, -25 lines 0 comments Download
M src/ic/ic-compiler.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/ic/ic-compiler.cc View 1 2 3 4 5 4 chunks +6 lines, -6 lines 0 comments Download
M src/ic/ic-inl.h View 2 chunks +8 lines, -8 lines 0 comments Download
M src/ic/x64/ic-compiler-x64.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/ic/x64/ic-x64.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 18 chunks +52 lines, -81 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 66 chunks +153 lines, -175 lines 0 comments Download
M src/objects-inl.h View 1 2 3 2 chunks +10 lines, -7 lines 0 comments Download
M src/parser.h View 1 2 3 4 5 3 chunks +5 lines, -6 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 31 chunks +63 lines, -60 lines 0 comments Download
M src/preparse-data.h View 1 5 chunks +11 lines, -20 lines 0 comments Download
M src/preparser.h View 1 2 3 4 5 12 chunks +22 lines, -19 lines 0 comments Download
M src/preparser.cc View 1 2 3 4 5 18 chunks +24 lines, -23 lines 0 comments Download
M src/runtime.js View 1 chunk +2 lines, -2 lines 0 comments Download
M src/runtime/runtime.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/runtime/runtime-classes.cc View 1 2 3 4 5 5 chunks +10 lines, -8 lines 0 comments Download
M src/runtime/runtime-compiler.cc View 1 2 3 3 chunks +5 lines, -5 lines 0 comments Download
M src/runtime/runtime-debug.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-function.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 7 chunks +12 lines, -12 lines 0 comments Download
M src/runtime/runtime-scopes.cc View 1 7 chunks +8 lines, -8 lines 0 comments Download
M src/runtime/runtime-utils.h View 1 2 3 1 chunk +6 lines, -7 lines 0 comments Download
M src/scopeinfo.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/scopes.h View 1 2 3 4 5 4 chunks +9 lines, -7 lines 0 comments Download
M src/scopes.cc View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M src/token.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 3 4 5 13 chunks +19 lines, -17 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 3 4 chunks +4 lines, -5 lines 0 comments Download
M src/x64/lithium-x64.h View 2 chunks +2 lines, -2 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/unittests/compiler/js-operator-unittest.cc View 1 4 chunks +7 lines, -7 lines 0 comments Download
M test/unittests/compiler/js-typed-lowering-unittest.cc View 1 2 3 7 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
marja
rossberg, ptal I'd kinda like to rename SLOPPY in the enum to something else, since ...
5 years, 10 months ago (2015-02-03 10:06:28 UTC) #2
rossberg
Nice, much cleaner than the language mode we had before. > I'd kinda like to ...
5 years, 10 months ago (2015-02-03 12:26:21 UTC) #3
marja
(intended to do everything except that one maybe is_stricter_than comment) https://codereview.chromium.org/894683003/diff/40001/src/globals.h File src/globals.h (right): https://codereview.chromium.org/894683003/diff/40001/src/globals.h#newcode234 ...
5 years, 10 months ago (2015-02-03 14:45:02 UTC) #4
marja
Oh and I also wanted to note, that I left the check as is_strict() in ...
5 years, 10 months ago (2015-02-03 14:50:15 UTC) #5
rossberg
lgtm https://codereview.chromium.org/894683003/diff/40001/src/objects-inl.h File src/objects-inl.h (right): https://codereview.chromium.org/894683003/diff/40001/src/objects-inl.h#newcode5818 src/objects-inl.h:5818: DCHECK(!is_strict(this->language_mode()) || is_strict(language_mode)); On 2015/02/03 14:45:02, marja wrote: ...
5 years, 10 months ago (2015-02-03 15:14:29 UTC) #6
marja
Thanks for review. The latest patch set adds the rest of the backends (they were ...
5 years, 10 months ago (2015-02-03 17:24:09 UTC) #7
rossberg
Still LGTM
5 years, 10 months ago (2015-02-03 17:40:15 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894683003/80001
5 years, 10 months ago (2015-02-04 08:34:21 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: v8_android_arm_compile_rel on tryserver.v8 (http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/builds/1064) v8_linux_arm_rel on tryserver.v8 (http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel/builds/1150) v8_linux_rel ...
5 years, 10 months ago (2015-02-04 08:36:34 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/894683003/120001
5 years, 10 months ago (2015-02-04 08:53:20 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years, 10 months ago (2015-02-04 09:34:23 UTC) #16
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 09:34:38 UTC) #17
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c7851da4aefb644ab198ead1fa284932fd424797
Cr-Commit-Position: refs/heads/master@{#26419}

Powered by Google App Engine
This is Rietveld 408576698