Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Bump number of allowed variables per scope to 65535, to address GWT. (issue 10965063)

Received: by 10.236.91.45 with SMTP id g33mr4001975yhf.34.1348502300163;
        Mon, 24 Sep 2012 08:58:20 -0700 (PDT)
X-BeenThere: v8-dev@googlegroups.com
Received: by 10.236.187.39 with SMTP id x27ls3369597yhm.4.gmail; Mon, 24 Sep
 2012 08:58:17 -0700 (PDT)
Received: by 10.236.176.66 with SMTP id a42mr9943599yhm.22.1348502297399;
        Mon, 24 Sep 2012 08:58:17 -0700 (PDT)
Received: by 10.236.176.66 with SMTP id a42mr9943598yhm.22.1348502297386;
        Mon, 24 Sep 2012 08:58:17 -0700 (PDT)
Return-Path: <3GINgUBUJACkHMWTRNZRHTIJWJaNJb-MWLRFNQ....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com>
Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197])
        by gmr-mx.google.com with ESMTPS id c61si3626724yhm.3.2012.09.24.08.58.16
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 24 Sep 2012 08:58:16 -0700 (PDT)
Received-SPF: pass (google.com: domain of 3GINgUBUJACkHMWTRNZRHTIJWJaNJb-MWLRFNQ....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.161.197 as permitted sender) client-ip=209.85.161.197;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 3GINgUBUJACkHMWTRNZRHTIJWJaNJb-MWLRFNQ....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com designates 209.85.161.197 as permitted sender) smtp.mail=3GINgUBUJACkHMWTRNZRHTIJWJaNJb-MWLRFNQ....@2uix4h7xygsz66weerlq.apphosting.bounces.google.com; dkim=pass header...@chromium.org
Received: by ggki25 with SMTP id i25so6816880ggk.8
        for <v8-dev@googlegroups.com>; Mon, 24 Sep 2012 08:58:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=chromium.org; s=google;
        h=mime-version:reply-to:x-google-appengine-app-id:message-id:date
         :subject:from:to:cc:content-type;
        bh=NB4u2GyruC8SWZclVn6tuk64fFau/RwZLhcXaFzlmj8=;
        b=EzYlTz0BvHZDfXjCD5UHbSbpCirjTvTkUuLhx6ZSZIRaHOSYX+ficcagDcGil7+ycO
         rQ4YgsjNvh38SpbE6NcwxogM3LyMYPD/Fc3gbkqqXxwdTEWCzV6bg9iDsWqinpZ428u7
         EMtzXPKzQj/buIOOgvwQADwWH34BkZQIwUsTg=
MIME-Version: 1.0
Received: by 10.52.64.141 with SMTP id o13mr2283825vds.1.1348502296237; Mon,
 24 Sep 2012 08:58:16 -0700 (PDT)
Reply-To: rossb...@chromium.org, jkumme...@chromium.org, 
	v8-dev@googlegroups.com
Message-ID: <20cf3079beb2589a5c04ca74a...@google.com>
Date: Mon, 24 Sep 2012 15:58:16 +0000
Subject: Bump number of allowed variables per scope to 65535, to address GWT.
 (issue 10965063)
From: rossb...@chromium.org
To: jkumme...@chromium.org
Cc: v8-dev@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes

Reviewers: Jakob,

Description:
Bump number of allowed variables per scope to 65535, to address GWT.


R=jkumme...@chromium.org
BUG=151625


Please review this at https://codereview.chromium.org/10965063/

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

Affected files:
   M src/parser.h
   M test/mjsunit/limit-locals.js


Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index  
1ab7a141be72b526f2a7433e22009050357210a5..93dd03a63b201d986e8d9c09cdc6342653619daf  
100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -454,7 +454,7 @@ class Parser {
    // construct a hashable id, so if more than 2^17 are allowed, this
    // should be checked.
    static const int kMaxNumFunctionParameters = 32766;
-  static const int kMaxNumFunctionLocals = 32767;
+  static const int kMaxNumFunctionLocals = 65535;

    enum Mode {
      PARSE_LAZILY,
Index: test/mjsunit/limit-locals.js
diff --git a/test/mjsunit/limit-locals.js b/test/mjsunit/limit-locals.js
index  
ad9ec43686e9366f7d7b4f4ddec3b1af7f6566c7..22f895c71492365bbdf69ef4d037bd05fc297bfc  
100644
--- a/test/mjsunit/limit-locals.js
+++ b/test/mjsunit/limit-locals.js
@@ -25,7 +25,7 @@
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Test that there is a limit of 32767 locals.
+// Test that there is a limit of 65535 locals.

  function function_with_n_locals(n) {
    test_prefix = "prefix ";
@@ -41,6 +41,7 @@ function function_with_n_locals(n) {
  assertEquals("prefix 0 suffix", function_with_n_locals(0));
  assertEquals("prefix 16000 suffix", function_with_n_locals(16000));
  assertEquals("prefix 32767 suffix", function_with_n_locals(32767));
+assertEquals("prefix 65535 suffix", function_with_n_locals(65535));

-assertThrows("function_with_n_locals(32768)");
+assertThrows("function_with_n_locals(65536)");
  assertThrows("function_with_n_locals(100000)");