diff options
98 files changed, 292 insertions, 146 deletions
@@ -129,4 +129,5 @@ a license to everyone to use it as detailed in LICENSE.) * Haneef Mubarak <haneef503@gmail.com> * Nicolas Peri <nicox@shivaengine.com> (copyright owned by ShiVa Technologies, SAS) * Bernhard Fey <e-male@web.de> +* Dave Nicponski <dave.nicponski@gmail.com> diff --git a/CONTRIBUTING.markdown b/CONTRIBUTING.md index ceea8735..c068eb7f 100644 --- a/CONTRIBUTING.markdown +++ b/CONTRIBUTING.md @@ -1,5 +1,6 @@ +Contributing +============ See our wiki for information about contributing to Emscripten: [Contribution section on wiki](https://github.com/kripken/emscripten/wiki#contributing) - diff --git a/README.markdown b/README.markdown deleted file mode 100644 index 81a95141..00000000 --- a/README.markdown +++ /dev/null @@ -1,14 +0,0 @@ - - - -Emscripten -========== - -Emscripten is an LLVM-to-JavaScript compiler. It takes LLVM bitcode - which can be generated from C/C++, using llvm-gcc or clang, or any other language that can be converted into LLVM - and compiles that into JavaScript, which can be run on the web (or anywhere else JavaScript can run). - -Links to **demos**, **tutorial**, **FAQ**, etc: <https://github.com/kripken/emscripten/wiki> - -Main project page: <http://emscripten.org> - -Emscripten is MIT licensed, see LICENSE.txt. - diff --git a/README.md b/README.md new file mode 100644 index 00000000..6b4778bf --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ + + +Emscripten is an LLVM-to-JavaScript compiler. It takes LLVM bitcode - which can be generated +from C/C++, using `llvm-gcc` (DragonEgg) or `clang`, or any other language that can be +converted into LLVM - and compiles that into JavaScript, which can be run on the web (or +anywhere else JavaScript can run). + +Links to **demos**, **tutorial**, **FAQ**, etc: <https://github.com/kripken/emscripten/wiki> + +Main project page: <http://emscripten.org> + +License +------- + +Emscripten is available under 2 licenses, the MIT license and the +University of Illinois/NCSA Open Source License. + +Both are permissive open source licenses, with little if any +practical difference between them. + +The reason for offering both is that (1) the MIT license is +well-known, while (2) the University of Illinois/NCSA Open Source +License allows Emscripten's code to be integrated upstream into +LLVM, which uses that license, should the opportunity arise. + +See `LICENSE` for the full content of the licenses. diff --git a/emscripten-version.txt b/emscripten-version.txt new file mode 100644 index 00000000..bf2b5ccf --- /dev/null +++ b/emscripten-version.txt @@ -0,0 +1,2 @@ +1.13.0 + diff --git a/emscripten.py b/emscripten.py index 37e1c83f..5c9275c2 100755 --- a/emscripten.py +++ b/emscripten.py @@ -746,6 +746,9 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, backend_args += ['-emscripten-warn-unaligned'] if settings['RESERVED_FUNCTION_POINTERS'] > 0: backend_args += ['-emscripten-reserved-function-pointers=%d' % settings['RESERVED_FUNCTION_POINTERS']] + if settings['ASSERTIONS'] > 0: + backend_args += ['-emscripten-assertions=%d' % settings['ASSERTIONS']] + backend_args += ['-O' + str(settings['OPT_LEVEL'])] if DEBUG: logging.debug('emscript: llvm backend: ' + ' '.join(backend_args)) t = time.time() diff --git a/docs/emscripten_switch_logo.eps b/media/switch_logo.eps Binary files differindex 741970c1..741970c1 100644 --- a/docs/emscripten_switch_logo.eps +++ b/media/switch_logo.eps diff --git a/docs/emscripten_switch_logo.jpg b/media/switch_logo.jpeg Binary files differindex 7c05cd94..7c05cd94 100644 --- a/docs/emscripten_switch_logo.jpg +++ b/media/switch_logo.jpeg diff --git a/docs/emscripten_switch_logo.svg b/media/switch_logo.svg index 58277388..58277388 100644 --- a/docs/emscripten_switch_logo.svg +++ b/media/switch_logo.svg diff --git a/package.json b/package.json index a1447c9f..4fbba2fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "emscripten", - "version": "1.0.0", + "version": "1.13.0", "dependencies": { "ws": "~0.4.28" } diff --git a/patches/README b/patches/README deleted file mode 100644 index f6817fed..00000000 --- a/patches/README +++ /dev/null @@ -1,4 +0,0 @@ -This directory contains a useful mercurial patch queue. - -Note to patch queue maintainer: You need to manually copy from .hg/patches into this directory, after |qrefresh|ing the patch. - diff --git a/patches/series b/patches/series deleted file mode 100644 index 04f16d03..00000000 --- a/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -sauer - diff --git a/src/headlessCanvas.js b/src/headlessCanvas.js index 4bd17a7b..1eefe48e 100644 --- a/src/headlessCanvas.js +++ b/src/headlessCanvas.js @@ -598,7 +598,9 @@ function headlessCanvas() { }); }, exitPointerLock: function(){}, - style: {}, + style: { + setProperty: function(){} + }, eventListeners: {}, addEventListener: function(){}, removeEventListener: function(){}, diff --git a/src/library_browser.js b/src/library_browser.js index 47b3b2f9..03da394e 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -1,7 +1,6 @@ //"use strict"; // Utilities for browser environments - mergeInto(LibraryManager.library, { $Browser__deps: ['$PATH'], $Browser__postset: 'Module["requestFullScreen"] = function Module_requestFullScreen(lockPointer, resizeCanvas) { Browser.requestFullScreen(lockPointer, resizeCanvas) };\n' + // exports @@ -1011,8 +1010,11 @@ mergeInto(LibraryManager.library, { var callbackId = msg.data['callbackId']; var callbackInfo = info.callbacks[callbackId]; if (!callbackInfo) return; // no callback or callback removed meanwhile - info.awaited--; - info.callbacks[callbackId] = null; // TODO: reuse callbackIds, compress this + // Don't trash our callback state if we expect additional calls. + if (msg.data['finalResponse']) { + info.awaited--; + info.callbacks[callbackId] = null; // TODO: reuse callbackIds, compress this + } var data = msg.data['data']; if (data) { if (!data.byteLength) data = new Uint8Array(data); @@ -1059,12 +1061,23 @@ mergeInto(LibraryManager.library, { }); }, + emscripten_worker_respond_provisionally: function(data, size) { + if (!inWorkerCall) throw 'not in worker call!'; + if (workerResponded) throw 'already responded with final response!'; + postMessage({ + 'callbackId': workerCallbackId, + 'finalResponse': false, + 'data': data ? new Uint8Array({{{ makeHEAPView('U8', 'data', 'data + size') }}}) : 0 // XXX copy to a new typed array as a workaround for chrome bug 169705 + }); + }, + emscripten_worker_respond: function(data, size) { if (!inWorkerCall) throw 'not in worker call!'; - if (workerResponded) throw 'already responded!'; + if (workerResponded) throw 'already responded with final response!'; workerResponded = true; postMessage({ 'callbackId': workerCallbackId, + 'finalResponse': true, 'data': data ? new Uint8Array({{{ makeHEAPView('U8', 'data', 'data + size') }}}) : 0 // XXX copy to a new t |