Stage ES2015-style const in sloppy mode

This patch switches sloppy-mode code from legacy const semantics
to ES2015 semantics. It is unknown how much of the web will be
broken by this; likely the patch will have to be reverted before
a branch happens.

BUG=v8:3739
LOG=Y
R=rossberg,adamk

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

Cr-Commit-Position: refs/heads/master@{#31525}
This commit is contained in:
littledan 2015-10-23 07:04:27 -07:00 committed by Commit bot
parent daf76e6d14
commit 0a0272dad0
2 changed files with 2 additions and 39 deletions

View File

@ -186,6 +186,8 @@ DEFINE_IMPLICATION(harmony, es_staging)
DEFINE_IMPLICATION(es_staging, harmony)
DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
// ES2015 const semantics are staged
DEFINE_NEG_IMPLICATION(es_staging, legacy_const)
// Features that are still work in progress (behind individual flags).
#define HARMONY_INPROGRESS(V) \

View File

@ -50,45 +50,6 @@
###################### MISSING ES6 FEATURES #######################
# Const is still interpreted as legacy const in sloppy mode
# https://code.google.com/p/v8/issues/detail?id=3305
'language/block-scope/shadowing/const-declaration-shadowing-catch-parameter': [PASS, FAIL_SLOPPY],
'language/block-scope/shadowing/const-declarations-shadowing-parameter-name-let-const-and-var-variables': [PASS, FAIL_SLOPPY],
'language/statements/const/block-local-closure-get-before-initialization': [PASS, FAIL_SLOPPY],
'language/statements/const/block-local-use-before-initialization-in-declaration-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/block-local-use-before-initialization-in-prior-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/function-local-closure-get-before-initialization': [PASS, FAIL_SLOPPY],
'language/statements/const/function-local-use-before-initialization-in-declaration-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/function-local-use-before-initialization-in-prior-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/global-closure-get-before-initialization': [PASS, FAIL_SLOPPY],
'language/statements/const/global-use-before-initialization-in-declaration-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/global-use-before-initialization-in-prior-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/block-scope-syntax-const-declarations-mixed-with-without-initialiser': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/block-scope-syntax-const-declarations-mixed-without-with-initialiser': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/block-scope-syntax-const-declarations-without-initialiser': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/const': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/const-invalid-assignment-statement-body-for-in': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/const-invalid-assignment-statement-body-for-of': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/const-outer-inner-let-bindings': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/with-initializer-do-statement-while-expression': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/with-initializer-for-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/with-initializer-if-expression-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/with-initializer-if-expression-statement-else-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/with-initializer-label-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/with-initializer-while-expression-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-case-expression-statement-list': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-default-statement-list': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-do-statement-while-expression': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-for-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-if-expression-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-if-expression-statement-else-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-label-statement': [PASS, FAIL_SLOPPY],
'language/statements/const/syntax/without-initializer-while-expression-statement': [PASS, FAIL_SLOPPY],
'language/statements/for-in/const-bound-names-fordecl-tdz-for-in': [PASS, FAIL_SLOPPY],
'language/statements/for-in/const-fresh-binding-per-iteration-for-in': [PASS, FAIL_SLOPPY],
'language/statements/for-of/const-bound-names-fordecl-tdz-for-of': [PASS, FAIL_SLOPPY],
'language/statements/for-of/const-fresh-binding-per-iteration-for-of': [PASS, FAIL_SLOPPY],
# Functions in blocks are var-declared and hoisted in sloppy mode
# https://code.google.com/p/v8/issues/detail?id=3305
'language/block-scope/shadowing/dynamic-lookup-from-closure': [PASS, FAIL_SLOPPY],