diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-07 09:07:32 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-07 09:07:32 -0800 |
commit | cb1a785b132482fc92ac65706119f6bf81fe6432 (patch) | |
tree | bb881656b8eb6bf38cd343f0e69472aeceff5b83 /src | |
parent | f137ae9fc2745be3d15badb017a1c0030937dff2 (diff) |
optimize guard_acquire and guard_release and note that llvm violates SAFE_HEAP when using it
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/library.js b/src/library.js index 03dc5cbd..0504882c 100644 --- a/src/library.js +++ b/src/library.js @@ -4203,11 +4203,14 @@ LibraryManager.library = { }, __cxa_guard_acquire: function(variable) { - return !{{{ makeGetValue(0, 'variable', 'i8') }}} - }, - __cxa_guard_release: function(variable) { - {{{ makeSetValue(0, 'variable', '1', 'i8') }}} + if (!{{{ makeGetValue(0, 'variable', 'i8', null, null, 1) }}}) { // ignore SAFE_HEAP stuff because llvm mixes i64 and i8 here + {{{ makeSetValue(0, 'variable', '1', 'i8') }}}; + return 1; + } + return 0; }, + __cxa_guard_release: function() {}, + __cxa_guard_abort: function() {}, _ZTVN10__cxxabiv117__class_type_infoE: [1], // no inherited classes _ZTVN10__cxxabiv120__si_class_type_infoE: [2], // yes inherited classes |