aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/analyzer.js2
-rw-r--r--src/preamble.js4
-rw-r--r--tests/runner.py6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index 3cc07f22..bae05ec8 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -1129,7 +1129,7 @@ function analyzer(data) {
// Add additional necessary items
if (INCLUDE_FULL_LIBRARY) {
assert(!BUILD_AS_SHARED_LIB, 'Cannot have both INCLUDE_FULL_LIBRARY and BUILD_AS_SHARED_LIB set.')
- var libFuncsToInclude = Object.keys(Library);
+ var libFuncsToInclude = keys(Library);
} else {
var libFuncsToInclude = ['memset', 'malloc', 'free'];
}
diff --git a/src/preamble.js b/src/preamble.js
index afada476..408ef6aa 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -589,8 +589,8 @@ function intArrayToString(array) {
{{{ reSign }}}
// Use console read if available, otherwise we are in a browser, use an XHR
-if (this.read === undefined) {
- var read = function(url) {
+if (!this['read']) {
+ this['read'] = function(url) {
// TODO: use mozResponseArrayBuffer/responseStream/etc. if available
var xhr = new XMLHttpRequest();
xhr.open("GET", url, false);
diff --git a/tests/runner.py b/tests/runner.py
index c6d77b16..bba28e5a 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1862,7 +1862,7 @@ if 'benchmark' not in sys.argv:
int main() {
void* lib_handle;
CMP_TYPE (*getter_ptr)();
- CMP_TYPE lib_cmp;
+ CMP_TYPE lib_cmp_ptr;
int arr[5] = {4, 2, 5, 1, 3};
lib_handle = dlopen("liblib.so", RTLD_NOW);
@@ -1875,7 +1875,7 @@ if 'benchmark' not in sys.argv:
printf("Could not find func.\\n");
return 1;
}
- lib_cmp = getter_ptr();
+ lib_cmp_ptr = getter_ptr();
qsort((void*)arr, 5, sizeof(int), main_cmp);
printf("Sort with main comparison: ");
@@ -1884,7 +1884,7 @@ if 'benchmark' not in sys.argv:
}
printf("\\n");
- qsort((void*)arr, 5, sizeof(int), lib_cmp);
+ qsort((void*)arr, 5, sizeof(int), lib_cmp_ptr);
printf("Sort with lib comparison: ");
for (int i = 0; i < 5; i++) {
printf("%d ", arr[i]);