webruby 0.1.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/driver/driver.c +12 -0
- data/lib/webruby/config.rb +3 -3
- data/lib/webruby/environment.rb +1 -0
- data/lib/webruby/rake/files.rake +22 -22
- data/lib/webruby/rake/general.rake +0 -1
- data/lib/webruby/utility.rb +2 -0
- data/modules/emscripten/AUTHORS +12 -1
- data/modules/emscripten/cmake/Platform/Emscripten.cmake +152 -15
- data/modules/emscripten/em++ +2 -0
- data/modules/emscripten/em++.bat +1 -1
- data/modules/emscripten/em-config.bat +1 -1
- data/modules/emscripten/emar.bat +1 -1
- data/modules/emscripten/emcc +233 -95
- data/modules/emscripten/emcc.bat +1 -1
- data/modules/emscripten/emconfigure.bat +1 -1
- data/modules/emscripten/emmake.bat +1 -1
- data/modules/emscripten/emranlib.bat +1 -1
- data/modules/emscripten/emscripten.py +221 -217
- data/modules/emscripten/package.json +7 -0
- data/modules/emscripten/src/analyzer.js +1437 -1385
- data/modules/emscripten/src/compiler.js +30 -6
- data/modules/emscripten/src/compiler_phase.html +33 -0
- data/modules/emscripten/src/fastLong.js +6 -6
- data/modules/emscripten/src/headless.js +47 -656
- data/modules/emscripten/src/headlessCanvas.js +618 -0
- data/modules/emscripten/src/intertyper.js +1038 -899
- data/modules/emscripten/src/jsifier.js +818 -714
- data/modules/emscripten/src/library.js +1794 -2968
- data/modules/emscripten/src/library_browser.js +81 -16
- data/modules/emscripten/src/library_egl.js +9 -3
- data/modules/emscripten/src/library_fs.js +1585 -0
- data/modules/emscripten/src/library_gl.js +445 -202
- data/modules/emscripten/src/library_glfw.js +4 -1
- data/modules/emscripten/src/library_glut.js +61 -13
- data/modules/emscripten/src/library_idbfs.js +216 -0
- data/modules/emscripten/src/library_memfs.js +279 -0
- data/modules/emscripten/src/library_nodefs.js +234 -0
- data/modules/emscripten/src/library_openal.js +131 -150
- data/modules/emscripten/src/library_path.js +3 -0
- data/modules/emscripten/src/library_sdl.js +499 -229
- data/modules/emscripten/src/library_sockfs.js +576 -0
- data/modules/emscripten/src/library_tty.js +146 -0
- data/modules/emscripten/src/modules.js +30 -35
- data/modules/emscripten/src/parseTools.js +356 -161
- data/modules/emscripten/src/postamble.js +76 -31
- data/modules/emscripten/src/preamble.js +271 -41
- data/modules/emscripten/src/proxyClient.js +82 -0
- data/modules/emscripten/src/proxyWorker.js +143 -0
- data/modules/emscripten/src/relooper/Relooper.cpp +60 -24
- data/modules/emscripten/src/relooper/Relooper.h +3 -2
- data/modules/emscripten/src/relooper/emscripten/glue.js +20 -10
- data/modules/emscripten/src/relooper/fuzzer.py +19 -10
- data/modules/emscripten/src/relooper/test.cpp +50 -50
- data/modules/emscripten/src/relooper/test.txt +147 -30
- data/modules/emscripten/src/relooper/test2.c +13 -13
- data/modules/emscripten/src/relooper/test2.txt +17 -3
- data/modules/emscripten/src/relooper/test3.c +7 -7
- data/modules/emscripten/src/relooper/test3.txt +36 -7
- data/modules/emscripten/src/relooper/test4.cpp +7 -7
- data/modules/emscripten/src/relooper/test4.txt +28 -7
- data/modules/emscripten/src/relooper/test5.cpp +6 -6
- data/modules/emscripten/src/relooper/test5.txt +34 -10
- data/modules/emscripten/src/relooper/test6.cpp +4 -4
- data/modules/emscripten/src/relooper/test6.txt +17 -3
- data/modules/emscripten/src/relooper/test_dead.cpp +2 -2
- data/modules/emscripten/src/relooper/test_debug.cpp +4 -4
- data/modules/emscripten/src/relooper/test_debug.txt +17 -3
- data/modules/emscripten/src/relooper/test_fuzz1.cpp +9 -9
- data/modules/emscripten/src/relooper/test_fuzz1.txt +45 -5
- data/modules/emscripten/src/relooper/test_fuzz2.cpp +4 -4
- data/modules/emscripten/src/relooper/test_fuzz2.txt +18 -1
- data/modules/emscripten/src/relooper/test_fuzz3.cpp +5 -5
- data/modules/emscripten/src/relooper/test_fuzz3.txt +16 -0
- data/modules/emscripten/src/relooper/test_fuzz4.cpp +5 -5
- data/modules/emscripten/src/relooper/test_fuzz4.txt +25 -3
- data/modules/emscripten/src/relooper/test_fuzz5.cpp +10 -10
- data/modules/emscripten/src/relooper/test_fuzz5.txt +49 -15
- data/modules/emscripten/src/relooper/test_fuzz6.cpp +92 -92
- data/modules/emscripten/src/relooper/test_fuzz6.txt +201 -18
- data/modules/emscripten/src/relooper/test_inf.cpp +184 -184
- data/modules/emscripten/src/relooper/test_inf.txt +1078 -332
- data/modules/emscripten/src/runtime.js +69 -45
- data/modules/emscripten/src/settings.js +48 -919
- data/modules/emscripten/src/shell.html +1 -1
- data/modules/emscripten/src/shell.js +14 -8
- data/modules/emscripten/src/shell_sharedlib.js +18 -1
- data/modules/emscripten/src/simd.js +958 -0
- data/modules/emscripten/src/struct_info.json +1045 -0
- data/modules/emscripten/src/utility.js +11 -0
- data/modules/emscripten/system/bin/sdl-config +13 -0
- data/modules/emscripten/system/include/compat/ctype.h +17 -0
- data/modules/emscripten/system/include/compat/malloc.h +48 -0
- data/modules/emscripten/system/include/compat/math.h +14 -0
- data/modules/emscripten/system/include/compat/netdb.h +22 -0
- data/modules/emscripten/system/include/compat/stdarg.h +16 -0
- data/modules/emscripten/system/include/compat/stdlib.h +16 -0
- data/modules/emscripten/system/include/compat/string.h +17 -0
- data/modules/emscripten/system/include/compat/sys/socketvar.h +14 -0
- data/modules/emscripten/system/include/compat/sys/stat.h +20 -0
- data/modules/emscripten/system/include/{libc → compat}/sys/timeb.h +3 -7
- data/modules/emscripten/system/include/compat/time.h +18 -0
- data/modules/emscripten/system/include/compat/unistd.h +16 -0
- data/modules/emscripten/system/include/compat/xlocale.h +19 -0
- data/modules/emscripten/system/include/emscripten/emscripten.h +48 -7
- data/modules/emscripten/system/include/emscripten/vector.h +6 -0
- data/modules/emscripten/system/include/libc/aio.h +69 -0
- data/modules/emscripten/system/include/libc/alloca.h +13 -13
- data/modules/emscripten/system/include/libc/ar.h +19 -63
- data/modules/emscripten/system/include/libc/arpa/ftp.h +35 -0
- data/modules/emscripten/system/include/libc/arpa/inet.h +36 -0
- data/modules/emscripten/system/include/libc/arpa/nameser.h +467 -0
- data/modules/emscripten/system/include/libc/arpa/nameser_compat.h +2 -0
- data/modules/emscripten/system/include/libc/arpa/telnet.h +251 -0
- data/modules/emscripten/system/include/libc/arpa/tftp.h +31 -0
- data/modules/emscripten/system/include/libc/assert.h +9 -36
- data/modules/emscripten/system/include/libc/bits/alltypes.h +397 -0
- data/modules/emscripten/system/include/libc/bits/endian.h +1 -0
- data/modules/emscripten/system/include/libc/bits/errno.h +134 -0
- data/modules/emscripten/system/include/libc/bits/fcntl.h +38 -0
- data/modules/emscripten/system/include/libc/bits/fenv.h +34 -0
- data/modules/emscripten/system/include/libc/bits/float.h +17 -0
- data/modules/emscripten/system/include/libc/bits/io.h +0 -0
- data/modules/emscripten/system/include/libc/bits/ioctl.h +197 -0
- data/modules/emscripten/system/include/libc/bits/ipc.h +14 -0
- data/modules/emscripten/system/include/libc/bits/limits.h +8 -0
- data/modules/emscripten/system/include/libc/bits/mman.h +62 -0
- data/modules/emscripten/system/include/libc/bits/msg.h +16 -0
- data/modules/emscripten/system/include/libc/bits/posix.h +2 -0
- data/modules/emscripten/system/include/libc/bits/reg.h +19 -0
- data/modules/emscripten/system/include/libc/bits/setjmp.h +1 -0
- data/modules/emscripten/system/include/libc/bits/shm.h +18 -0
- data/modules/emscripten/system/include/libc/bits/signal.h +112 -0
- data/modules/emscripten/system/include/libc/bits/socket.h +17 -0
- data/modules/emscripten/system/include/libc/bits/stat.h +22 -0
- data/modules/emscripten/system/include/libc/bits/statfs.h +7 -0
- data/modules/emscripten/system/include/libc/bits/stdarg.h +4 -0
- data/modules/emscripten/system/include/libc/bits/stdint.h +20 -0
- data/modules/emscripten/system/include/libc/bits/syscall.h +696 -0
- data/modules/emscripten/system/include/libc/bits/termios.h +160 -0
- data/modules/emscripten/system/include/libc/bits/user.h +48 -0
- data/modules/emscripten/system/include/libc/byteswap.h +26 -0
- data/modules/emscripten/system/include/libc/complex.h +55 -54
- data/modules/emscripten/system/include/libc/cpio.h +29 -0
- data/modules/emscripten/system/include/libc/crypt.h +20 -0
- data/modules/emscripten/system/include/libc/ctype.h +58 -187
- data/modules/emscripten/system/include/libc/dirent.h +69 -6
- data/modules/emscripten/system/include/libc/dlfcn.h +42 -0
- data/modules/emscripten/system/include/libc/elf.h +2555 -0
- data/modules/emscripten/system/include/libc/endian.h +80 -1
- data/modules/emscripten/system/include/libc/err.h +25 -0
- data/modules/emscripten/system/include/libc/errno.h +23 -7
- data/modules/emscripten/system/include/libc/fcntl.h +175 -1
- data/modules/emscripten/system/include/libc/features.h +32 -0
- data/modules/emscripten/system/include/libc/fenv.h +28 -0
- data/modules/emscripten/system/include/libc/float.h +34 -0
- data/modules/emscripten/system/include/libc/fnmatch.h +24 -50
- data/modules/emscripten/system/include/libc/ftw.h +42 -0
- data/modules/emscripten/system/include/libc/getopt.h +22 -187
- data/modules/emscripten/system/include/libc/glob.h +42 -83
- data/modules/emscripten/system/include/libc/grp.h +37 -79
- data/modules/emscripten/system/include/libc/iconv.h +18 -56
- data/modules/emscripten/system/include/libc/ifaddrs.h +24 -53
- data/modules/emscripten/system/include/libc/inttypes.h +208 -271
- data/modules/emscripten/system/include/libc/iso646.h +5 -28
- data/modules/emscripten/system/include/libc/langinfo.h +88 -316
- data/modules/emscripten/system/include/libc/lastlog.h +1 -0
- data/modules/emscripten/system/include/libc/libgen.h +5 -13
- data/modules/emscripten/system/include/libc/libintl.h +25 -0
- data/modules/emscripten/system/include/libc/limits.h +140 -149
- data/modules/emscripten/system/include/libc/link.h +54 -0
- data/modules/emscripten/system/include/libc/locale.h +72 -70
- data/modules/emscripten/system/include/libc/malloc.h +0 -169
- data/modules/emscripten/system/include/libc/math.h +393 -573
- data/modules/emscripten/system/include/libc/memory.h +1 -0
- data/modules/emscripten/system/include/libc/mntent.h +44 -0
- data/modules/emscripten/system/include/libc/monetary.h +23 -0
- data/modules/emscripten/system/include/libc/mqueue.h +36 -0
- data/modules/emscripten/system/include/libc/net/ethernet.h +55 -0
- data/modules/emscripten/system/include/libc/net/if.h +135 -0
- data/modules/emscripten/system/include/libc/net/if_arp.h +133 -0
- data/modules/emscripten/system/include/libc/net/route.h +124 -0
- data/modules/emscripten/system/include/libc/netdb.h +161 -0
- data/modules/emscripten/system/include/libc/netinet/ether.h +14 -0
- data/modules/emscripten/system/include/libc/netinet/icmp6.h +305 -0
- data/modules/emscripten/system/include/libc/netinet/if_ether.h +126 -0
- data/modules/emscripten/system/include/libc/netinet/in.h +336 -0
- data/modules/emscripten/system/include/libc/netinet/in_systm.h +9 -0
- data/modules/emscripten/system/include/libc/netinet/ip.h +186 -0
- data/modules/emscripten/system/include/libc/netinet/ip6.h +142 -0
- data/modules/emscripten/system/include/libc/netinet/ip_icmp.h +192 -0
- data/modules/emscripten/system/include/libc/netinet/tcp.h +71 -0
- data/modules/emscripten/system/include/libc/netinet/udp.h +35 -0
- data/modules/emscripten/system/include/libc/netpacket/packet.h +44 -0
- data/modules/emscripten/system/include/libc/nl_types.h +22 -0
- data/modules/emscripten/system/include/libc/paths.h +30 -5
- data/modules/emscripten/system/include/libc/poll.h +46 -0
- data/modules/emscripten/system/include/libc/pthread.h +191 -331
- data/modules/emscripten/system/include/libc/pty.h +18 -0
- data/modules/emscripten/system/include/libc/pwd.h +33 -62
- data/modules/emscripten/system/include/libc/readme.txt +2 -2
- data/modules/emscripten/system/include/libc/regex.h +53 -93
- data/modules/emscripten/system/include/libc/resolv.h +144 -0
- data/modules/emscripten/system/include/libc/sched.h +124 -89
- data/modules/emscripten/system/include/libc/search.h +40 -48
- data/modules/emscripten/system/include/libc/semaphore.h +35 -0
- data/modules/emscripten/system/include/libc/setjmp.h +35 -13
- data/modules/emscripten/system/include/libc/shadow.h +44 -0
- data/modules/emscripten/system/include/libc/signal.h +245 -20
- data/modules/emscripten/system/include/libc/spawn.h +74 -0
- data/modules/emscripten/system/include/libc/stdalign.h +15 -0
- data/modules/emscripten/system/include/libc/stdarg.h +18 -43
- data/modules/emscripten/system/include/libc/stdbool.h +14 -0
- data/modules/emscripten/system/include/libc/stddef.h +12 -58
- data/modules/emscripten/system/include/libc/stdint.h +82 -458
- data/modules/emscripten/system/include/libc/stdio.h +184 -679
- data/modules/emscripten/system/include/libc/stdio_ext.h +34 -0
- data/modules/emscripten/system/include/libc/stdlib.h +146 -205
- data/modules/emscripten/system/include/libc/stdnoreturn.h +5 -0
- data/modules/emscripten/system/include/libc/string.h +86 -89
- data/modules/emscripten/system/include/libc/strings.h +27 -27
- data/modules/emscripten/system/include/libc/stropts.h +139 -0
- data/modules/emscripten/system/include/libc/sys/acct.h +75 -0
- data/modules/emscripten/system/include/libc/sys/cachectl.h +22 -0
- data/modules/emscripten/system/include/libc/sys/dir.h +0 -8
- data/modules/emscripten/system/include/libc/sys/epoll.h +67 -0
- data/modules/emscripten/system/include/libc/sys/errno.h +2 -190
- data/modules/emscripten/system/include/libc/sys/eventfd.h +26 -0
- data/modules/emscripten/system/include/libc/sys/fcntl.h +2 -4
- data/modules/emscripten/system/include/libc/sys/file.h +20 -1
- data/modules/emscripten/system/include/libc/sys/fsuid.h +20 -0
- data/modules/emscripten/system/include/libc/sys/inotify.h +57 -0
- data/modules/emscripten/system/include/libc/sys/io.h +17 -0
- data/modules/emscripten/system/include/libc/sys/ioctl.h +14 -0
- data/modules/emscripten/system/include/libc/sys/ipc.h +42 -0
- data/modules/emscripten/system/include/{sys/sysctl.h → libc/sys/klog.h} +4 -4
- data/modules/emscripten/system/include/libc/sys/mman.h +55 -0
- data/modules/emscripten/system/include/libc/sys/mount.h +72 -0
- data/modules/emscripten/system/include/libc/sys/msg.h +52 -0
- data/modules/emscripten/system/include/libc/sys/mtio.h +188 -0
- data/modules/emscripten/system/include/libc/sys/param.h +29 -19
- data/modules/emscripten/system/include/libc/sys/personality.h +46 -0
- data/modules/emscripten/system/include/libc/sys/poll.h +2 -0
- data/modules/emscripten/system/include/libc/sys/prctl.h +101 -0
- data/modules/emscripten/system/include/libc/sys/procfs.h +65 -0
- data/modules/emscripten/system/include/libc/sys/ptrace.h +96 -0
- data/modules/emscripten/system/include/libc/sys/reboot.h +20 -0
- data/modules/emscripten/system/include/libc/sys/reg.h +9 -0
- data/modules/emscripten/system/include/libc/sys/resource.h +89 -45
- data/modules/emscripten/system/include/libc/sys/select.h +42 -0
- data/modules/emscripten/system/include/libc/sys/sem.h +82 -0
- data/modules/emscripten/system/include/libc/sys/sendfile.h +22 -0
- data/modules/emscripten/system/include/libc/sys/shm.h +61 -0
- data/modules/emscripten/system/include/libc/sys/signal.h +1 -315
- data/modules/emscripten/system/include/libc/sys/signalfd.h +44 -0
- data/modules/emscripten/system/include/libc/sys/socket.h +299 -0
- data/modules/emscripten/system/include/libc/sys/stat.h +95 -204
- data/modules/emscripten/system/include/libc/sys/statfs.h +32 -0
- data/modules/emscripten/system/include/libc/sys/statvfs.h +57 -0
- data/modules/emscripten/system/include/libc/sys/stropts.h +1 -0
- data/modules/emscripten/system/include/libc/sys/swap.h +21 -0
- data/modules/emscripten/system/include/libc/sys/syscall.h +6 -0
- data/modules/emscripten/system/include/libc/sys/sysctl.h +17 -0
- data/modules/emscripten/system/include/libc/sys/sysinfo.h +36 -0
- data/modules/emscripten/system/include/libc/sys/syslog.h +1 -0
- data/modules/emscripten/system/include/libc/sys/sysmacros.h +15 -0
- data/modules/emscripten/system/include/libc/sys/termios.h +2 -280
- data/modules/emscripten/system/include/libc/sys/time.h +40 -68
- data/modules/emscripten/system/include/libc/sys/timerfd.h +24 -0
- data/modules/emscripten/system/include/libc/sys/times.h +14 -16
- data/modules/emscripten/system/include/libc/sys/timex.h +98 -0
- data/modules/emscripten/system/include/libc/sys/ttydefaults.h +34 -92
- data/modules/emscripten/system/include/libc/sys/types.h +87 -481
- data/modules/emscripten/system/include/libc/sys/ucontext.h +1 -0
- data/modules/emscripten/system/include/libc/sys/uio.h +48 -0
- data/modules/emscripten/system/include/libc/sys/un.h +32 -0
- data/modules/emscripten/system/include/libc/sys/user.h +16 -0
- data/modules/emscripten/system/include/libc/sys/utsname.h +30 -0
- data/modules/emscripten/system/include/libc/sys/vfs.h +1 -0
- data/modules/emscripten/system/include/libc/sys/wait.h +41 -26
- data/modules/emscripten/system/include/libc/sys/xattr.h +30 -0
- data/modules/emscripten/system/include/libc/syscall.h +1 -0
- data/modules/emscripten/system/include/libc/sysexits.h +21 -0
- data/modules/emscripten/system/include/libc/syslog.h +104 -0
- data/modules/emscripten/system/include/libc/tar.h +27 -33
- data/modules/emscripten/system/include/libc/termios.h +40 -1
- data/modules/emscripten/system/include/libc/tgmath.h +270 -0
- data/modules/emscripten/system/include/libc/time.h +96 -237
- data/modules/emscripten/system/include/libc/ucontext.h +25 -0
- data/modules/emscripten/system/include/libc/ulimit.h +17 -0
- data/modules/emscripten/system/include/libc/unistd.h +517 -4
- data/modules/emscripten/system/include/libc/utime.h +15 -3
- data/modules/emscripten/system/include/libc/utmp.h +40 -1
- data/modules/emscripten/system/include/libc/utmpx.h +58 -0
- data/modules/emscripten/system/include/libc/values.h +39 -0
- data/modules/emscripten/system/include/libc/wchar.h +164 -175
- data/modules/emscripten/system/include/libc/wctype.h +67 -37
- data/modules/emscripten/system/include/libc/wordexp.h +31 -42
- data/modules/emscripten/system/include/libcxx/__locale +6 -6
- data/modules/emscripten/system/include/libcxx/locale +1 -1
- data/modules/emscripten/system/lib/libc/musl/readme.txt +9 -1
- data/modules/emscripten/system/lib/libc/musl/src/internal/locale_impl.h +5 -0
- data/modules/emscripten/system/lib/libc/musl/src/internal/stdio_impl.h +92 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/big5.h +1085 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/codepages.h +238 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/gb18030.h +1836 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/hkscs.h +390 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iconv.c +454 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswalnum_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswalpha_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswblank_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswcntrl_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswctype_l.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswdigit_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswgraph_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswlower_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswprint_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswpunct_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswspace_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswupper_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/iswxdigit_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/jis0208.h +550 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/ksc.h +640 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/legacychars.h +39 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/strfmon.c +101 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/strxfrm.c +18 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/towctrans_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/towlower_l.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/towupper_l.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll.c +16 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcscoll_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm.c +21 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/wcsxfrm_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/wctrans_l.c +6 -0
- data/modules/emscripten/system/lib/libc/musl/src/locale/wctype_l.c +9 -0
- data/modules/emscripten/system/lib/libc/musl/src/stdio/fwprintf.c +13 -0
- data/modules/emscripten/system/lib/libc/musl/src/stdio/swprintf.c +14 -0
- data/modules/emscripten/system/lib/libc/musl/src/stdio/vfwprintf.c +361 -0
- data/modules/emscripten/system/lib/libc/musl/src/stdio/vswprintf.c +53 -0
- data/modules/emscripten/system/lib/libc/musl/src/stdio/vwprintf.c +7 -0
- data/modules/emscripten/system/lib/libc/musl/src/stdio/wprintf.c +13 -0
- data/modules/emscripten/system/lib/libcextra.symbols +44 -0
- data/modules/emscripten/system/lib/libcxx/exception.cpp +3 -3
- data/modules/emscripten/system/lib/libcxx/locale.cpp +12 -12
- data/modules/emscripten/system/lib/libcxxabi/src/cxa_new_delete.cpp +1 -1
- data/modules/emscripten/tools/asm_module.py +2 -0
- data/modules/emscripten/tools/autodebugger.py +3 -1
- data/modules/emscripten/tools/eliminator/asm-eliminator-test-output.js +0 -4835
- data/modules/emscripten/tools/eliminator/asm-eliminator-test.js +0 -6495
- data/modules/emscripten/tools/file_packager.py +53 -56
- data/modules/emscripten/tools/find_bigfuncs.py +2 -2
- data/modules/emscripten/tools/find_bigvars.py +24 -0
- data/modules/emscripten/tools/gen_struct_info.py +509 -0
- data/modules/emscripten/tools/gen_struct_info.pyc +0 -0
- data/modules/emscripten/tools/js-optimizer.js +177 -86
- data/modules/emscripten/tools/js_optimizer.py +54 -19
- data/modules/emscripten/tools/js_optimizer.pyc +0 -0
- data/modules/emscripten/tools/jsrun.py +17 -7
- data/modules/emscripten/tools/jsrun.pyc +0 -0
- data/modules/emscripten/tools/response_file.py +2 -2
- data/modules/emscripten/tools/response_file.pyc +0 -0
- data/modules/emscripten/tools/shared.py +257 -123
- data/modules/emscripten/tools/shared.pyc +0 -0
- data/modules/emscripten/tools/source-maps/sourcemapper.js +37 -6
- data/modules/emscripten/tools/tempfiles.py +1 -0
- data/modules/emscripten/tools/tempfiles.pyc +0 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-minlast-output.js +2 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-minlast.js +8 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-outline1-output.js +412 -169
- data/modules/emscripten/tools/test-js-optimizer-asm-outline1.js +88 -0
- data/modules/emscripten/tools/test-js-optimizer-asm-outline2-output.js +311 -265
- data/modules/emscripten/tools/test-js-optimizer-asm-pre-output.js +0 -20
- data/modules/emscripten/tools/test-js-optimizer-asm-pre.js +0 -21
- data/modules/emscripten/tools/test-js-optimizer-asm-regs.js +2 -2
- data/modules/emscripten/tools/test-js-optimizer-regs-output.js +8 -8
- data/modules/emscripten/tools/test-js-optimizer-regs.js +1 -1
- data/modules/emscripten/tools/validate_asmjs.py +82 -0
- data/modules/mruby/Rakefile +2 -2
- data/modules/mruby/include/mruby/class.h +2 -2
- data/modules/mruby/include/mruby/compile.h +12 -4
- data/modules/mruby/include/mruby/data.h +8 -3
- data/modules/mruby/include/mruby/debug.h +65 -0
- data/modules/mruby/include/mruby/dump.h +10 -2
- data/modules/mruby/include/mruby/irep.h +1 -0
- data/modules/mruby/include/mruby/string.h +2 -1
- data/modules/mruby/include/mruby/value.h +20 -13
- data/modules/mruby/include/mruby/variable.h +1 -0
- data/modules/mruby/include/mruby.h +5 -6
- data/modules/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +6 -4
- data/modules/mruby/mrbgems/mruby-math/src/math.c +4 -0
- data/modules/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -1
- data/modules/mruby/mrbgems/mruby-proc-ext/src/proc.c +1 -1
- data/modules/mruby/mrbgems/mruby-random/src/random.c +1 -4
- data/modules/mruby/mrbgems/mruby-string-ext/src/string.c +25 -16
- data/modules/mruby/mrbgems/mruby-string-ext/test/string.rb +4 -0
- data/modules/mruby/mrbgems/mruby-struct/src/struct.c +1 -1
- data/modules/mruby/mrbgems/mruby-symbol-ext/mrblib/symbol.rb +51 -0
- data/modules/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +22 -0
- data/modules/mruby/mrbgems/mruby-time/src/time.c +38 -60
- data/modules/mruby/mrblib/class.rb +2 -2
- data/modules/mruby/src/backtrace.c +96 -23
- data/modules/mruby/src/class.c +43 -41
- data/modules/mruby/src/codegen.c +52 -46
- data/modules/mruby/src/debug.c +214 -0
- data/modules/mruby/src/dump.c +245 -17
- data/modules/mruby/src/error.c +14 -6
- data/modules/mruby/src/etc.c +17 -10
- data/modules/mruby/src/gc.c +9 -9
- data/modules/mruby/src/kernel.c +1 -1
- data/modules/mruby/src/load.c +137 -1
- data/modules/mruby/src/object.c +1 -1
- data/modules/mruby/src/parse.y +162 -37
- data/modules/mruby/src/state.c +2 -0
- data/modules/mruby/src/string.c +28 -19
- data/modules/mruby/src/symbol.c +0 -1
- data/modules/mruby/src/variable.c +12 -15
- data/modules/mruby/src/vm.c +38 -22
- data/modules/mruby/tasks/mrbgem_spec.rake +6 -4
- data/modules/mruby/tasks/mrbgems_test.rake +9 -9
- data/modules/mruby/tasks/mruby_build_gem.rake +9 -0
- data/modules/mruby/tasks/toolchains/androideabi.rake +2 -0
- data/modules/mruby/test/driver.c +3 -3
- data/modules/mruby/test/t/array.rb +13 -0
- data/modules/mruby/test/t/class.rb +28 -0
- data/modules/mruby/test/t/exception.rb +10 -0
- data/modules/mruby/test/t/literals.rb +50 -0
- data/modules/mruby/test/t/module.rb +22 -0
- data/modules/mruby/test/t/proc.rb +37 -0
- data/modules/mruby/test/t/string.rb +20 -21
- data/modules/mruby/tools/mrbc/mrbc.c +2 -4
- data/scripts/gen_post.rb +1 -0
- data/scripts/gen_require.rb +107 -0
- data/templates/minimal/Rakefile +20 -0
- metadata +210 -88
- data/driver/main.c +0 -40
- data/modules/emscripten/cmake/Platform/Emscripten_unix.cmake +0 -24
- data/modules/emscripten/emlibtool +0 -11
- data/modules/emscripten/emlibtool.bat +0 -2
- data/modules/emscripten/src/framework.js +0 -257
- data/modules/emscripten/system/include/bsd/float.h +0 -91
- data/modules/emscripten/system/include/bsd/readme.txt +0 -2
- data/modules/emscripten/system/include/bsd/sys/mman.h +0 -180
- data/modules/emscripten/system/include/bsd/sys/utsname.h +0 -70
- data/modules/emscripten/system/include/dlfcn.h +0 -31
- data/modules/emscripten/system/include/err.h +0 -95
- data/modules/emscripten/system/include/features.h +0 -3
- data/modules/emscripten/system/include/libc/_ansi.h +0 -135
- data/modules/emscripten/system/include/libc/_syslist.h +0 -40
- data/modules/emscripten/system/include/libc/argz.h +0 -33
- data/modules/emscripten/system/include/libc/envlock.h +0 -15
- data/modules/emscripten/system/include/libc/envz.h +0 -16
- data/modules/emscripten/system/include/libc/fastmath.h +0 -13
- data/modules/emscripten/system/include/libc/ieeefp.h +0 -256
- data/modules/emscripten/system/include/libc/machine/_default_types.h +0 -121
- data/modules/emscripten/system/include/libc/machine/_types.h +0 -8
- data/modules/emscripten/system/include/libc/machine/ansi.h +0 -1
- data/modules/emscripten/system/include/libc/machine/endian.h +0 -31
- data/modules/emscripten/system/include/libc/machine/fastmath.h +0 -100
- data/modules/emscripten/system/include/libc/machine/ieeefp.h +0 -376
- data/modules/emscripten/system/include/libc/machine/malloc.h +0 -8
- data/modules/emscripten/system/include/libc/machine/param.h +0 -1
- data/modules/emscripten/system/include/libc/machine/setjmp-dj.h +0 -43
- data/modules/emscripten/system/include/libc/machine/setjmp.h +0 -361
- data/modules/emscripten/system/include/libc/machine/stdlib.h +0 -8
- data/modules/emscripten/system/include/libc/machine/termios.h +0 -1
- data/modules/emscripten/system/include/libc/machine/time.h +0 -19
- data/modules/emscripten/system/include/libc/machine/types.h +0 -30
- data/modules/emscripten/system/include/libc/newlib.h +0 -2
- data/modules/emscripten/system/include/libc/process.h +0 -44
- data/modules/emscripten/system/include/libc/reent.h +0 -183
- data/modules/emscripten/system/include/libc/regdef.h +0 -7
- data/modules/emscripten/system/include/libc/sys/_default_fcntl.h +0 -223
- data/modules/emscripten/system/include/libc/sys/_types.h +0 -93
- data/modules/emscripten/system/include/libc/sys/cdefs.h +0 -123
- data/modules/emscripten/system/include/libc/sys/config.h +0 -255
- data/modules/emscripten/system/include/libc/sys/custom_file.h +0 -2
- data/modules/emscripten/system/include/libc/sys/dirent.h +0 -58
- data/modules/emscripten/system/include/libc/sys/features.h +0 -212
- data/modules/emscripten/system/include/libc/sys/iconvnls.h +0 -77
- data/modules/emscripten/system/include/libc/sys/lock.h +0 -24
- data/modules/emscripten/system/include/libc/sys/queue.h +0 -471
- data/modules/emscripten/system/include/libc/sys/reent.h +0 -843
- data/modules/emscripten/system/include/libc/sys/sched.h +0 -67
- data/modules/emscripten/system/include/libc/sys/stdio.h +0 -27
- data/modules/emscripten/system/include/libc/sys/string.h +0 -2
- data/modules/emscripten/system/include/libc/sys/syslimits.h +0 -65
- data/modules/emscripten/system/include/libc/sys/unistd.h +0 -514
- data/modules/emscripten/system/include/libc/sys/utime.h +0 -26
- data/modules/emscripten/system/include/libc/unctrl.h +0 -46
- data/modules/emscripten/system/include/memory.h +0 -10
- data/modules/emscripten/system/include/mntent.h +0 -23
- data/modules/emscripten/system/include/net/arpa/inet.h +0 -32
- data/modules/emscripten/system/include/net/arpa/nameser.h +0 -535
- data/modules/emscripten/system/include/net/arpa/nameser_compat.h +0 -187
- data/modules/emscripten/system/include/net/if.h +0 -106
- data/modules/emscripten/system/include/net/netinet/in.h +0 -230
- data/modules/emscripten/system/include/net/netinet/tcp.h +0 -246
- data/modules/emscripten/system/include/net/resolv.h +0 -389
- data/modules/emscripten/system/include/netdb.h +0 -130
- data/modules/emscripten/system/include/nl_types.h +0 -19
- data/modules/emscripten/system/include/poll.h +0 -3
- data/modules/emscripten/system/include/pty.h +0 -6
- data/modules/emscripten/system/include/semaphore.h +0 -31
- data/modules/emscripten/system/include/spawn.h +0 -105
- data/modules/emscripten/system/include/stdbool.h +0 -16
- data/modules/emscripten/system/include/sys/bitypes.h +0 -3
- data/modules/emscripten/system/include/sys/io.h +0 -14
- data/modules/emscripten/system/include/sys/ioctl.h +0 -78
- data/modules/emscripten/system/include/sys/poll.h +0 -31
- data/modules/emscripten/system/include/sys/select.h +0 -16
- data/modules/emscripten/system/include/sys/sendfile.h +0 -16
- data/modules/emscripten/system/include/sys/socket.h +0 -247
- data/modules/emscripten/system/include/sys/socketvar.h +0 -3
- data/modules/emscripten/system/include/sys/statvfs.h +0 -32
- data/modules/emscripten/system/include/sys/uio.h +0 -22
- data/modules/emscripten/system/include/sys/un.h +0 -66
- data/modules/emscripten/system/include/sysexits.h +0 -108
- data/modules/emscripten/system/include/xlocale.h +0 -47
@@ -1,257 +0,0 @@
|
|
1
|
-
//"use strict";
|
2
|
-
|
3
|
-
//
|
4
|
-
// A framework to make building Emscripten easier. Lets you write modular
|
5
|
-
// code to handle specific issues.
|
6
|
-
//
|
7
|
-
// Actor - Some code that processes items.
|
8
|
-
// Item - Some data that is processed by actors.
|
9
|
-
// Substrate - A 'world' with some actors and some items.
|
10
|
-
//
|
11
|
-
// The idea is to create a substrate, fill it with the proper items
|
12
|
-
// and actors, and then run it to completion. Actors will process
|
13
|
-
// the items they are given, and forward the results to other actors,
|
14
|
-
// until we are finished. Some of the results are then the final
|
15
|
-
// output of the entire calculation done in the substrate.
|
16
|
-
//
|
17
|
-
|
18
|
-
var DEBUG = 0;
|
19
|
-
var DEBUG_MEMORY = 0;
|
20
|
-
|
21
|
-
var MemoryDebugger = {
|
22
|
-
clear: function() {
|
23
|
-
MemoryDebugger.time = Date.now();
|
24
|
-
MemoryDebugger.datas = {};
|
25
|
-
var info = MemoryDebugger.doGC();
|
26
|
-
MemoryDebugger.last = info[2];
|
27
|
-
MemoryDebugger.max = 0;
|
28
|
-
MemoryDebugger.tick('--clear--');
|
29
|
-
},
|
30
|
-
|
31
|
-
doGC: function() {
|
32
|
-
var raw = gc().replace('\n', '');
|
33
|
-
print('zz raw gc info: ' + raw);
|
34
|
-
return /before (\d+), after (\d+),.*/.exec(raw);
|
35
|
-
},
|
36
|
-
|
37
|
-
tick: function(name) {
|
38
|
-
var now = Date.now();
|
39
|
-
if (now - this.time > 1000) {
|
40
|
-
// ..
|
41
|
-
this.time = now;
|
42
|
-
}
|
43
|
-
|
44
|
-
// assume |name| exists from now on
|
45
|
-
|
46
|
-
var raw = gc().replace('\n', '');
|
47
|
-
var info = MemoryDebugger.doGC();
|
48
|
-
var before = info[1];
|
49
|
-
var after = info[2];
|
50
|
-
MemoryDebugger.max = Math.max(MemoryDebugger.max, before, after);
|
51
|
-
// A GC not called by us may have done some work 'silently'
|
52
|
-
var garbage = before - after;
|
53
|
-
var real = after - MemoryDebugger.last;
|
54
|
-
print('zz gc stats changes: ' + [name, real, garbage]);
|
55
|
-
MemoryDebugger.last = after;
|
56
|
-
|
57
|
-
if (Math.abs(garbage) + Math.abs(real) > 0) {
|
58
|
-
var data = MemoryDebugger.datas[name];
|
59
|
-
if (!data) {
|
60
|
-
data = MemoryDebugger.datas[name] = {
|
61
|
-
name: name,
|
62
|
-
count: 0,
|
63
|
-
garbage: 0,
|
64
|
-
real: 0
|
65
|
-
};
|
66
|
-
}
|
67
|
-
data.garbage += garbage;
|
68
|
-
data.real += real;
|
69
|
-
data.count++;
|
70
|
-
}
|
71
|
-
|
72
|
-
MemoryDebugger.dump();
|
73
|
-
},
|
74
|
-
|
75
|
-
dump: function() {
|
76
|
-
var vals = values(MemoryDebugger.datas);
|
77
|
-
print('zz max: ' + (MemoryDebugger.max/(1024*1024)).toFixed(3));
|
78
|
-
print('zz real:');
|
79
|
-
vals.sort(function(x, y) { return y.real - x.real });
|
80
|
-
vals.forEach(function(v) { if (Math.abs(v.real) > 1024*1024) print('zz ' + v.name + ' real = ' + (v.real/(1024*1024)).toFixed(3) + ' mb'); });
|
81
|
-
print('zz garbage:');
|
82
|
-
vals.sort(function(x, y) { return y.garbage - x.garbage });
|
83
|
-
vals.forEach(function(v) { if (Math.abs(v.garbage) > 1024*1024) print('zz ' + v.name + ' garbage = ' + (v.garbage/(1024*1024)).toFixed(3) + ' mb'); });
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
if (DEBUG_MEMORY) MemoryDebugger.clear();
|
88
|
-
|
89
|
-
function Substrate(name_) {
|
90
|
-
this.name_ = name_;
|
91
|
-
this.actors = {};
|
92
|
-
this.currUid = 1;
|
93
|
-
};
|
94
|
-
|
95
|
-
Substrate.prototype = {
|
96
|
-
addItem: function(item, targetActor) {
|
97
|
-
if (targetActor == '/dev/null') return;
|
98
|
-
if (targetActor == '/dev/stdout') {
|
99
|
-
this.results.push(item);
|
100
|
-
return;
|
101
|
-
}
|
102
|
-
this.actors[targetActor].inbox.push(item);
|
103
|
-
},
|
104
|
-
|
105
|
-
addItems: function(items, targetActor) {
|
106
|
-
if (targetActor == '/dev/null') return;
|
107
|
-
if (targetActor == '/dev/stdout') {
|
108
|
-
this.results = this.results.concat(items);
|
109
|
-
return;
|
110
|
-
}
|
111
|
-
this.actors[targetActor].inbox = this.actors[targetActor].inbox.concat(items);
|
112
|
-
},
|
113
|
-
|
114
|
-
checkInbox: function(actor) {
|
115
|
-
var items = actor.inbox;
|
116
|
-
for (var i = 0; i < items.length; i++) {
|
117
|
-
var item = items[i];
|
118
|
-
if (!item.__uid__) {
|
119
|
-
item.__uid__ = this.currUid;
|
120
|
-
this.currUid ++;
|
121
|
-
}
|
122
|
-
}
|
123
|
-
var MAX_INCOMING = Infinity;
|
124
|
-
if (MAX_INCOMING == Infinity) {
|
125
|
-
actor.inbox = [];
|
126
|
-
actor.items = actor.items.concat(items);
|
127
|
-
} else {
|
128
|
-
throw 'Warning: Enter this code at your own risk. It can save memory, but often regresses speed.';
|
129
|
-
actor.inbox = items.slice(MAX_INCOMING);
|
130
|
-
actor.items = actor.items.concat(items.slice(0, MAX_INCOMING));
|
131
|
-
}
|
132
|
-
},
|
133
|
-
|
134
|
-
addActor: function(name_, actor) {
|
135
|
-
assert(name_ && actor);
|
136
|
-
actor.name_ = name_;
|
137
|
-
actor.items = [];
|
138
|
-
actor.inbox = [];
|
139
|
-
actor.forwardItem = bind(this, this.addItem);
|
140
|
-
actor.forwardItems = bind(this, this.addItems);
|
141
|
-
this.actors[name_] = actor;
|
142
|
-
if (!actor.process) actor.process = Actor.prototype.process;
|
143
|
-
return actor;
|
144
|
-
},
|
145
|
-
|
146
|
-
solve: function() {
|
147
|
-
dprint('framework', "// Solving " + this.name_ + "...");
|
148
|
-
|
149
|
-
if (DEBUG_MEMORY) MemoryDebugger.tick('pre-run substrate ' + this.name_ + ' (priors may be cleaned)');
|
150
|
-
|
151
|
-
var startTime = Date.now();
|
152
|
-
var midTime = startTime;
|
153
|
-
var that = this;
|
154
|
-
function midComment() {
|
155
|
-
var curr = Date.now();
|
156
|
-
if (curr - midTime > 500) {
|
157
|
-
dprint('framework', '// Working on ' + that.name_ + ', so far ' + ((curr-startTime)/1000).toString().substr(0,10) + ' seconds.');
|
158
|
-
midTime = curr;
|
159
|
-
}
|
160
|
-
}
|
161
|
-
function finalComment() {
|
162
|
-
dprint('framework', '// Completed ' + that.name_ + ' in ' + ((Date.now() - startTime)/1000).toString().substr(0,10) + ' seconds.');
|
163
|
-
}
|
164
|
-
|
165
|
-
var ret = null;
|
166
|
-
var finalResult = null;
|
167
|
-
this.results = [];
|
168
|
-
var finished = false;
|
169
|
-
var onResult = this.onResult;
|
170
|
-
var actors = values(this.actors); // Assumes actors are not constantly added
|
171
|
-
while (!finished) {
|
172
|
-
dprint('framework', "Cycle start, items: ");// + values(this.actors).map(function(actor) actor.items).reduce(function(x,y) x+y, 0));
|
173
|
-
var hadProcessing = false;
|
174
|
-
for (var i = 0; i < actors.length; i++) {
|
175
|
-
var actor = actors[i];
|
176
|
-
if (actor.inbox.length == 0 && actor.items.length == 0) continue;
|
177
|
-
|
178
|
-
midComment();
|
179
|
-
|
180
|
-
this.checkInbox(actor);
|
181
|
-
var outputs;
|
182
|
-
var currResultCount = this.results.length;
|
183
|
-
dprint('framework', 'Processing using ' + actor.name_ + ': ' + actor.items.length);
|
184
|
-
outputs = actor.process(actor.items);
|
185
|
-
actor.items = [];
|
186
|
-
if (DEBUG_MEMORY) MemoryDebugger.tick('actor ' + actor.name_);
|
187
|
-
dprint('framework', 'New results: ' + (outputs.length + this.results.length - currResultCount) + ' out of ' + (this.results.length + outputs.length));
|
188
|
-
hadProcessing = true;
|
189
|
-
|
190
|
-
if (outputs && outputs.length > 0) {
|
191
|
-
if (outputs.length === 1 && outputs[0].__finalResult__) {
|
192
|
-
if (DEBUG) print("Solving complete: __finalResult__");
|
193
|
-
delete outputs[0].__finalResult__; // Might recycle this
|
194
|
-
delete outputs[0].__uid__;
|
195
|
-
finalComment();
|
196
|
-
finished = true;
|
197
|
-
finalResult = outputs[0];
|
198
|
-
} else {
|
199
|
-
this.results = this.results.concat(outputs);
|
200
|
-
}
|
201
|
-
}
|
202
|
-
}
|
203
|
-
if (!hadProcessing) {
|
204
|
-
if (DEBUG) print("Solving complete: no remaining items");
|
205
|
-
finalComment();
|
206
|
-
this.results.forEach(function(result) {
|
207
|
-
delete result.__uid__; // Might recycle these
|
208
|
-
if (onResult) onResult(result);
|
209
|
-
});
|
210
|
-
ret = this.results;
|
211
|
-
this.results = null; // No need to hold on to them any more
|
212
|
-
break;
|
213
|
-
}
|
214
|
-
if (finalResult) {
|
215
|
-
ret = finalResult;
|
216
|
-
break;
|
217
|
-
}
|
218
|
-
midComment();
|
219
|
-
}
|
220
|
-
|
221
|
-
// Clear the actors. Do not forget about the actors, though, to make this substrate reusable.
|
222
|
-
actors.forEach(function(actor) {
|
223
|
-
actor.items = null;
|
224
|
-
actor.inbox = null;
|
225
|
-
});
|
226
|
-
|
227
|
-
if (DEBUG_MEMORY) MemoryDebugger.tick('finished ' + this.name_);
|
228
|
-
|
229
|
-
return ret;
|
230
|
-
}
|
231
|
-
};
|
232
|
-
|
233
|
-
// Global access to the currently-being processed item.
|
234
|
-
// Note that if you overload process in Actor, this will need to be set if you rely on it.
|
235
|
-
var Framework = {
|
236
|
-
currItem: null
|
237
|
-
};
|
238
|
-
|
239
|
-
function Actor() { };
|
240
|
-
Actor.prototype = {
|
241
|
-
process: function(items) {
|
242
|
-
var ret = [];
|
243
|
-
for (var i = 0; i < items.length; i++) {
|
244
|
-
var item = items[i];
|
245
|
-
items[i] = null; // items may be very very large. Allow GCing to occur in the loop by releasing refs here
|
246
|
-
dprint('frameworkLines', 'Processing item for llvm line ' + item.lineNum);
|
247
|
-
Framework.currItem = item;
|
248
|
-
var outputs = this.processItem(item);
|
249
|
-
Framework.currItem = null;
|
250
|
-
if (outputs) {
|
251
|
-
ret = ret.concat(outputs);
|
252
|
-
}
|
253
|
-
}
|
254
|
-
return ret;
|
255
|
-
}
|
256
|
-
};
|
257
|
-
|
@@ -1,91 +0,0 @@
|
|
1
|
-
/* $OpenBSD: float.h,v 1.9 2011/08/29 13:13:21 kettenis Exp $ */
|
2
|
-
/* $NetBSD: float.h,v 1.8 1995/06/20 20:45:37 jtc Exp $ */
|
3
|
-
|
4
|
-
/*
|
5
|
-
* Copyright (c) 1989 Regents of the University of California.
|
6
|
-
* All rights reserved.
|
7
|
-
*
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
9
|
-
* modification, are permitted provided that the following conditions
|
10
|
-
* are met:
|
11
|
-
* 1. Redistributions of source code must retain the above copyright
|
12
|
-
* notice, this list of conditions and the following disclaimer.
|
13
|
-
* 2. Redistributions in binary form must reproduce the above copyright
|
14
|
-
* notice, this list of conditions and the following disclaimer in the
|
15
|
-
* documentation and/or other materials provided with the distribution.
|
16
|
-
* 3. Neither the name of the University nor the names of its contributors
|
17
|
-
* may be used to endorse or promote products derived from this software
|
18
|
-
* without specific prior written permission.
|
19
|
-
*
|
20
|
-
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
21
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
23
|
-
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
24
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
26
|
-
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
27
|
-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
28
|
-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
29
|
-
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
30
|
-
* SUCH DAMAGE.
|
31
|
-
*
|
32
|
-
* @(#)float.h 7.1 (Berkeley) 5/8/90
|
33
|
-
*/
|
34
|
-
|
35
|
-
#ifndef _MACHINE_FLOAT_H_
|
36
|
-
#define _MACHINE_FLOAT_H_
|
37
|
-
|
38
|
-
#include <sys/cdefs.h>
|
39
|
-
|
40
|
-
__BEGIN_DECLS
|
41
|
-
int __flt_rounds(void);
|
42
|
-
__END_DECLS
|
43
|
-
|
44
|
-
#define FLT_RADIX 2 /* b */
|
45
|
-
/*
|
46
|
-
* XXX Emscripten
|
47
|
-
* See float.h documentation for these values
|
48
|
-
* 1 seems best for JavaScript instead of:
|
49
|
-
* #define FLT_ROUNDS __flt_rounds()
|
50
|
-
*/
|
51
|
-
#define FLT_ROUNDS 1
|
52
|
-
#if __ISO_C_VISIBLE >= 1999
|
53
|
-
#define FLT_EVAL_METHOD 2 /* long double */
|
54
|
-
#endif
|
55
|
-
|
56
|
-
#define FLT_MANT_DIG 24 /* p */
|
57
|
-
#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
|
58
|
-
#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
|
59
|
-
#define FLT_MIN_EXP (-125) /* emin */
|
60
|
-
#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
|
61
|
-
#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */
|
62
|
-
#define FLT_MAX_EXP 128 /* emax */
|
63
|
-
#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
|
64
|
-
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
|
65
|
-
|
66
|
-
#define DBL_MANT_DIG 53
|
67
|
-
#define DBL_EPSILON 2.2204460492503131E-16
|
68
|
-
#define DBL_DIG 15
|
69
|
-
#define DBL_MIN_EXP (-1021)
|
70
|
-
#define DBL_MIN 2.2250738585072014E-308
|
71
|
-
#define DBL_MIN_10_EXP (-307)
|
72
|
-
#define DBL_MAX_EXP 1024
|
73
|
-
#define DBL_MAX 1.7976931348623157E+308
|
74
|
-
#define DBL_MAX_10_EXP 308
|
75
|
-
|
76
|
-
#define LDBL_MANT_DIG DBL_MANT_DIG
|
77
|
-
#define LDBL_EPSILON DBL_EPSILON
|
78
|
-
#define LDBL_DIG DBL_DIG
|
79
|
-
#define LDBL_MIN_EXP DBL_MIN_EXP
|
80
|
-
#define LDBL_MIN DBL_MIN
|
81
|
-
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
82
|
-
#define LDBL_MAX_EXP DBL_MAX_EXP
|
83
|
-
#define LDBL_MAX DBL_MAX
|
84
|
-
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
85
|
-
|
86
|
-
#if __ISO_C_VISIBLE >= 1999
|
87
|
-
#define DECIMAL_DIG 21
|
88
|
-
#endif
|
89
|
-
|
90
|
-
#endif /* _MACHINE_FLOAT_H_ */
|
91
|
-
|
@@ -1,180 +0,0 @@
|
|
1
|
-
/*-
|
2
|
-
* Copyright (c) 1982, 1986, 1993
|
3
|
-
* The Regents of the University of California. All rights reserved.
|
4
|
-
*
|
5
|
-
* Redistribution and use in source and binary forms, with or without
|
6
|
-
* modification, are permitted provided that the following conditions
|
7
|
-
* are met:
|
8
|
-
* 1. Redistributions of source code must retain the above copyright
|
9
|
-
* notice, this list of conditions and the following disclaimer.
|
10
|
-
* 2. Redistributions in binary form must reproduce the above copyright
|
11
|
-
* notice, this list of conditions and the following disclaimer in the
|
12
|
-
* documentation and/or other materials provided with the distribution.
|
13
|
-
* 3. All advertising materials mentioning features or use of this software
|
14
|
-
* must display the following acknowledgement:
|
15
|
-
* This product includes software developed by the University of
|
16
|
-
* California, Berkeley and its contributors.
|
17
|
-
* 4. Neither the name of the University nor the names of its contributors
|
18
|
-
* may be used to endorse or promote products derived from this software
|
19
|
-
* without specific prior written permission.
|
20
|
-
*
|
21
|
-
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
22
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
24
|
-
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
25
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
26
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
27
|
-
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
28
|
-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
29
|
-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
30
|
-
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
31
|
-
* SUCH DAMAGE.
|
32
|
-
*
|
33
|
-
* @(#)mman.h 8.2 (Berkeley) 1/9/95
|
34
|
-
* $FreeBSD: src/sys/sys/mman.h,v 1.29.2.1 2001/08/25 07:25:43 dillon Exp $
|
35
|
-
*/
|
36
|
-
|
37
|
-
#ifndef _SYS_MMAN_H_
|
38
|
-
#define _SYS_MMAN_H_
|
39
|
-
|
40
|
-
#include <stddef.h> /* XXX Emscripten for size_t */
|
41
|
-
#include <sys/types.h> /* XXX Emscripten for C++ compilation, not just C */
|
42
|
-
|
43
|
-
/* XXX Emscripten #include <sys/_posix.h> */
|
44
|
-
|
45
|
-
/*
|
46
|
-
* Inheritance for minherit()
|
47
|
-
*/
|
48
|
-
#define INHERIT_SHARE 0
|
49
|
-
#define INHERIT_COPY 1
|
50
|
-
#define INHERIT_NONE 2
|
51
|
-
|
52
|
-
/*
|
53
|
-
* Protections are chosen from these bits, or-ed together
|
54
|
-
*/
|
55
|
-
#define PROT_NONE 0x00 /* no permissions */
|
56
|
-
#define PROT_READ 0x01 /* pages can be read */
|
57
|
-
#define PROT_WRITE 0x02 /* pages can be written */
|
58
|
-
#define PROT_EXEC 0x04 /* pages can be executed */
|
59
|
-
|
60
|
-
/*
|
61
|
-
* Flags contain sharing type and options.
|
62
|
-
* Sharing types; choose one.
|
63
|
-
*/
|
64
|
-
#define MAP_SHARED 0x0001 /* share changes */
|
65
|
-
#define MAP_PRIVATE 0x0002 /* changes are private */
|
66
|
-
#define MAP_COPY MAP_PRIVATE /* Obsolete */
|
67
|
-
|
68
|
-
/*
|
69
|
-
* Other flags
|
70
|
-
*/
|
71
|
-
#define MAP_FIXED 0x0010 /* map addr must be exactly as requested */
|
72
|
-
#define MAP_RENAME 0x0020 /* Sun: rename private pages to file */
|
73
|
-
#define MAP_NORESERVE 0x0040 /* Sun: don't reserve needed swap area */
|
74
|
-
#define MAP_INHERIT 0x0080 /* region is retained after exec */
|
75
|
-
#define MAP_NOEXTEND 0x0100 /* for MAP_FILE, don't change file size */
|
76
|
-
#define MAP_HASSEMAPHORE 0x0200 /* region may contain semaphores */
|
77
|
-
#define MAP_STACK 0x0400 /* region grows down, like a stack */
|
78
|
-
#define MAP_NOSYNC 0x0800 /* page to but do not sync underlying file */
|
79
|
-
|
80
|
-
/*
|
81
|
-
* Extended flags
|
82
|
-
*/
|
83
|
-
#define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */
|
84
|
-
|
85
|
-
#ifdef _P1003_1B_VISIBLE
|
86
|
-
/*
|
87
|
-
* Process memory locking
|
88
|
-
*/
|
89
|
-
#define MCL_CURRENT 0x0001 /* Lock only current memory */
|
90
|
-
#define MCL_FUTURE 0x0002 /* Lock all future memory as well */
|
91
|
-
|
92
|
-
#endif /* _P1003_1B_VISIBLE */
|
93
|
-
|
94
|
-
/*
|
95
|
-
* Error return from mmap()
|
96
|
-
*/
|
97
|
-
#define MAP_FAILED ((void *)-1)
|
98
|
-
|
99
|
-
/*
|
100
|
-
* msync() flags
|
101
|
-
*/
|
102
|
-
#define MS_SYNC 0x0000 /* msync synchronously */
|
103
|
-
#define MS_ASYNC 0x0001 /* return immediately */
|
104
|
-
#define MS_INVALIDATE 0x0002 /* invalidate all cached data */
|
105
|
-
|
106
|
-
|
107
|
-
/*
|
108
|
-
* Mapping type
|
109
|
-
*/
|
110
|
-
#define MAP_FILE 0x0000 /* map from file (default) */
|
111
|
-
#define MAP_ANON 0x1000 /* allocated from memory, swap space */
|
112
|
-
|
113
|
-
/*
|
114
|
-
* Advice to madvise
|
115
|
-
*/
|
116
|
-
#define MADV_NORMAL 0 /* no further special treatment */
|
117
|
-
#define MADV_RANDOM 1 /* expect random page references */
|
118
|
-
#define MADV_SEQUENTIAL 2 /* expect sequential page references */
|
119
|
-
#define MADV_WILLNEED 3 /* will need these pages */
|
120
|
-
#define MADV_DONTNEED 4 /* dont need these pages */
|
121
|
-
#define MADV_FREE 5 /* dont need these pages, and junk contents */
|
122
|
-
#define MADV_NOSYNC 6 /* try to avoid flushes to physical media */
|
123
|
-
#define MADV_AUTOSYNC 7 /* revert to default flushing strategy */
|
124
|
-
#define MADV_NOCORE 8 /* do not include these pages in a core file */
|
125
|
-
#define MADV_CORE 9 /* revert to including pages in a core file */
|
126
|
-
|
127
|
-
/*
|
128
|
-
* Return bits from mincore
|
129
|
-
*/
|
130
|
-
#define MINCORE_INCORE 0x1 /* Page is incore */
|
131
|
-
#define MINCORE_REFERENCED 0x2 /* Page has been referenced by us */
|
132
|
-
#define MINCORE_MODIFIED 0x4 /* Page has been modified by us */
|
133
|
-
#define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */
|
134
|
-
#define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */
|
135
|
-
|
136
|
-
#ifndef _KERNEL
|
137
|
-
|
138
|
-
#include <sys/cdefs.h>
|
139
|
-
|
140
|
-
__BEGIN_DECLS
|
141
|
-
#ifdef _P1003_1B_VISIBLE
|
142
|
-
int mlockall __P((int));
|
143
|
-
int munlockall __P((void));
|
144
|
-
int shm_open __P((const char *, int, mode_t));
|
145
|
-
int shm_unlink __P((const char *));
|
146
|
-
#endif /* _P1003_1B_VISIBLE */
|
147
|
-
int mlock __P((const void *, size_t));
|
148
|
-
#ifndef _MMAP_DECLARED
|
149
|
-
#define _MMAP_DECLARED
|
150
|
-
void * mmap __P((void *, size_t, int, int, int, off_t));
|
151
|
-
#endif
|
152
|
-
int mprotect __P((const void *, size_t, int));
|
153
|
-
int msync __P((void *, size_t, int));
|
154
|
-
int munlock __P((const void *, size_t));
|
155
|
-
int munmap __P((void *, size_t));
|
156
|
-
#ifndef _POSIX_SOURCE
|
157
|
-
int madvise __P((void *, size_t, int));
|
158
|
-
int mincore __P((const void *, size_t, unsigned char *));
|
159
|
-
int minherit __P((void *, size_t, int));
|
160
|
-
#endif
|
161
|
-
|
162
|
-
/* XXX Emscripten */
|
163
|
-
void *mremap(void *old_address, size_t old_size , size_t new_size, unsigned long flags);
|
164
|
-
|
165
|
-
__END_DECLS
|
166
|
-
|
167
|
-
#endif /* !_KERNEL */
|
168
|
-
|
169
|
-
#endif
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
@@ -1,70 +0,0 @@
|
|
1
|
-
/*-
|
2
|
-
* Copyright (c) 1994
|
3
|
-
* The Regents of the University of California. All rights reserved.
|
4
|
-
*
|
5
|
-
* This code is derived from software contributed to Berkeley by
|
6
|
-
* Chuck Karish of Mindcraft, Inc.
|
7
|
-
*
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
9
|
-
* modification, are permitted provided that the following conditions
|
10
|
-
* are met:
|
11
|
-
* 1. Redistributions of source code must retain the above copyright
|
12
|
-
* notice, this list of conditions and the following disclaimer.
|
13
|
-
* 2. Redistributions in binary form must reproduce the above copyright
|
14
|
-
* notice, this list of conditions and the following disclaimer in the
|
15
|
-
* documentation and/or other materials provided with the distribution.
|
16
|
-
* 3. All advertising materials mentioning features or use of this software
|
17
|
-
* must display the following acknowledgement:
|
18
|
-
* This product includes software developed by the University of
|
19
|
-
* California, Berkeley and its contributors.
|
20
|
-
* 4. Neither the name of the University nor the names of its contributors
|
21
|
-
* may be used to endorse or promote products derived from this software
|
22
|
-
* without specific prior written permission.
|
23
|
-
*
|
24
|
-
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
25
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
26
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
27
|
-
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
28
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
29
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
30
|
-
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
31
|
-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
32
|
-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
33
|
-
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
34
|
-
* SUCH DAMAGE.
|
35
|
-
*
|
36
|
-
* @(#)utsname.h 8.1 (Berkeley) 1/4/94
|
37
|
-
* $FreeBSD: src/sys/sys/utsname.h,v 1.7 1999/12/29 04:24:49 peter Exp $
|
38
|
-
*/
|
39
|
-
|
40
|
-
#ifndef _SYS_UTSNAME_H
|
41
|
-
#define _SYS_UTSNAME_H
|
42
|
-
|
43
|
-
#define SYS_NMLN 32
|
44
|
-
|
45
|
-
struct utsname {
|
46
|
-
char sysname[SYS_NMLN]; /* Name of this OS. */
|
47
|
-
char nodename[SYS_NMLN]; /* Name of this network node. */
|
48
|
-
char release[SYS_NMLN]; /* Release level. */
|
49
|
-
char version[SYS_NMLN]; /* Version level. */
|
50
|
-
char machine[SYS_NMLN]; /* Hardware type. */
|
51
|
-
};
|
52
|
-
|
53
|
-
|
54
|
-
#include <sys/cdefs.h>
|
55
|
-
|
56
|
-
|
57
|
-
#ifndef _KERNEL
|
58
|
-
#ifdef __STDC__
|
59
|
-
__BEGIN_DECLS
|
60
|
-
int uname __P((struct utsname *));
|
61
|
-
__END_DECLS
|
62
|
-
#else
|
63
|
-
extern int uname();
|
64
|
-
#endif
|
65
|
-
#else
|
66
|
-
extern struct utsname utsname;
|
67
|
-
#endif /* _KERNEL */
|
68
|
-
|
69
|
-
#endif /* !_SYS_UTSNAME_H */
|
70
|
-
|
@@ -1,31 +0,0 @@
|
|
1
|
-
#ifndef _DLFCN_H_INCLUDED
|
2
|
-
#define _DLFCN_H_INCLUDED
|
3
|
-
|
4
|
-
#ifdef __cplusplus
|
5
|
-
extern "C" {
|
6
|
-
#endif
|
7
|
-
|
8
|
-
#define RTLD_DEFAULT 0
|
9
|
-
#define RTLD_LAZY 1
|
10
|
-
#define RTLD_NOW 2
|
11
|
-
#define RTLD_GLOBAL 4
|
12
|
-
#define RTLD_LOCAL 8
|
13
|
-
|
14
|
-
typedef struct {
|
15
|
-
const char *dli_fname;
|
16
|
-
void *dli_fbase;
|
17
|
-
const char *dli_sname;
|
18
|
-
void *dli_saddr;
|
19
|
-
} Dl_info;
|
20
|
-
|
21
|
-
void *dlopen(const char *, int);
|
22
|
-
void *dlsym(void *, const char *);
|
23
|
-
int dlclose(void *);
|
24
|
-
char *dlerror(void);
|
25
|
-
int dladdr(void *addr, Dl_info *info);
|
26
|
-
|
27
|
-
#ifdef __cplusplus
|
28
|
-
}
|
29
|
-
#endif
|
30
|
-
|
31
|
-
#endif
|