Introduce LanguageMode, drop StrictMode.
authormarja <marja@chromium.org>
Wed, 4 Feb 2015 09:34:05 +0000 (01:34 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 4 Feb 2015 09:34:26 +0000 (09:34 +0000)
commitc7851da4aefb644ab198ead1fa284932fd424797
tree9237b83d5b13a6f074ad1b6aa38c602dc5db8cb4
parentf37047cdbee4d8a4211017a2cd999fae2610b65d
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=

Review URL: https://codereview.chromium.org/894683003

Cr-Commit-Position: refs/heads/master@{#26419}
82 files changed:
src/accessors.cc
src/api.cc
src/arm/full-codegen-arm.cc
src/arm/lithium-arm.h
src/arm/lithium-codegen-arm.cc
src/arm/lithium-codegen-arm.h
src/arm64/full-codegen-arm64.cc
src/arm64/lithium-arm64.h
src/arm64/lithium-codegen-arm64.cc
src/ast.cc
src/ast.h
src/code-factory.cc
src/code-factory.h
src/code-stubs-hydrogen.cc
src/code-stubs.h
src/compilation-cache.cc
src/compilation-cache.h
src/compiler.cc
src/compiler.h
src/compiler/ast-graph-builder.cc
src/compiler/ast-graph-builder.h
src/compiler/js-generic-lowering.cc
src/compiler/js-inlining.cc
src/compiler/js-operator.cc
src/compiler/js-operator.h
src/contexts.h
src/elements.cc
src/elements.h
src/execution.cc
src/factory.cc
src/full-codegen.cc
src/full-codegen.h
src/globals.h
src/hydrogen-instructions.h
src/hydrogen.cc
src/hydrogen.h
src/ia32/full-codegen-ia32.cc
src/ia32/lithium-codegen-ia32.cc
src/ia32/lithium-codegen-ia32.h
src/ia32/lithium-ia32.h
src/ic/arm/ic-arm.cc
src/ic/arm/ic-compiler-arm.cc
src/ic/arm64/ic-arm64.cc
src/ic/arm64/ic-compiler-arm64.cc
src/ic/ia32/ic-compiler-ia32.cc
src/ic/ia32/ic-ia32.cc
src/ic/ic-compiler.cc
src/ic/ic-compiler.h
src/ic/ic-inl.h
src/ic/ic.cc
src/ic/ic.h
src/ic/x64/ic-compiler-x64.cc
src/ic/x64/ic-x64.cc
src/isolate.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/parser.cc
src/parser.h
src/preparse-data.h
src/preparser.cc
src/preparser.h
src/runtime.js
src/runtime/runtime-classes.cc
src/runtime/runtime-compiler.cc
src/runtime/runtime-debug.cc
src/runtime/runtime-function.cc
src/runtime/runtime-object.cc
src/runtime/runtime-scopes.cc
src/runtime/runtime-utils.h
src/runtime/runtime.h
src/scopeinfo.cc
src/scopes.cc
src/scopes.h
src/token.h
src/x64/full-codegen-x64.cc
src/x64/lithium-codegen-x64.cc
src/x64/lithium-codegen-x64.h
src/x64/lithium-x64.h
test/cctest/test-parsing.cc
test/unittests/compiler/js-operator-unittest.cc
test/unittests/compiler/js-typed-lowering-unittest.cc