Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: test/js-perf-test/Exceptions/try-catch.js

Issue 1163043003: Fixes for try-catch microbenchmark (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698