diff --git a/benchmark/misc/v8-bench.js b/benchmark/misc/v8-bench.js index 8bf49f3f611804..76e4683de8a8c2 100644 --- a/benchmark/misc/v8-bench.js +++ b/benchmark/misc/v8-bench.js @@ -12,7 +12,8 @@ global.print = function(s) { global.load = function (x) { var source = fs.readFileSync(path.join(dir, x), 'utf8'); - vm.runInThisContext(source, x); -} + vm.runInThisContext(source); +}; load('run.js'); +load('runRegExp.js'); diff --git a/deps/v8/benchmarks/run.js b/deps/v8/benchmarks/run.js index 58f62658009eac..4596f2ef41fa25 100644 --- a/deps/v8/benchmarks/run.js +++ b/deps/v8/benchmarks/run.js @@ -32,7 +32,6 @@ load('deltablue.js'); load('crypto.js'); load('raytrace.js'); load('earley-boyer.js'); -load('regexp.js'); load('splay.js'); load('navier-stokes.js'); diff --git a/deps/v8/benchmarks/runRegExp.js b/deps/v8/benchmarks/runRegExp.js new file mode 100644 index 00000000000000..5958333b44e791 --- /dev/null +++ b/deps/v8/benchmarks/runRegExp.js @@ -0,0 +1,27 @@ +load('base.js'); +load('regexp.js'); + +var success = true; + +function PrintResult(name, result) { + print(name + ': ' + result); +} + + +function PrintError(name, error) { + PrintResult(name, error); + success = false; +} + + +function PrintScore(score) { + if (success) { + print('----'); + print('Score (version ' + BenchmarkSuite.version + '): ' + score); + } +} + + +BenchmarkSuite.RunSuites({ NotifyResult: PrintResult, + NotifyError: PrintError, + NotifyScore: PrintScore });