Граф коммитов

346 Коммитов

Автор SHA1 Сообщение Дата
Kagami Sascha Rosylight c5af8f63f0 Fix module pollution (#4582)
* Fix module pollution

* export_name on modularize

* author :D
2016-10-10 11:55:21 -07:00
jgravelle-google 2cbaa7d024 Clean up test cases (#4504)
* Enable some already-working wasm tests

* Move code in test_add_function into files for easier debugging

* Add optional note to no_wasm_backend annotation

Add notes to some tests that show up when ran, giving more information as to why a given test isn't ran with wasm_backend. Should be helpful for triage.

* Fix test_fs_direct to work in a js-engine-agnostic way

* Refactor test_i64 into four separate tests

Move the test input into files.
Remove @no_wasm_backend from two of the tests that already work

* Refactor a bunch of tests to reduce line noise

Abstract out the .in .out test pattern to reduce duplication

* Un-enable some not-working tests

* Add non-.in/.out extensions to some tests

* Refactoring + triage

* Yet more refactoring and triage

* Add test to verify nested va_copy

* Add Jacob Gravelle to AUTHORS

* Merge no_wasm_backend_note with no_wasm_backend

* Rename all .in files to .c files

Refactor all the remaining trivial tests to use do_run_in_out_file_test.
Let do_run_in_out_file_test select from a list of possible extensions, so test code only has to specify path and can ignore extension.

* Fix up test failures found from running all asm tests

* More categorization of wasm_backend test failures

* Remove unused code in system_libs.py

* Include .cc files as legal input files

* Fix v8-specific test failures

d8 doesn't support console.log, and d8 complains that writeStringToMemory is deprecated.
2016-08-31 16:57:58 -07:00
Franklin Ta f04f67f423 Allow array fields in embind's value_object 2016-08-30 19:15:07 -07:00
Alon Zakai 3fb3eda8e0 Merge branch 'getStore_checkError' of https://github.com/Kaosumaru/emscripten into incoming
Conflicts:
	AUTHORS
2016-08-26 10:18:07 -07:00
Mateusz Borycki 943037233e Update AUTHORS 2016-08-26 18:45:41 +02:00
András Kucsma 8c6737c5ed Add missing canOwn parameter to FS.createDataFile calls (#4495)
* Add missing canOwn parameter to FS.createDataFile calls

`undefined` was silently passed in these cases. `false` is used
everywhere to avoid functional changes, since `undefined` is falsy.

* Add Andras Kucsma to AUTHORS
2016-08-17 15:58:58 -07:00
Heejin Ahn c5e1701939 Fix inlining bug (#4471)
* Fix inlining bug

Currently INLINING_LIMIT option does not do anything for clang. (And in
opt, emcc only checks whether it is 0 or not, so the limit number given
actually does not matter unless it is 0.)
So we give -O2, clang inlines short functions even if INLINING_LIMIT is
nonzero. This patch fixes this bug.

* Add a test

* Add Heejin Ahn to AUTHORS list
2016-08-15 15:52:02 -07:00
Junji Hashimoto 479e6dac34 Add other.test_realpath_nodefs 2016-08-03 13:45:43 +09:00
Dominic Chen dd8316c643 add support for CFI 2016-07-11 11:03:24 -07:00
Régis Fénéon d5940078c3 Report WebGL GLSL version number in GL_SHADING_LANGUAGE_VERSION string
This fixes the returned string in case the version is neither "1.0" nor "3.00".
The WebGL GLSL version information is returned in the vendor-specific information field.
2016-06-22 09:07:30 +02:00
Philip Bielby fa81344088 Update AUTHORS 2016-05-24 09:41:44 +01:00
Aiden Koss 06db15f50e Fix for issue #4260 "glFenceSync" Incorrect, Should Take Parameters. (#4339) 2016-05-19 16:56:59 -07:00
Harald Reingruber ce3babb9a1 adding myself to AUTHORS 2016-05-17 00:10:40 +02:00
Jukka Jylänki ee5c1f9b1a Merge remote-tracking branch 'remotes/cgibson/glfw-window-callback-fix' into incoming
# Conflicts:
#	AUTHORS
2016-05-07 12:01:06 +03:00
cynecx 87db65d1b2 Add myself to AUTHORS 2016-05-03 22:59:04 +02:00
Alon Zakai 400d3d3f4a Merge branch 'worker-alert-support' of https://github.com/kerbkerb/emscripten into incoming
Conflicts:
	AUTHORS
2016-04-26 21:16:48 -07:00
holland schutte 4e0d4f7bd5 Incoming (#4274)
* issue 4254; comitting fix

* PR modifications for code standards

* Update AUTHORS
2016-04-26 10:20:59 -07:00
Kerby Geffrard e8b6839ee8 Adding myself to AUTHORS 2016-04-25 16:04:38 -04:00
Chris Gibson 55caf127af Added myself to authors list 2016-04-25 10:59:44 -07:00
Andrey Burov a143e0d6cb Use specified DB name for preload file cache (#4219)
* Use specified DB name for preload cache

Add --indexedDB-name parameter

* Add test_preload_caching_indexeddb_name

* Add myself to AUTHORS
2016-04-21 13:32:47 -07:00
maher 70d4c6daf3 Update AUTHORS 2016-04-14 14:40:55 +02:00
pieter.vantorre 42889cd114 Fix file_packager's --use-preload-cache on safari. Fixes #2977
bug was caused by the following safari issue:
https://bugs.webkit.org/show_bug.cgi?id=136937
2016-04-08 16:11:40 +02:00
Lars-Magnus Skog 48eda51b33 remove dead if statement in Module['read']
return buffer if binary, otherwise return .toString()
2016-03-21 23:18:58 +01:00
Alon Zakai a56223f085 Merge branch 'EMCC_CFLAGS-multiargs' of https://github.com/dfletcher/emscripten into incoming
Conflicts:
	AUTHORS
2016-03-21 12:40:28 -07:00
Dave Fletcher 5d62f0de6b Added self to authors list. 2016-03-21 12:22:46 -07:00
Ashley Sommer 727b5d0d2f Added myself to AUTHORS 2016-03-10 07:47:51 +10:00
Derek Schuff 0c77c77374 Make BINARYEN_ROOT a config file setting
Currently the BINARYEN -s setting is used both as a flag to enable wasm
creation with binaryen, and to specify the path. This change keeps -s
BINARYEN=1 to enable binaryen, but moves the path to a setting called
BINARYEN_ROOT in the config file, alongside LLVM_ROOT and
EMSCRIPTEN_ROOT. It also makes the path include the 'bin' directory for
consistency with those directories.
2016-03-01 17:40:36 -08:00
kidanger 720af9fa0b Add myself to AUTHORS 2016-03-01 16:19:09 +02:00
Jakob Stoklund Olesen 3f8f00f4f5 Add myself to AUTHORS 2016-02-18 12:47:07 -08:00
Pierre Krieger 92236a82df Add the _Exit symbol 2016-02-14 07:57:43 +01:00
Arnab Choudhury 98b4cf42ee Duplicate function elimination
This change adds support for duplicate function elimination (DFE) to the
JavaScript optimizer.  A new JS file has been added -
eliminate-duplicate-functions.js - which is used to postprocess the
output generated by Emscripten. We add a new file, rather than
augmenting the existing JS optimizer file, for a variety of reasons -
pass independence, reduced coupling between Python scripts and the JS
optimizer, etc.

We introduce a multipass algorithm in which each pass consists of the
following four phases:

Phase 1 - identify duplicate functions using a hash of the function body
Phase 2 - identify variable names that would conflict after renaming
function calls
Phase 3 - generate mapping from equivalent functions to their
replacement function - use the information from Phase 2 to ensure that
the replacement function is not a variable name
Phase 4 - use the mapping generated in Phase 3 to perform the reduction

NOTE: In some rare cases, we may actually not be able to move on from
Phase 3 if we find that we cannot generate a mapping because of
conflicts with variable names.

One pass can reveal new sets of identical functions which in turn can be
reduced by further passes. Empirically, four or five passes are
sufficient to eliminate all duplicate functions. Internally, therefore,
the elimination will perform 5 passes by default. This can be overridden
by setting ELIMINATE_DUPLICATE_FUNCTIONS_PASSES to 1 in settings.js or
on the Emscripten command line.

Generated asm.js is broken into several batches (at function boundaries)
to enable parallelization of the elimination. This saves on memory and
makes use of more CPU cores to save on build time. A number of tests
have been introduced to test this functionality as well.

The change also introduces various tweaks to the amount of diagnostic
information that is dumped out by the JavaScript optimizer. Verbose
logging is now only enabled in debug mode (via the EMCC_LOG_DEBUG
environment variable). We also dump backtraces on encountering unhandled
exceptions: this is useful when Emscripten runs as part of a large build
process. In order to view detailed information about which functions
were merged, set the
ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS value to 1 in
settings.js or via the Emscripten command line. This generates a log
file in the same directory as the generated JavaScript listing the sets
of merged functions. This can be decoded using the symbol map generated
by Emscripten. It is, therefore, recommended that developers enable
symbol map generation when attempting to modify or debug this feature.

Since DFE increases build time significantly, it is disabled by default.
It can be enabled by setting ELIMINATE_DUPLICATE_FUNCTIONS to 1 either
in settings.js or by adding "-s ELIMINATE_DUPLICATE_FUNCTIONS=1" on the
Emscripten command line. The poppler test has been updated to also run
with the ELIMINATE_DUPLICATE_FUNCTIONS setting set to 1.

Improvements/future work

It has been observed that on average we experience a code size reduction
of 25% when transpiling large C++ code bases.  Typically, C++ code that
makes heavy use of templates will experience the greatest reduction in
code size. There are several directions that future work might take:

* Deduplication of code across templates: e.g. reduction of
std::vector<long> and std::vector<int> to single instantiations of
template code when appropriate

* Histogram-based selection of candidates for replacement: improved code
size should be attainable by assigning the shortest identifiers to the
most frequently referenced functions (in the style of Huffman coding)

* Convergence: the five-pass default chosen in this implementation is
based on empirical observations on a 150,000LOC C++ code base

* Candidate selection: this will, most likely, influence both the
convergence time (i.e. number of passes) and the code size reduction;
currently, when selecting candidates, we choose the shortest identifier
from the list that is not also a variable name
2016-02-11 19:43:42 -08:00
Tanner Rogalsky d614b5c0a4 Add Tanner Rogalsky to the AUTHORS file. 2016-02-10 20:28:21 -05:00
Alon Zakai 3b55d3aed4 Merge branch 'interacting-with-code-JS-workarounds' of https://github.com/greggman/emscripten into incoming
Conflicts:
	AUTHORS
2016-02-08 18:12:32 -08:00
Gregg Tavares 91ac6126af update AUTHORS 2016-02-09 09:40:48 +08:00
nickshinpho cf70fe72f6 adding nick shin 2016-01-27 16:56:31 -06:00
noamtcohen 675a5ff665 add Noam 2016-01-27 03:14:37 +02:00
Alon Zakai 18c2e4c9d6 Merge branch 'master' of https://github.com/XVincentX/emscripten into incoming
Conflicts:
	AUTHORS
2016-01-25 18:21:11 -08:00
XVincentX 0a1e11fc9b Allow override for ENVIRONMENT_IS* 2016-01-20 10:10:04 +01:00
Brian Armstrong 0c7056364e add brian to authors 2016-01-19 12:37:14 -08:00
Andreas Plesch 61b82df536 Update AUTHORS 2016-01-06 13:36:19 -05:00
Paul "TBBle" Hampson 37aadc440a Return input name from DNS.lookup_name when given 0.0.0.0 or :: #3997
DNS.lookup_name uses __inet_pton4_raw and __inet_pton6_raw to detect if
it has been given a valid address string, but if the result evaluates to
false, still attempted to generate a 172.29.0.0/16 IP address.

Instead, correctly check the return values of the __inet_pton... methods
against precisely null, as is done by the other users.
2016-01-03 21:08:08 +11:00
Jukka Jylänki 233f7ef689 Merge remote-tracking branch 'remotes/n8o/incoming' into incoming
# Conflicts:
#	AUTHORS
2015-12-29 15:05:48 +02:00
eska 2aeea43dab Fix EMSCRIPTEN_RESULT documentation 2015-12-28 20:35:18 +01:00
Josh Peterson 62fbf06c64 Add my name to the AUTHORS file
As directed here:
http://kripken.github.io/emscripten-site/docs/contributing/index.html
I’ve added my name to the AUTHORS file to indicate the I’ve accepted
the licenses.
2015-12-21 14:31:45 -05:00
Nate Burr d52939cc5e Fixed issues with the memory profiler
* Fxed ui to listen for proper events and to be in proper scope.
* Fixed the allocations stats to work properly and be in the correct scope.
* Fixed onFree and onMalloc to reference the right functions in the correct scope.
2015-12-18 17:43:16 -07:00
cheungk 1c640b3b8e Do not prevent default handling for keydown event except for backspace and tab. 2015-12-03 18:26:50 +08:00
Braden MacDonald 3fc28958aa Add myself to AUTHORS 2015-11-25 11:19:24 -08:00
Piotr Paczkowski d5705c6f37 Create new test for blocker and main loop 2015-11-16 20:42:18 +01:00
Alon Zakai c90e5efe49 Merge branch 'glfw-repeat' of https://github.com/machee/emscripten into incoming
Conflicts:
	AUTHORS
2015-11-15 20:49:09 -08:00
Mark Achee bd2b1034c4 update AUTHORS 2015-11-15 13:02:03 -06:00