diff options
-rw-r--r-- | ChangeLog | 141 | ||||
-rw-r--r-- | emscripten-version.txt | 2 | ||||
-rwxr-xr-x | tools/ffdb.py | 90 |
3 files changed, 208 insertions, 25 deletions
@@ -10,9 +10,144 @@ Not all changes are documented here. In particular, new features, user-oriented Current trunk code ------------------ - To see a list of commits in the active development branch 'incoming', which have not yet been packaged in a release, see - - Emscripten: https://github.com/kripken/emscripten/compare/1.16.0...incoming - - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.16.0...incoming - - Emscripten-Clang: https://github.com/kripken/emscripten-fastcomp-clang/compare/1.16.0...incoming + - Emscripten: https://github.com/kripken/emscripten/compare/1.20.0...incoming + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.20.0...incoming + - Emscripten-Clang: https://github.com/kripken/emscripten-fastcomp-clang/compare/1.20.0...incoming + +v1.20.0: 6/13/2014 +------------------ + - Optimize in-memory virtual filesystem performance when serialized to an IndexedDB. + - Fixed memcpy regression with ta0 and ta1 modes. + - Fixed an issue with line numbers being messed up when generating source maps (#2410) + - Fixed an ffdb logging bug that could cause it to drop messages if they were being received too fast. Added support getting memory and system descriptions with ffdb. + - Added a new extension to SDL "emscripten_SDL_SetEventHandler()" which enabled application to perform SDL event handling inside a JS event handler to overcome browser security restrictions. (#2417) + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.19.2...1.20.0 + - Emscripten-LLVM: no changes. + - Emscripten-Clang: no changes. + +v1.19.2: 6/9/2014 +------------------ + - Updated CMake support for response file handling. + - Fixed issues with glfwGetProcAddress and glfwSetWindowSizeCallback. + - Fixed an issue with regexes that caused issues on IE11 runtime (#2400) + - Added a new functions emscripten_get_preloaded_image_data() and emscripten_get_preloaded_image_data_from_FILE() to obtain pixel data of preloaded images. + - Greatly improved ffdb capabilities to operate a FFOS device. + - Fixed a Windows-specific bug where the user temp directory was littered with temporary .rsp files that did not get cleaned up. + - Improved SIMD support. + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.19.1...1.19.2 + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.19.1...1.19.2 + - Emscripten-Clang: no changes. + +v1.19.1: 6/3/2014 +------------------ + - Migrate to using musl sscanf and sprintf and the family that writes to memory, and not directly to the filesystem. + - Improve the error messages from -s SAFE_HEAP_ACCESS=1 runtime checks. + - Added new linker flag -s NO_DYNAMIC_EXECUTION=1 which removes the use of eval() and new Function() in the generated output. For more information, see "Eval and related functions are disabled" in https://developer.chrome.com/extensions/contentSecurityPolicy . + - Fixed a compiler issue when very large double constants are present. (#2392) + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.19.0...1.19.1 + - Emscripten-LLVM: no changes. + - Emscripten-Clang: no changes. + +v1.19.0: 5/29/2014 +------------------ + - Added an error message to signal that linkable modules are not supported in fastcomp. + - Fixed a miscompilation issue that resulted in an error "SyntaxError: invalid increment operand" and a statement +(+0) being generated (#2314) + - Make optimized compiler output smaller by running the shell code through uglify when not using closure. + - Fixed a crash in SDL audio loading code introduced in v1.18.3 + - Fixed an issue where glTex(Sub)Image2D might throw an exception on error, instead of setting glGetError(). + - Added new typedefs emscripten_align1_short, emscripten_align{1/2}_int, emscripten_align{1/2}_float and emscripten_align{1/2/4}_double to ease signaling the compiler that unaligned data is present. (#2378) + - Fixed an embind issue with refcount tracking on smart pointers. + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.18.4...1.19.0 + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.18.4...1.19.0 + - Emscripten-Clang: no changes. + +v1.18.4: 5/27/2014 +------------------ + - Fixed error message on unsupported linking options (#2365) + - Updated embind to latest version from IMVU upstream. + - Fixed an issue where source maps did not load properly in Firefox. + - Added a more descriptive error message to fastcomp when MAX_SETJMPS limit is violated. (#2379) + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.18.3...1.18.4 + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.18.3...1.18.4 + - Emscripten-Clang: no changes. + +v1.18.3: 5/21/2014 +------------------ + - Added support to emcc command line for "archive groups": -Wl,--start-group and -Wl,--end-group + - Greatly optimized ccall and cwrap implementations. + - Added new support for SDL_Mix backend to use WebAudio to play back audio clips. + - Fixed a registerizeHarder issue with elimination of conditional expressions. + - Migrated single-character standard C functions (islower, tolower, and the family) to use musl implementations. + - Updated relooper to not optimize out breaks if it causes excessive nesting. + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.18.2...1.18.3 + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.18.2...1.18.3 + - Emscripten-Clang: no changes. + +v1.18.2: 5/19/2014 +------------------ + - Fixed a problem which blocked user applications from handling WebGL context loss events themselves. + - Added a new HTML5 api function emscripten_is_webgl_context_lost() which allows polling for context loss in addition to receiving events. + - Improved async wget progress events to work better across browsers. + - Improved WebIDL binder support. + - Added new typeof() function to emscripten::val. + - Added support for SDL window events SDL_WINDOWEVENT_FOCUS_GAINED, SDL_WINDOWEVENT_FOCUS_LOST, SDL_WINDOWEVENT_SHOWN, SDL_WINDOWEVENT_HIDDEN. + - Fixed a compiler miscompilation on unsigned i1 bitcasts (#2350) + - Fixed a compiler bug where doubles in varargs might not get 8-byte aligned (#2358) + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.18.1...1.18.2 + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.18.1...1.18.2 + - Emscripten-Clang: no changes. + +v1.18.1: 5/12/2014 +------------------ + - Fixed an issue where the mouse wheel scroll did not work with SDL. + - Fixed an issue with emscripten_async_wget, which undesirably expected that the string pointer passed to it stayed alive for the duration of the operation (#2349) + - Emscripten now issues a warning message when the EXPORTED_FUNCTIONS list contains invalid symbol names (#2338) + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.18.0...1.18.1 + - Emscripten-LLVM: no changes. + - Emscripten-Clang: no changes. + +v1.18.0: 5/10/2014 +------------------ + - Enable support for low-level C<->JS interop to marshall 64 bit integers from C to JS. + - Fixed an issue that caused some programs to immediately run out of memory "(cannot enlarge memory arrays)" at startup. (#2334) + - Fixed a crash issue with generated touch events that didn't correspond to a real touch. + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.17.0...1.18.0 + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.17.0...1.18.0 + - Emscripten-Clang: no changes. + +v1.17.0: 5/6/2014 +------------------ + - Enabled asm.js compilation and -s PRECISE_F32 support when using embind. + - Improved relooper to emit switches in many-entried blocks. + - Fixed a GLFW bug where mouse wheel direction was reversed. + - Fixed glfwGetKey to work even when no callback is registered with glfwGetKeyCallback (#1320) + - Added a new tool 'webidl_binder' that generates C <-> JS interop code from WebIDL descriptions. + - Fix emscripten compilation to work on pages that don't contain a HTML canvas. + - Added a new error message to default shell when an uncaught exception is thrown. + - Improved error diagnostics reported by -s SAFE_HEAP=1. + - Added support for registering callbacks hook to VFS file open, write, move, close and delete. + - Added embind support to std::basic_string<unsigned char> + - By default, the C runtime will no longer exit after returning from main() when safeSetTimeout() or safeSetInterval() is used. + - Fixed an issue with sscanf formatting (#2322) + - Fixed an issue where precompiled headers were given a wrong output filename (#2320) + - Enabled registerizeHarder optimization pass to work when outlining is enabled. + - Fixed an issue with strptime month handling (#2324) + - Added an initial implementation of a new tool 'ffdb' which can be used to operate a Firefox OS phone from the command line. + - Fixed a compiler crash on assertion failure '!contains(BranchesOut, Target)' (emscripten-fastcomp #32) + - Added a new ABI to Clang that targets Emscripten specifically. Stop aligning member functions to save some space in the function table array. + - Full list of changes: + - Emscripten: https://github.com/kripken/emscripten/compare/1.16.0...1.17.0 + - Emscripten-LLVM: https://github.com/kripken/emscripten-fastcomp/compare/1.16.0...1.17.0 + - Emscripten-Clang: https://github.com/kripken/emscripten-fastcomp-clang/compare/1.16.0...1.17.0 v1.16.0: 4/16/2014 ------------------ diff --git a/emscripten-version.txt b/emscripten-version.txt index 5f079d01..59751e94 100644 --- a/emscripten-version.txt +++ b/emscripten-version.txt @@ -1,2 +1,2 @@ -1.19.2 +1.20.0 diff --git a/tools/ffdb.py b/tools/ffdb.py index 143fea8e..a948c700 100755 --- a/tools/ffdb.py +++ b/tools/ffdb.py @@ -2,6 +2,12 @@ import socket, json, sys, uuid, datetime, time, logging, cgi, zipfile, os, tempfile, atexit, subprocess, re, base64, struct, imghdr +WINDOWS = sys.platform == 'win32' +if WINDOWS: + import ctypes + stdout_handle = ctypes.windll.kernel32.GetStdHandle(-11) + +LOG_FORMAT = 'short' # Either 'bare', 'short', or 'long' ADB = 'adb' # Path to the adb executable LOG_VERBOSE = False # Verbose printing enabled with --verbose HOST = 'localhost' # The remote host to connect to the B2G device @@ -63,21 +69,27 @@ def logv(msg): # Returns a JSON dictionary of the received message. def read_b2g_response(print_errors_to_console = True): global read_queue, b2g_socket - try: - if len(read_queue) == 0: - read_queue += b2g_socket.recv(65536*2) - except Exception, e: - if e[0] == 57: # Socket is not connected - print 'Error! Failed to receive data from the device: socket is not connected!' - sys.exit(1) - else: - raise payload = '' - while ':' in read_queue: - semicolon = read_queue.index(':') - payload_len = int(read_queue[:semicolon]) + while True: + semicolon = float('Inf') + payload_len = float('Inf') + try: + semicolon = read_queue.index(':') + payload_len = int(read_queue[:semicolon]) + except: + pass if semicolon+1+payload_len > len(read_queue): - read_queue += b2g_socket.recv(65536*2) + try: + read_queue += b2g_socket.recv(4096) + except socket.timeout, e: + pass # We simulate blocking sockets with looping over reads that time out, since on Windows, the user cannot press Ctrl-C to break on blocking sockets. + except Exception, e: + if e[0] == 57: # Socket is not connected + print 'Error! Failed to receive data from the device: socket is not connected!' + sys.exit(1) + else: + print 'Got exception ' + str(e) + raise continue payload = read_queue[semicolon+1:semicolon+1+payload_len] read_queue = read_queue[semicolon+1+payload_len:] @@ -313,6 +325,7 @@ def b2g_memory(app_name): print k + ': ' + str(v) def b2g_log(app_name, clear=False): + global LOG_FORMAT apps = b2g_get_appslist() appActor = '' for app in apps: @@ -329,11 +342,30 @@ def b2g_log(app_name, clear=False): msgs = send_b2g_cmd(consoleActor, 'startListeners', { 'listeners': ['PageError','ConsoleAPI','NetworkActivity','FileActivity'] }) - def log_b2g_message(msg): + if WINDOWS: + WARNING = 14 # FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY + FAIL = 12 # FOREGROUND_RED | FOREGROUND_INTENSITY + INFO = 7 # FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE + ENDC = '' + BOLD = '' + else: WARNING = '\033[93m' FAIL = '\033[91m' - ENDC = '\033[0m' + INFO = ENDC = '\033[0m' BOLD = "\033[1m" + + def set_color(string, color): + if WINDOWS: + ctypes.windll.kernel32.SetConsoleTextAttribute(stdout_handle, color) + return string + else: + return color + string + ENDC + + def reset_color(): + if WINDOWS: + ctypes.windll.kernel32.SetConsoleTextAttribute(stdout_handle, INFO) + + def log_b2g_message(msg): msgs = [] if 'type' in msg and msg['type'] == 'consoleAPICall': msgs = [msg['message']] @@ -344,16 +376,29 @@ def b2g_log(app_name, clear=False): args = m['arguments'] for arg in args: + if LOG_FORMAT == 'long': + text = str(m['functionName']) + '@' + str(m['filename']) + ':' + str(m['lineNumber']) + ': ' + str(arg) + elif LOG_FORMAT == 'bare': + text = str(arg) + else: # Default to 'short' + text = str(m['functionName']) + '@' + os.path.basename(str(m['filename'])) + ':' + str(m['lineNumber']) + ': ' + str(arg) + if m['level'] == 'log': - color = 'I/' + color = INFO + channel = 'I/' elif m['level'] == 'warn': - color = WARNING + 'W/' + color = WARNING + channel = 'W/' elif m['level'] == 'error': - color = FAIL + 'E/' + color = FAIL + channel = 'E/' else: - color = m['level'] + '/' + color = INFO + channel = m['level'] + '/' - print color + str(m['functionName']) + '@' + str(m['filename']) + ':' + str(m['lineNumber']) + ': ' + str(arg) + ENDC + text = set_color(channel + text, color) + print text + reset_color() msgs = send_b2g_cmd(consoleActor, 'getCachedMessages', { 'messageTypes': ['PageError', 'ConsoleAPI'] }) log_b2g_message(msgs) @@ -511,6 +556,9 @@ def main(): print ' 4) When launching ffdb, remember to acknowledge the "incoming debug connection" dialog if it pops up on the device.' sys.exit(1) b2g_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + if WINDOWS: + # Python Windows issue: user cannot press Ctrl-C to abort from a socket .recv() Therefore simulate blocking sockets with looping over reads that time out. + b2g_socket.settimeout(0.5) try: b2g_socket.connect((HOST, PORT)) except Exception, e: @@ -662,5 +710,5 @@ if __name__ == '__main__': logv('ffdb.py quitting with process exit code ' + str(returncode)) sys.exit(returncode) except KeyboardInterrupt: - print ' Aborted by user' + print ('^C' if WINDOWS else '') + ' Aborted by user' sys.exit(1) |