aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rwxr-xr-xem-config24
-rwxr-xr-xemcc53
-rwxr-xr-xemscripten.py2
-rw-r--r--settings.py2
-rw-r--r--src/analyzer.js128
-rw-r--r--src/compiler.js2
-rw-r--r--src/experimental/stringCache.diff147
-rw-r--r--src/intertyper.js4
-rw-r--r--src/jsifier.js47
-rw-r--r--src/library.js183
-rw-r--r--src/library_browser.js314
-rw-r--r--src/library_gc.js165
-rw-r--r--src/library_gl.js1114
-rw-r--r--src/library_glut.js20
-rw-r--r--src/library_sdl.js324
-rw-r--r--src/modules.js2
-rw-r--r--src/parseTools.js52
-rw-r--r--src/postamble.js46
-rw-r--r--src/preamble.js7
-rw-r--r--src/runtime.js71
-rw-r--r--src/settings.js21
-rw-r--r--src/shell.html48
-rw-r--r--src/utility.js4
-rw-r--r--system/include/emscripten.h35
-rw-r--r--system/include/features.h3
-rw-r--r--system/include/gc.h50
-rw-r--r--system/include/libc/sys/types.h8
-rw-r--r--system/include/net/netinet/in.h5
-rw-r--r--system/include/net/netinet/tcp.h246
-rw-r--r--system/include/sys/socket.h5
-rw-r--r--system/include/sys/socketvar.h3
-rw-r--r--system/lib/libcxx/Makefile1
-rw-r--r--tests/browser_gc.cpp96
-rw-r--r--tests/cases/phientryimplicitmoar.ll28
-rw-r--r--tests/cases/phientryimplicitmoar.txt6
-rw-r--r--tests/cases/phinonexist.ll25
-rw-r--r--tests/cube_explosion.c235
-rw-r--r--tests/cubegeom.c295
-rw-r--r--tests/cubegeom_color.c295
-rw-r--r--tests/cubegeom_color2.c299
-rw-r--r--tests/cubegeom_mt.c300
-rw-r--r--tests/cubegeom_normal.c295
-rw-r--r--tests/cubegeom_pre.c307
-rw-r--r--tests/cubegeom_pre2.c348
-rw-r--r--tests/cubegeom_pre3.c348
-rw-r--r--tests/cubegeom_texturematrix.c312
-rw-r--r--tests/emscripten_api_browser.cpp38
-rw-r--r--tests/gl_ps.c230
-rw-r--r--tests/gl_ps.pngbin0 -> 203535 bytes
-rw-r--r--tests/hello_world_gles.c63
-rw-r--r--tests/msvc10/README.txt5
-rw-r--r--tests/msvc10/dlmalloc_test.vcxproj89
-rw-r--r--tests/msvc10/emscripten_api_browser.vcxproj89
-rw-r--r--tests/msvc10/fannkuch.vcxproj89
-rw-r--r--tests/msvc10/fasta.vcxproj89
-rw-r--r--tests/msvc10/files.vcxproj89
-rw-r--r--tests/msvc10/glbook_10_MultiTexture.vcxproj110
-rw-r--r--tests/msvc10/glbook_11_Multisample.vcxproj106
-rw-r--r--tests/msvc10/glbook_11_Stencil_Test.vcxproj106
-rw-r--r--tests/msvc10/glbook_13_ParticleSystem.vcxproj109
-rw-r--r--tests/msvc10/glbook_15_Hello_Triangle_KD.vcxproj106
-rw-r--r--tests/msvc10/glbook_2_Hello_Triangle.vcxproj106
-rw-r--r--tests/msvc10/glbook_8_Simple_VertexShader.vcxproj106
-rw-r--r--tests/msvc10/glbook_9_MipMap2D.vcxproj106
-rw-r--r--tests/msvc10/glbook_9_Simple_Texture2D.vcxproj106
-rw-r--r--tests/msvc10/glbook_9_Simple_TextureCubemap.vcxproj106
-rw-r--r--tests/msvc10/glbook_9_TextureWrap.vcxproj106
-rw-r--r--tests/msvc10/hashtest.vcxproj89
-rw-r--r--tests/msvc10/hello_libcxx.vcxproj89
-rw-r--r--tests/msvc10/hello_malloc.vcxproj89
-rw-r--r--tests/msvc10/hello_world_c.vcxproj89
-rw-r--r--tests/msvc10/hello_world_cpp.vcxproj89
-rw-r--r--tests/msvc10/hello_world_file.vcxproj89
-rw-r--r--tests/msvc10/hello_world_gles.vcxproj89
-rw-r--r--tests/msvc10/hello_world_loop.vcxproj89
-rw-r--r--tests/msvc10/hello_world_loop_malloc.vcxproj89
-rw-r--r--tests/msvc10/hello_world_sdl.vcxproj89
-rw-r--r--tests/msvc10/new.vcxproj89
-rw-r--r--tests/msvc10/raytrace.vcxproj89
-rw-r--r--tests/msvc10/sdl_audio.vcxproj89
-rw-r--r--tests/msvc10/sdl_canvas.vcxproj89
-rw-r--r--tests/msvc10/sdl_gl_read.vcxproj89
-rw-r--r--tests/msvc10/sdl_image.vcxproj89
-rw-r--r--tests/msvc10/sdl_key.vcxproj89
-rw-r--r--tests/msvc10/sdl_mouse.vcxproj89
-rw-r--r--tests/msvc10/sdl_ogl.vcxproj89
-rw-r--r--tests/msvc10/skinning_test_no_simd.vcxproj89
-rw-r--r--tests/msvc10/tests_msvc10.sln286
-rw-r--r--tests/msvc10/tests_msvc10.vcxproj67
-rw-r--r--tests/msvc10/twopart.vcxproj90
-rw-r--r--tests/pre_run_deps.cpp10
-rwxr-xr-xtests/runner.py404
-rw-r--r--tests/screenshot-gray-purple.pngbin0 -> 242425 bytes
-rw-r--r--tests/sdl_audio.c16
-rw-r--r--tests/sdl_image.c26
-rw-r--r--tests/sdl_key.c17
-rw-r--r--tests/sdl_mouse.c10
-rw-r--r--tests/sdl_ogl.c22
-rw-r--r--tests/sdl_ogl_defaultMatrixMode.c176
-rw-r--r--tests/sdl_ogl_p.c8
-rw-r--r--tests/sdlglshader.c153
-rw-r--r--tests/sdlglshader.pngbin0 -> 36299 bytes
-rw-r--r--tests/sha1.c241
-rw-r--r--tests/sqlite/benchmark.c1
-rw-r--r--tests/sqlite/benchmark.txt2
-rwxr-xr-xthird_party/lzma.js/doit.sh8
-rw-r--r--tools/autodebugger.py65
-rw-r--r--tools/bisect_pair.py18
-rw-r--r--tools/clean_webconsole.py23
-rw-r--r--tools/eliminator/eliminator-test-output.js2722
-rw-r--r--tools/eliminator/eliminator-test.js3302
-rw-r--r--tools/eliminator/eliminator.coffee47
-rw-r--r--tools/js-optimizer.js177
-rw-r--r--tools/shared.py108
-rw-r--r--tools/test-js-optimizer-regs-output.js228
-rw-r--r--tools/test-js-optimizer-regs.js233
117 files changed, 17558 insertions, 963 deletions
diff --git a/AUTHORS b/AUTHORS
index 6a6db201..1dd6039a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -20,3 +20,5 @@ under the licensing terms detailed in LICENSE.
* David Benjamin <davidben@mit.edu>
* Pierre Renaux <pierre@talansoft.com>
* Brian Anderson <banderson@mozilla.com>
+* Jon Bardin <diclophis@gmail.com>
+* Jukka Jylänki <jujjyl@gmail.com>
diff --git a/em-config b/em-config
new file mode 100755
index 00000000..dee399ed
--- /dev/null
+++ b/em-config
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+'''
+This is a helper tool which is designed to make it possible
+for other apps to read emscripten's configuration variables
+in a unified way. Usage:
+
+ em-config VAR_NAME
+
+This tool prints the value of the variable to stdout if one
+is found, or exits with 1 if the variable does not exist.
+'''
+
+import os, sys, re
+from tools import shared
+
+if len(sys.argv) != 2 or \
+ not re.match(r"^[\w\W_][\w\W_\d]*$", sys.argv[1]) or \
+ not (sys.argv[1] in dir(shared)):
+ print 'Usage: em-config VAR_NAME'
+ exit(1)
+
+print eval('shared.' + sys.argv[1])
+
diff --git a/emcc b/emcc
index a54b805b..635d6132 100755
--- a/emcc
+++ b/emcc
@@ -272,6 +272,10 @@ Options that are modified or new in %s include:
--js-library <lib> A JavaScript library to use in addition to
those in Emscripten's src/library_*
+ -v Turns on verbose output. This will pass
+ -v to Clang, and also enable EMCC_DEBUG
+ to details emcc's operations
+
The target file, if specified (-o <target>), defines what will
be generated:
@@ -293,6 +297,9 @@ the source of emcc (search for 'os.environ').
''' % (this, this, this)
exit(0)
+elif len(sys.argv) == 2 and sys.argv[1] == '-v': # -v with no inputs
+ print 'emcc (Emscripten GCC-like replacement) 2.0'
+ exit(subprocess.call([shared.CLANG, '-v']))
# If this is a configure-type thing, do not compile to JavaScript, instead use clang
# to compile to a native binary (using our headers, so things make sense later)
@@ -513,6 +520,10 @@ try:
elif newargs[i] == '--ignore-dynamic-linking':
ignore_dynamic_linking = True
newargs[i] = ''
+ elif newargs[i] == '-v':
+ shared.COMPILER_OPTS += ['-v']
+ DEBUG = 1
+ newargs[i] = ''
elif newargs[