From e82689262a0ab476d5a5bf11476fbb4532b4b638 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 20 Feb 2011 19:03:11 -0800 Subject: [PATCH] fixes for benchmarks --- src/preamble.js | 9 ++++----- src/utility.js | 6 +++--- tests/runner.py | 4 +++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/preamble.js b/src/preamble.js index 0124e6c39..505217ab3 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -286,12 +286,11 @@ function __initializeRuntime__() { Module['FHEAP'] = FHEAP; STACK_ROOT = STACKTOP = alignMemoryPage(10); + var totalStack = 1024*1024; // XXX: Changing this value can lead to bad perf on v8! try { - var x = TOTAL_STACK; - } catch(e) { - TOTAL_STACK = 1024*1024; // Reserved room for stack XXX: Changing this value can lead to bad perf on v8! - } - STACK_MAX = STACK_ROOT + TOTAL_STACK; + totalStack = TOTAL_STACK; + } catch(e){} + STACK_MAX = STACK_ROOT + totalStack; STATICTOP = alignMemoryPage(STACK_MAX); } diff --git a/src/utility.js b/src/utility.js index 626f99782..fc5f7f886 100644 --- a/src/utility.js +++ b/src/utility.js @@ -216,10 +216,10 @@ function flatten(x) { // Sets function set() { - if (typeof arguments[0] === 'object') arguments = arguments[0]; + var args = typeof arguments[0] === 'object' ? arguments[0] : arguments; var ret = {}; - for (var i = 0; i < arguments.length; i++) { - ret[arguments[i]] = 0; + for (var i = 0; i < args.length; i++) { + ret[args[i]] = 0; } return ret; } diff --git a/tests/runner.py b/tests/runner.py index 6f23ae347..28154e607 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -1877,10 +1877,12 @@ else: JS_ENGINE = SPIDERMONKEY_ENGINE #JS_ENGINE = V8_ENGINE + global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = [] + QUANTUM_SIZE = 4 RELOOP = OPTIMIZE = 1 USE_TYPED_ARRAYS = 0 - GUARD_MEMORY = SAFE_HEAP = CHECK_OVERFLOWS = CORRECT_OVERFLOWS = 0 + GUARD_MEMORY = SAFE_HEAP = CHECK_OVERFLOWS = CORRECT_OVERFLOWS = CHECK_SIGNS = 0 CORRECT_SIGNS = 0 CORRECT_OVERFLOWS_LINES = CORRECT_SIGNS_LINES = [] LLVM_OPTS = 1