aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/intertyper.js7
-rw-r--r--src/jsifier.js4
-rw-r--r--tests/runner.py5
-rw-r--r--tests/settings.py2
4 files changed, 13 insertions, 5 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 08b40157..98b117ff 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -549,7 +549,12 @@ function intertyper(data) {
item['param'+i] = parseLLVMSegment(segments[i-1]);
}
}
- item.type = item.param1.type;
+ if (item.op !== 'select') {
+ item.type = item.param1.type;
+ } else {
+ assert(item.param2.type === item.param3.type);
+ item.type = item.param2.type;
+ }
this.forwardItem(item, 'Reintegrator');
},
});
diff --git a/src/jsifier.js b/src/jsifier.js
index 8662f523..7676cf4b 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -440,7 +440,7 @@ function JSify(data) {
case VAR_EMULATED: {
break;
}
- default: print('zz unknown impl: ' + impl);
+ default: throw 'zz unknown impl: ' + impl;
}
if (value)
item.JS += ' = ' + value;
@@ -598,7 +598,7 @@ function JSify(data) {
return ident; // We have the actual value here
}
case VAR_EMULATED: return makeGetValue(ident, null, null, item.type);
- default: return "unknown [load] impl: " + impl;
+ default: throw "unknown [load] impl: " + impl;
}
});
makeFuncLineZyme('extractvalue', function(item) {
diff --git a/tests/runner.py b/tests/runner.py
index 8191d725..d507ba07 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1022,7 +1022,7 @@ else:
tests_done = 0
total_times = map(lambda x: 0., range(TEST_REPS))
- class Benchmark(RunnerCore): # Short name, to make it more fun to use manually on the commandline
+ class Benchmark(RunnerCore):
def print_stats(self, times):
mean = sum(times)/len(times)
squared_times = map(lambda x: x*x, times)
@@ -1042,6 +1042,9 @@ else:
os.remove(filename + '.cc.js')
except:
pass
+ # Something like this:
+ # java -jar CLOSURE_COMPILER --compilation_level ADVANCED_OPTIMIZATIONS --formatting PRETTY_PRINT --variable_map_output_file src.cpp.o.js.vars --js src.cpp.o.js --js_output_file src.cpp.o.cc.js
+
cc_output = Popen(['java', '-jar', CLOSURE_COMPILER,
'--compilation_level', 'ADVANCED_OPTIMIZATIONS',
'--formatting', 'PRETTY_PRINT',
diff --git a/tests/settings.py b/tests/settings.py
index 9d1002eb..e2d99e32 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -35,7 +35,7 @@ COMPILER_ENGINE=V8_ENGINE
OUTPUT_TO_SCREEN = 0 # useful for debugging specific tests, or for subjectively seeing what parts are slow
-TIMEOUT = 360
+TIMEOUT = None
CLOSURE_COMPILER = os.path.expanduser('~/Dev/closure-compiler/compiler.jar')