Add --es-staging flag
...and remove some obsolete ones. R=mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/165723008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19669 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3df5573195
commit
758a688bb6
@ -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")
|
||||
@ -192,6 +189,7 @@ DEFINE_bool(harmony_strings, false, "enable harmony string")
|
||||
DEFINE_bool(harmony_arrays, false, "enable harmony arrays")
|
||||
DEFINE_bool(harmony_maths, false, "enable harmony math functions")
|
||||
DEFINE_bool(harmony, false, "enable all harmony features (except typeof)")
|
||||
DEFINE_implication(harmony, es_staging)
|
||||
DEFINE_implication(harmony, harmony_scoping)
|
||||
DEFINE_implication(harmony, harmony_modules)
|
||||
DEFINE_implication(harmony, harmony_symbols)
|
||||
|
@ -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 };
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user