EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy)
+EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy_let)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps)
EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
+EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
static const char* harmony_tostring_natives[] = {"native harmony-tostring.js",
nullptr};
static const char* harmony_sloppy_natives[] = {nullptr};
+ static const char* harmony_sloppy_let_natives[] = {nullptr};
static const char* harmony_unicode_natives[] = {nullptr};
static const char* harmony_unicode_regexps_natives[] = {nullptr};
static const char* harmony_computed_property_names_natives[] = {nullptr};
V(harmony_regexps, "harmony regular expression extensions") \
V(harmony_proxies, "harmony proxies") \
V(harmony_sloppy, "harmony features in sloppy mode") \
+ V(harmony_sloppy_let, "harmony let in sloppy mode") \
V(harmony_unicode_regexps, "harmony unicode regexps") \
V(harmony_reflect, "harmony Reflect API") \
V(harmony_destructuring, "harmony destructuring") \
// Feature dependencies.
DEFINE_IMPLICATION(harmony_unicode_regexps, harmony_unicode)
+DEFINE_IMPLICATION(harmony_sloppy_let, harmony_sloppy)
// Flags for experimental implementation features.
set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules);
set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
set_allow_harmony_sloppy(FLAG_harmony_sloppy);
+ set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
set_allow_harmony_unicode(FLAG_harmony_unicode);
set_allow_harmony_computed_property_names(
FLAG_harmony_computed_property_names);
SET_ALLOW(harmony_modules);
SET_ALLOW(harmony_arrow_functions);
SET_ALLOW(harmony_sloppy);
+ SET_ALLOW(harmony_sloppy_let);
SET_ALLOW(harmony_unicode);
SET_ALLOW(harmony_computed_property_names);
SET_ALLOW(harmony_rest_params);
allow_natives_(false),
allow_harmony_arrow_functions_(false),
allow_harmony_sloppy_(false),
+ allow_harmony_sloppy_let_(false),
allow_harmony_computed_property_names_(false),
allow_harmony_rest_params_(false),
allow_harmony_spreadcalls_(false),
ALLOW_ACCESSORS(natives);
ALLOW_ACCESSORS(harmony_arrow_functions);
ALLOW_ACCESSORS(harmony_sloppy);
+ ALLOW_ACCESSORS(harmony_sloppy_let);
ALLOW_ACCESSORS(harmony_computed_property_names);
ALLOW_ACCESSORS(harmony_rest_params);
ALLOW_ACCESSORS(harmony_spreadcalls);
}
bool allow_let() {
- return is_strict(language_mode()) || allow_harmony_sloppy();
+ return is_strict(language_mode()) || allow_harmony_sloppy_let();
}
// Report syntax errors.
bool allow_natives_;
bool allow_harmony_arrow_functions_;
bool allow_harmony_sloppy_;
+ bool allow_harmony_sloppy_let_;
bool allow_harmony_computed_property_names_;
bool allow_harmony_rest_params_;
bool allow_harmony_spreadcalls_;
kAllowHarmonyArrowFunctions,
kAllowHarmonyRestParameters,
kAllowHarmonySloppy,
+ kAllowHarmonySloppyLet,
kAllowHarmonyUnicode,
kAllowHarmonyComputedPropertyNames,
kAllowHarmonySpreadCalls,
parser->set_allow_harmony_spreadcalls(
flags.Contains(kAllowHarmonySpreadCalls));
parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
+ parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_unicode(flags.Contains(kAllowHarmonyUnicode));
parser->set_allow_harmony_computed_property_names(
flags.Contains(kAllowHarmonyComputedPropertyNames));
};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySloppy};
+ static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
+ kAllowHarmonySloppyLet};
RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
arraysize(always_flags));
}
// Test for conflicting variable bindings.
-// Flags: --no-legacy-const --harmony-sloppy
+// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
function CheckException(e) {
var string = e.toString();
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-computed-property-names
-// Flags: --no-legacy-const --harmony-sloppy
+// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
// Test that we throw early syntax errors in harmony mode
// when using an immutable binding in an assigment or with
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --no-legacy-const --harmony-sloppy
+// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
function props(x) {
var array = [];
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --no-legacy-const --harmony-sloppy
+// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
// We want to test the context chain shape. In each of the tests cases
// below, the outer with is to force a runtime lookup of the identifier 'x'
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
-// Flags: --no-legacy-const --harmony-sloppy
+// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
// Check that the following functions are optimizable.
var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
// Test let declarations in various settings.
-// Flags: --no-legacy-const --harmony-sloppy
+// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
// Global
let x;
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-sloppy --no-legacy-const
+// Flags: --harmony-sloppy --no-legacy-const --harmony-sloppy-let
// Test temporal dead zone semantics of let bound variables in
// function and block scopes.
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --harmony-sloppy --no-legacy-const
+// Flags: --allow-natives-syntax --harmony-sloppy --no-legacy-const --harmony-sloppy-let
// Test functionality of block scopes.
// Hoisting of var declarations.
// found in the LICENSE file.
// Flags: --min-preparse-length=0
-// Flags: --no-legacy-const --harmony-sloppy
+// Flags: --no-legacy-const --harmony-sloppy --harmony-sloppy-let
let xxx = 1;
let f = undefined;