Reviewers: fschneider,

Description:
Remove HEnvironment::CheckDepth.

[email protected]
BUG=v8:1727


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

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

Affected files:
  M src/hydrogen.h
  M src/hydrogen.cc


Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index c62b9833c5c484c5c527f8f688bdf452fb8280fa..5c23adae4252873a8406e266c4b6a97b9f7c5b45 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -6472,7 +6472,6 @@ void HEnvironment::Initialize(const HEnvironment* other) {
   pop_count_ = other->pop_count_;
   push_count_ = other->push_count_;
   ast_id_ = other->ast_id_;
-  CheckDepth();
 }


Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 5f0163c266ef195c37825ec9fbee4f0bf06093d7..8b507c26b3fdff31a006418196bdd255c0997036 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -448,23 +448,6 @@ class HEnvironment: public ZoneObject {
  private:
   explicit HEnvironment(const HEnvironment* other);

-  void CheckDepth() {
-    // Verify that we are not trying to create an
-    // impossibly deeply nested environment.
-    if (!FLAG_limit_inlining) return;
-
-    static const int kMaxDepth = 4;
-
-    int cnt = 0;
-    for (HEnvironment* env = this;
- env != NULL && cnt <= kMaxDepth; // Check cnt to avoid infinite loop.
-         env = env->outer()) {
-      cnt++;
-    }
-
-    CHECK(cnt <= kMaxDepth);
-  }
-
// True if index is included in the expression stack part of the environment.
   bool HasExpressionAt(int index) const;



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

Reply via email to