aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-03 15:23:25 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-03 15:23:25 -0800
commit8cc0273ae706c88e403ddacefbe795bb9244ab1d (patch)
tree8adfb718079bbef19dca888377381585d01a246d
parent3bd0991eb432b0c7ada786a008abf9bf545405a0 (diff)
remove no-longer-needed INIT_STACK
-rw-r--r--src/compiler.js2
-rw-r--r--src/runtime.js4
-rw-r--r--src/settings.js1
-rwxr-xr-xtests/runner.py2
4 files changed, 3 insertions, 6 deletions
diff --git a/src/compiler.js b/src/compiler.js
index b40891a5..1cd09c30 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -179,7 +179,7 @@ assert(!(!NAMED_GLOBALS && BUILD_AS_SHARED_LIB)); // shared libraries must have
// Output some info and warnings based on settings
if (phase == 'pre') {
- if (!MICRO_OPTS || !RELOOP || ASSERTIONS || CHECK_SIGNS || CHECK_OVERFLOWS || INIT_STACK || INIT_HEAP ||
+ if (!MICRO_OPTS || !RELOOP || ASSERTIONS || CHECK_SIGNS || CHECK_OVERFLOWS || INIT_HEAP ||
!SKIP_STACK_IN_SMALL || SAFE_HEAP || !DISABLE_EXCEPTION_CATCHING) {
print('// Note: Some Emscripten settings will significantly limit the speed of the generated code.');
} else {
diff --git a/src/runtime.js b/src/runtime.js
index e902d27b..7f97da35 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -25,7 +25,7 @@ var RuntimeGenerator = {
sep = sep || ';';
if (USE_TYPED_ARRAYS === 2) 'STACKTOP = (STACKTOP + STACKTOP|0 % ' + ({{{ QUANTUM_SIZE }}} - (isNumber(size) ? Math.min(size, {{{ QUANTUM_SIZE }}}) : {{{ QUANTUM_SIZE }}})) + ')' + sep;
// The stack is always QUANTUM SIZE aligned, so we may not need to force alignment here
- var ret = RuntimeGenerator.alloc(size, 'STACK', INIT_STACK, sep, USE_TYPED_ARRAYS != 2 || (isNumber(size) && parseInt(size) % {{{ QUANTUM_SIZE }}} == 0));
+ var ret = RuntimeGenerator.alloc(size, 'STACK', false, sep, USE_TYPED_ARRAYS != 2 || (isNumber(size) && parseInt(size) % {{{ QUANTUM_SIZE }}} == 0));
if (ASSERTIONS) {
ret += sep + 'assert(STACKTOP|0 < STACK_MAX|0)';
}
@@ -45,7 +45,7 @@ var RuntimeGenerator = {
if (ASSERTIONS) {
ret += '; assert(STACKTOP < STACK_MAX)';
}
- if (INIT_STACK) {
+ if (false) {
ret += '; _memset(' + asmCoercion('__stackBase__', 'i32') + ', 0, ' + initial + ')';
}
return ret;
diff --git a/src/settings.js b/src/settings.js
index 3fd31326..e260ed2a 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -37,7 +37,6 @@ var VERBOSE = 0; // When set to 1, will generate more verbose output during comp
var INVOKE_RUN = 1; // Whether we will call run(). Disable if you embed the generated
// code in your own, and will call run() yourself at the right time
-var INIT_STACK = 0; // Whether to initialize memory on the stack to 0.
var INIT_HEAP = 0; // Whether to initialize memory anywhere other than the stack to 0.
var TOTAL_STACK = 5*1024*1024; // The total stack size. There is no way to enlarge the stack, so this
// value must be large enough for the program's requirements. If
diff --git a/tests/runner.py b/tests/runner.py
index 8b6e54af..1858ab45 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6912,7 +6912,6 @@ void*:16
extra_emscripten_args=['-H', 'libc/fcntl.h,libc/sys/unistd.h,poll.h,libc/math.h,libc/langinfo.h,libc/time.h'])
def get_freetype(self):
- Settings.INIT_STACK = 1 # TODO: Investigate why this is necessary
return self.get_library('freetype',
os.path.join('objs', '.libs', 'libfreetype.a'))
@@ -8341,7 +8340,6 @@ class %s(T):
Settings.CORRECT_ROUNDINGS = 0
Settings.CORRECT_OVERFLOWS_LINES = CORRECT_SIGNS_LINES = CORRECT_ROUNDINGS_LINES = SAFE_HEAP_LINES = []
Settings.CHECK_SIGNS = 0 #1-(embetter or llvm_opts)
- Settings.INIT_STACK = 0
Settings.RUNTIME_TYPE_INFO = 0
Settings.DISABLE_EXCEPTION_CATCHING = 0
Settings.INCLUDE_FULL_LIBRARY = 0