Reviewers: arv, Michael Starzinger,

Description:
Fixes for try-catch microbenchmark

BUG=v8:4131
LOG=n

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

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+15, -13 lines):
  M test/js-perf-test/Exceptions/try-catch.js


Index: test/js-perf-test/Exceptions/try-catch.js
diff --git a/test/js-perf-test/Exceptions/try-catch.js b/test/js-perf-test/Exceptions/try-catch.js index 8c9734eb34307e3b326cd56fb98f111478cb1814..0a4a0c0a642a8c725de6fe49e6bb079d29235566 100644
--- a/test/js-perf-test/Exceptions/try-catch.js
+++ b/test/js-perf-test/Exceptions/try-catch.js
@@ -13,7 +13,8 @@ new BenchmarkSuite('Try-Catch', [1000], [
                 OnSuccessFinallyOnly, OnSuccessFinallyOnlySetup,
                 OnSuccessFinallyOnlyTearDown),
   new Benchmark('WithFinallyOnException', false, false, 0,
- WithFinallyOnException, WithFinallyOnExceptionSetup, WithFinallyOnExceptionTearDown)
+                WithFinallyOnException, WithFinallyOnExceptionSetup,
+                WithFinallyOnExceptionTearDown)
 ]);

 var a;
@@ -23,9 +24,9 @@ var c;
// ----------------------------------------------------------------------------

 function OnSuccessSetup() {
-  var a = 4;
-  var b = 6;
-  var c = 0;
+  a = 4;
+  b = 6;
+  c = 0;
 }

 function OnSuccess() {
@@ -33,6 +34,7 @@ function OnSuccess() {
     c = a + b;
   }
   catch (e) {
+    c++;
   }
 }

@@ -43,9 +45,9 @@ function OnSuccessTearDown() {
// ----------------------------------------------------------------------------

 function OnExceptionSetup() {
-  var a = 4;
-  var b = 6;
-  var c = 0;
+  a = 4;
+  b = 6;
+  c = 0;
 }

 function OnException() {
@@ -64,9 +66,9 @@ function OnExceptionTearDown() {
// ----------------------------------------------------------------------------

 function OnSuccessFinallyOnlySetup() {
-  var a = 4;
-  var b = 6;
-  var c = 0;
+  a = 4;
+  b = 6;
+  c = 0;
 }

 function OnSuccessFinallyOnly() {
@@ -85,9 +87,9 @@ function OnSuccessFinallyOnlyTearDown() {
// ----------------------------------------------------------------------------

 function WithFinallyOnExceptionSetup() {
-  var a = 4;
-  var b = 6;
-  var c = 0;
+  a = 4;
+  b = 6;
+  c = 0;
 }

 function WithFinallyOnException() {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to