Reviewers: Michael Starzinger,
Description:
Add --es-staging flag
...and remove some obsolete ones.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/165723008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -17 lines):
M src/flag-definitions.h
M src/objects.cc
M src/runtime.cc
M test/cctest/test-api.cc
M test/cctest/test-decls.cc
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
476e5348af3dd96ea158c27559c29171d660903d..6faae34ab3952dd01b7cd31ab25eb74d2d5b2eb3
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -167,10 +167,7 @@ struct MaybeBoolFlag {
// Flags for language modes and experimental language features.
DEFINE_bool(use_strict, false, "enforce strict mode")
-DEFINE_bool(es5_readonly, true,
- "activate correct semantics for inheriting readonliness")
-DEFINE_bool(es52_globals, true,
- "activate new semantics for global var declarations")
+DEFINE_bool(es_staging, false, "enable upcoming ES6+ features")
DEFINE_bool(harmony_typeof, false, "enable harmony semantics for typeof")
DEFINE_bool(harmony_scoping, false, "enable harmony block scoping")
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
7360172e5b5d6a1036cd5af55e016b2dbb8a6567..5a40df550d9fc43534181579dac1c3a13bfc42e0
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3074,7 +3074,6 @@ Handle<Object>
JSObject::SetPropertyViaPrototypes(Handle<JSObject> object,
break;
}
case CALLBACKS: {
- if (!FLAG_es5_readonly && result.IsReadOnly()) break;
*done = true;
Handle<Object> callback_object(result.GetCallbackObject(),
isolate);
return SetPropertyWithCallback(object, callback_object, name,
value,
@@ -3093,7 +3092,6 @@ Handle<Object>
JSObject::SetPropertyViaPrototypes(Handle<JSObject> object,
}
// If we get here with *done true, we have encountered a read-only
property.
- if (!FLAG_es5_readonly) *done = false;
if (*done) {
if (strict_mode == kNonStrictMode) return value;
Handle<Object> args[] = { name, object };
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
55013f1b4e45241f652841ad863113a50ced4615..60416f7147a338462df317445b3b5896b153ed65
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2063,11 +2063,7 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_DeclareGlobals) {
// value of the variable if the property is already there.
// Do the lookup locally only, see ES5 erratum.
LookupResult lookup(isolate);
- if (FLAG_es52_globals) {
- global->LocalLookup(*name, &lookup, true);
- } else {
- global->Lookup(*name, &lookup);
- }
+ global->LocalLookup(*name, &lookup, true);
if (lookup.IsFound()) {
// We found an existing property. Unless it was an interceptor
// that claims the property is absent, skip this declaration.
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
c5c932b7516cc70738ad918a9311dabe1e985427..26895642ed3482f7d306007a3cc0143185c6a5e7
100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -12929,7 +12929,6 @@ static void ChildGetter(Local<String> name,
THREADED_TEST(Overriding) {
- i::FLAG_es5_readonly = true;
LocalContext context;
v8::Isolate* isolate = context->GetIsolate();
v8::HandleScope scope(isolate);
@@ -15200,7 +15199,6 @@ TEST(RegExpInterruption) {
// Test that we cannot set a property on the global object if there
// is a read-only property in the prototype chain.
TEST(ReadOnlyPropertyInGlobalProto) {
- i::FLAG_es5_readonly = true;
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope scope(isolate);
v8::Handle<v8::ObjectTemplate> templ = v8::ObjectTemplate::New(isolate);
@@ -15555,7 +15553,6 @@ THREADED_TEST(GetCallingContext) {
// Check that a variable declaration with no explicit initialization
// value does shadow an existing property in the prototype chain.
THREADED_TEST(InitGlobalVarInProtoChain) {
- i::FLAG_es52_globals = true;
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
// Introduce a variable in the prototype chain.
Index: test/cctest/test-decls.cc
diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
index
1f22c9ff3a0eb1b5efe9aaa4e8bcf9173bccb29c..d6738a31aec11e01f79ca2e02291dc06c1cb7fb5
100644
--- a/test/cctest/test-decls.cc
+++ b/test/cctest/test-decls.cc
@@ -557,7 +557,6 @@ class ExistsInPrototypeContext: public
DeclarationContext {
TEST(ExistsInPrototype) {
- i::FLAG_es52_globals = true;
HandleScope scope(CcTest::isolate());
// Sanity check to make sure that the holder of the interceptor
@@ -620,7 +619,6 @@ class AbsentInPrototypeContext: public
DeclarationContext {
TEST(AbsentInPrototype) {
- i::FLAG_es52_globals = true;
v8::V8::Initialize();
HandleScope scope(CcTest::isolate());
@@ -668,7 +666,6 @@ class ExistsInHiddenPrototypeContext: public
DeclarationContext {
TEST(ExistsInHiddenPrototype) {
- i::FLAG_es52_globals = true;
HandleScope scope(CcTest::isolate());
{ ExistsInHiddenPrototypeContext context;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.