Remove HEnvironment::CheckDepth.
authorvegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Sep 2011 11:58:40 +0000 (11:58 +0000)
committervegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 Sep 2011 11:58:40 +0000 (11:58 +0000)
R=fschneider@chromium.org
BUG=v8:1727

Review URL: http://codereview.chromium.org/8066005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen.cc
src/hydrogen.h

index 8c7f2e3de5c4f4e72572643bb47b6636419581ce..571c448ab50fb96ea1f767cfc73657954fc4a308 100644 (file)
@@ -6474,7 +6474,6 @@ void HEnvironment::Initialize(const HEnvironment* other) {
   pop_count_ = other->pop_count_;
   push_count_ = other->push_count_;
   ast_id_ = other->ast_id_;
-  CheckDepth();
 }
 
 
index 5f0163c266ef195c37825ec9fbee4f0bf06093d7..8b507c26b3fdff31a006418196bdd255c0997036 100644 (file)
@@ -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;