diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jsifier.js | 2 | ||||
-rw-r--r-- | src/library.js | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 88d9dbc6..9ec957dc 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -946,7 +946,7 @@ function JSify(data, functionsOnly, givenFunctions) { makeFuncLineActor('landingpad', function(item) { // Just a stub return '{ f0: ' + makeGetValue('_llvm_eh_exception.buf', '0', 'void*') + - ', f1:' + makeGetValue('_llvm_eh_exception.buf', '4', 'void*') + ' }'; + ', f1:' + makeGetValue('_llvm_eh_exception.buf', QUANTUM_SIZE, 'void*') + ' }'; }); makeFuncLineActor('load', function(item) { var value = finalizeLLVMParameter(item.pointer); diff --git a/src/library.js b/src/library.js index 5a77315c..426f7035 100644 --- a/src/library.js +++ b/src/library.js @@ -4312,8 +4312,8 @@ LibraryManager.library = { print('Compiled code throwing an exception, ' + [ptr,type,destructor] + ', at ' + new Error().stack); #endif {{{ makeSetValue('_llvm_eh_exception.buf', '0', 'ptr', 'void*') }}} - {{{ makeSetValue('_llvm_eh_exception.buf', '4', 'type', 'void*') }}} - {{{ makeSetValue('_llvm_eh_exception.buf', '8', 'destructor', 'void*') }}} + {{{ makeSetValue('_llvm_eh_exception.buf', QUANTUM_SIZE, 'type', 'void*') }}} + {{{ makeSetValue('_llvm_eh_exception.buf', 2 * QUANTUM_SIZE, 'destructor', 'void*') }}} throw ptr; }, __cxa_rethrow__deps: ['llvm_eh_exception', '__cxa_end_catch'], @@ -4327,7 +4327,7 @@ LibraryManager.library = { }, llvm_eh_selector__jsargs: true, llvm_eh_selector: function(unused_exception_value, personality/*, varargs*/) { - var type = {{{ makeGetValue('_llvm_eh_exception.buf', '4', 'void*') }}} + var type = {{{ makeGetValue('_llvm_eh_exception.buf', QUANTUM_SIZE, 'void*') }}} for (var i = 2; i < arguments.length; i++) { if (arguments[i] == type) return type; } @@ -4351,13 +4351,13 @@ LibraryManager.library = { // Clear state flag. __THREW__ = false; // Clear type. - {{{ makeSetValue('_llvm_eh_exception.buf', '4', '0', 'void*') }}} + {{{ makeSetValue('_llvm_eh_exception.buf', QUANTUM_SIZE, '0', 'void*') }}} // Call destructor if one is registered then clear it. var ptr = {{{ makeGetValue('_llvm_eh_exception.buf', '0', 'void*') }}}; - var destructor = {{{ makeGetValue('_llvm_eh_exception.buf', '8', 'void*') }}}; + var destructor = {{{ makeGetValue('_llvm_eh_exception.buf', 2 * QUANTUM_SIZE, 'void*') }}}; if (destructor) { FUNCTION_TABLE[destructor](ptr); - {{{ makeSetValue('_llvm_eh_exception.buf', '8', '0', 'i32') }}} + {{{ makeSetValue('_llvm_eh_exception.buf', 2 * QUANTUM_SIZE, '0', 'i32') }}} } // Free ptr if it isn't null. if (ptr) { |