From 116363258d0ada44ade9b6c4a1088f7b113b736c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marja=20H=C3=B6ltt=C3=A4?= Date: Thu, 22 Jun 2017 16:17:36 +0200 Subject: [PATCH] [parser] Skipping inner funcs: add forgotten test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should've been part of https://chromium-review.googlesource.com/544300 BUG=v8:5516 Change-Id: I315b37d313b64c738174a6cd7461e5c46e362734 Reviewed-on: https://chromium-review.googlesource.com/544939 Reviewed-by: Daniel Vogelheim Commit-Queue: Marja Hölttä Cr-Commit-Position: refs/heads/master@{#46156} --- test/mjsunit/skipping-inner-functions.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/mjsunit/skipping-inner-functions.js b/test/mjsunit/skipping-inner-functions.js index 843f14c8c4..1964f4e5b8 100644 --- a/test/mjsunit/skipping-inner-functions.js +++ b/test/mjsunit/skipping-inner-functions.js @@ -122,3 +122,17 @@ function TestSkippedFunctionInsideLoopInitializer() { assertEquals(0, saved_func()); } TestSkippedFunctionInsideLoopInitializer(); + +(function TestSkippedFunctionWithParameters() { + var result = 0; + + function lazy(ctxt_alloc_param) { + var ctxt_alloc_var = 10; + function skip_me(param1, param2) { + result = ctxt_alloc_param + ctxt_alloc_var + param1 + param2; + } + return skip_me; + } + lazy(9)(8, 7); + assertEquals(34, result); +})();