Reviewers: Rico,

Description:
Remove --strict developer flag from V8.

It makes V8 not have JavaScript semantics by throwing exception all
the time. Even our own natives JavaScript code cannot run using that.

[email protected]
BUG=v8:1511


Please review this at http://codereview.chromium.org/7248056/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/flag-definitions.h
  M src/ic.cc


Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index e24271939e8c35269eb8fa0080b51a11f8b0ad18..966c46bcb21abc815b191fa96ecad678fefa88b9 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -203,7 +203,6 @@ DEFINE_bool(deopt, true, "support deoptimization")
 DEFINE_bool(trace_deopt, false, "trace deoptimization")

 // compiler.cc
-DEFINE_bool(strict, false, "strict error checking")
 DEFINE_int(min_preparse_length, 1024,
            "minimum length for automatic enable preparsing")
 DEFINE_bool(always_full_compiler, false,
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 542466d1e0153e8d1aa465828255122a140d87f6..efa8f2db958f4acaafefe56af92fc8de9f87cd26 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -956,7 +956,7 @@ MaybeObject* LoadIC::Load(State state,

   // If we did not find a property, check if we need to throw an exception.
   if (!lookup.IsProperty()) {
-    if (FLAG_strict || IsContextual(object)) {
+    if (IsContextual(object)) {
       return ReferenceError("not_defined", name);
     }
     LOG(isolate(), SuspectReadEvent(*name, *object));
@@ -1230,10 +1230,8 @@ MaybeObject* KeyedLoadIC::Load(State state,
     LookupForRead(*object, *name, &lookup);

// If we did not find a property, check if we need to throw an exception.
-    if (!lookup.IsProperty()) {
-      if (FLAG_strict || IsContextual(object)) {
-        return ReferenceError("not_defined", name);
-      }
+    if (!lookup.IsProperty() && IsContextual(object)) {
+      return ReferenceError("not_defined", name);
     }

     if (FLAG_use_ic) {


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to