aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-04 21:38:20 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-04 21:38:20 -0700
commit28083e9ef143c5102a72bd893962fa8b0f455909 (patch)
tree5442fa6614a1d3050631b421b565c13ba3b5701a
parent9bf72e56b5494cb5de102332d6e5c5e20082ff85 (diff)
restore ZTVN10 hacks, but only for non-ta2 where we do not link in libcxxabi
-rw-r--r--src/library.js6
-rw-r--r--src/parseTools.js9
2 files changed, 13 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js
index 25d880a0..3008a055 100644
--- a/src/library.js
+++ b/src/library.js
@@ -4273,6 +4273,12 @@ LibraryManager.library = {
__cxa_guard_release: function() {},
__cxa_guard_abort: function() {},
+#if USE_TYPED_ARRAYS != 2
+ _ZTVN10__cxxabiv119__pointer_type_infoE: [0], // is a pointer
+ _ZTVN10__cxxabiv117__class_type_infoE: [1], // no inherited classes
+ _ZTVN10__cxxabiv120__si_class_type_infoE: [2], // yes inherited classes
+#endif
+
// Exceptions
__cxa_allocate_exception: function(size) {
return _malloc(size);
diff --git a/src/parseTools.js b/src/parseTools.js
index 66354dca..90c5acab 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -35,8 +35,13 @@ function preprocess(text) {
var op = parts[2];
var value = parts[3];
if (op) {
- assert(op === '==')
- showStack.push(ident in this && this[ident] == value);
+ if (op === '==') {
+ showStack.push(ident in this && this[ident] == value);
+ } else if (op === '!=') {
+ showStack.push(!(ident in this && this[ident] == value));
+ } else {
+ error('unsupported preprecessor op ' + op);
+ }
} else {
showStack.push(ident in this && this[ident] > 0);
}