https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
260b4f3 More work on new JS FFI 19 December 2019, 06:20:23 UTC
0a9b92c WIP: Integrate JS objects into the julia type hierarchy 16 December 2019, 11:24:36 UTC
cd659b4 Add support for foreigncall splatting 12 December 2019, 20:34:42 UTC
2810381 Add await support to js macro `@js await foo()` will pause the current (julia) task until the completion of the (JavaScript) promise returned by `foo()`. 09 December 2019, 22:56:45 UTC
857c22c Fix tasking with return value 09 December 2019, 20:17:25 UTC
1fb5965 bugfix 09 December 2019, 04:33:29 UTC
6719789 Fix rebase for tasking 09 December 2019, 03:54:37 UTC
c1af2df [WASM branch] Better JS FFI This improves the JS FFI a bit to make it able to better handle some practical cases of interest, as well as fixing some bugs. In particular the `@jscall` macro has been renamed to @js and now supports on the flag construction of JavaScript objects, using a JS-like syntax, e.g. ```julia obj = @js {some: "value:, hello: "world"} @js console.log(obj) ``` An example where this is useful is e.g. in making a HTTP request using fetch: ```julia @js fetch("https://github.com", {mode: "no-cors"}) ``` 07 December 2019, 01:58:26 UTC
ede1c9b Fix jscall 07 December 2019, 01:57:48 UTC
28587cb Fix package loading again 07 December 2019, 01:29:56 UTC
da9636d More hacks to make things work again 07 December 2019, 01:08:40 UTC
cbc2887 Fix 06 December 2019, 04:34:51 UTC
37d0681 Regenerate foreigncall interpreter 06 December 2019, 04:19:33 UTC
b65baa4 More rebase issues 05 December 2019, 23:30:29 UTC
b4fac25 Change datalayout to pretend i686 is wasm 05 December 2019, 22:55:24 UTC
d9b6c70 fix rebase 03 December 2019, 20:23:44 UTC
a191077 load Base during startup 03 December 2019, 18:12:51 UTC
8362667 WIP 03 December 2019, 18:12:51 UTC
20c4c14 use host LLVM_CONFIG for LLVM_CONFIG_ABSOLUTE 03 December 2019, 18:12:51 UTC
08b9d6b move jsobject to later in the bootstrap 03 December 2019, 18:12:51 UTC
d535cee Fix a couple bugs 03 December 2019, 18:12:51 UTC
2d2cffe Very WIP: [wasm] Bidirectional Julia/JS object access This is a start at what I think is the last major feature on the wasm porting punch list: sharing/accessing objects between Julia and the native javascript environment. This PR currently contains a rough sketch of the interpreter version of this integration, though we should of course try to get the compiled version going as soon as possible, since we now ship a compiled system image for the wasm target. For the compiled version of this we'd like to use the reference-types (https://github.com/WebAssembly/reference-types) wasm extension, which is currently in development, so even the interpreter parts are written with that extension in mind. In particular, we have a wasm table of javascript objects that represents our (indexed) managed heap of javascript objects. A boxed reference to javascript is then the julia type tag, plus an index into this table (in compiled mode an unboxed reference would just be a raw `anyref` without going through the table). The GC is responsible for managing this table of javascript objects, marking any JS objects that are reachable and sweeping the unreachable ones by nulling out the references (this part isn't implemented yet). On the julia side, we provide one julia type for every javascript builtin type ('number' corresponds to Float64 and 'boolean' to Bool, but otherwise the types are dedicated), with the non-singleton types being primitive types of pointer size to store the index into the table of javascript objects (at least semantically, as mentioned codegen will not use the table if possible). There is a bit of logic in javascript to convert these boxed representations on the julia heap into proper javascript objects, but otherwise the julia code is responsible for conversions from Julia objects to javascript objects (e.g. `String` to `JSString`, or `Ptr` to `JSNumber` - i.e. Float64). A `@jscall` macro is provided to call javascript functions from within julia. Under the hood this lowers to an `Expr(:foreigncall, ...)` with `jscall` calling convention for which we implement support in the interpreter. I don't forsee any problems with codegen for this representation, but that part is not implemented yet. For the reverse (referencing julia objects from javascript), I mostly followed what pyodide does and used a javascript `Proxy` object that wraps a boxed julia pointer (set/getproperty aren't implemented yet, but that should be straightforward). For GC integration, we make use of the (experimental) [JavaScript WeakRef](https://github.com/tc39/proposal-weakrefs) support, which essentially implements finalizers. On the julia side, I stole one of the remaining GC bits (at least one of the bits documented to be remaining - it looks like we don't overalign types sufficiently for this to actually work at the moment) to mark an object as being borrowed by the external VM and thus being protected from collection even if there is no remaining julia references. The JS side finalizer clears this bit on an object when there are no remaining references on the JS side. As always with these kinds of systems, reference cycles are not collected. I don't think there's much to be done about that, until WebAssembly gets more native integration with the JavaScript JC and we can re-use that for Julia objects. It should be noted that the WeakRef proposal is curently behind a flag in both Firefox and Chrome, but my understanding is that the timeline for this fetaure is comparable to that of the reference types proposal this builds on, so it should be ok to use (and I don't know of any other mechanism to learn whether the JS side has been collected). Remaining TODOs: - [ ] Hook up get/setproperty on the JS side - [ ] Julia GC marking/sweeping slots in the JS object table - [ ] Codegen For codegen, the major obstacle is lack of support in the toolchains (llvm, emscripten). I'm thinking it should be possible to just represent anyref as a non-integral pointer type in LLVM and get somewhere, but plumbing everything through is still a decent amount of work, that I'm unlikely to have the time for - I'm hoping somebody else will take that on. 03 December 2019, 18:12:51 UTC
b93aed6 Don't init load path on wasm, we don't have a file system 03 December 2019, 18:12:51 UTC
92f6848 Regenerate foreigncall 03 December 2019, 18:12:51 UTC
5ba8686 Move displaysize to io.jl 03 December 2019, 18:12:51 UTC
5136aef setjmp is important for the wasm abi 03 December 2019, 18:12:51 UTC
3d1e1b1 Add a helpful assertion 03 December 2019, 18:12:51 UTC
3ed6a35 Move rngseed 03 December 2019, 18:12:51 UTC
15522cf Fix the signature thing 03 December 2019, 18:12:51 UTC
0defaef WIP 03 December 2019, 18:12:51 UTC
9ed39fa WIP 03 December 2019, 18:12:51 UTC
e8f65a5 Disable COPY_STACKS on wasm This doesn't really make sense on wasm (or perhaps there's no non-COPY_STACKS mode since we're always unwinding and rewinding). 03 December 2019, 18:12:51 UTC
53c0961 Make exit more forceful 03 December 2019, 18:12:51 UTC
2cf168e Regenerate interpreter 03 December 2019, 18:12:51 UTC
f60b3ca Fix missing GC root 03 December 2019, 18:12:51 UTC
d7437d4 Fix arg type of jl_switchto 03 December 2019, 18:12:51 UTC
7fc706f Fix number of string args 03 December 2019, 18:12:51 UTC
fc33624 Fix all the things after rebase 03 December 2019, 18:12:51 UTC
586cded WIP 03 December 2019, 18:12:51 UTC
305a8e9 add JSON 03 December 2019, 18:12:51 UTC
15b0954 add PlotlyBase 03 December 2019, 18:12:51 UTC
8e455b6 add PlotlyBase 03 December 2019, 18:12:51 UTC
4ff7122 Add a fallback mechanism for loading packages 03 December 2019, 18:12:50 UTC
e5a7133 Regenerate interpreter 03 December 2019, 18:12:50 UTC
e9ecc51 Add a utility to instantiate the foreigncall rt 03 December 2019, 18:12:50 UTC
9d45a3a add back Random 03 December 2019, 18:12:50 UTC
568614a fake threadding constructs 03 December 2019, 18:12:50 UTC
d09bc8d Check in latest generated foreigncall interpreter 03 December 2019, 18:12:50 UTC
581ffbd Bugfix 03 December 2019, 18:12:50 UTC
5135419 Make interpreter-foreigncall optional 03 December 2019, 18:12:50 UTC
5417068 Don't disable MPFR in emscripten build 03 December 2019, 18:12:50 UTC
4cb21a8 Switch to autogenerated foreigncall in interpreter 03 December 2019, 18:12:50 UTC
9235975 Don't map pcre/gmp for native build 03 December 2019, 18:12:50 UTC
c22d614 Get farther 03 December 2019, 18:12:50 UTC
7773389 Allow overriding the build arch/os constants 03 December 2019, 18:12:50 UTC
4b0d0ef Wrap GMP 03 December 2019, 18:12:50 UTC
5edadde Add mapping for PCRE calls 03 December 2019, 18:12:50 UTC
f7d85c0 HACK: Manually wrap some common foreign calls in interpreter 03 December 2019, 18:12:50 UTC
2f7d12d HACK: Force emscripten to use the interpreter 03 December 2019, 18:12:50 UTC
9c7a6bf dont cache since jl_return_address not available 03 December 2019, 18:12:50 UTC
f76af9d Disable various unsupported startup things on emscripten 03 December 2019, 18:12:50 UTC
0ed9e3f Add ui/ file for wasm 03 December 2019, 18:12:50 UTC
8bed8a4 Error when trying to start a fiber on wasm 03 December 2019, 18:12:50 UTC
cd6fff6 Emscripten build fixes 03 December 2019, 18:12:50 UTC
859b81f Disable dependencies that don't currently build for emscripten 03 December 2019, 18:12:50 UTC
8f6f51d Add an option to build without libuv There is increasing interest in running Julia in environments where libuv is not available (JSVM, baremetal library OSes, etc). This adds a make file option to disable building libuv entirely and fixes up the bootstrap process to go through despite libuv not being available. There is of course a question of whether instead of this it makes sense to just port libuv to those platforms, but I suspect the answer is no, because the most core part of libuv (async sockets, the event loop, spawning processes), must either have a completely different implementation or is unavailable entirely. Particularly for JSVM it is also unlikely that libuv upstream is particularly interested, because JavaScript already runs natively in JSVM. One slightly weird part is that these platforms do generally implement POSIX where possible, so in a number of instances, I had to replace the libuv calls (which wrap POSIX calls on non-Windows platforms) by the corresponding POSIX calls. Long term I see a few options: - Expand libuv support for these new platforms - Seperate libuv into two libraries, one for async IO, process spawning, event loop etc, and one for the POSIX-compat layer on Windows. - Use POSIX calls everywhere on platforms that support it and use libuv for windows support where necessary (since windows does also implement POSIX for some things). However, until then, this build flag is useful as a basis for rebuilding these abstraction on top of the JSVM APIs and for simplifying boostrap on other platforms. However, I don't envision this to be a supported or tested configuration on platforms where libuv is otherwise available. 03 December 2019, 18:12:50 UTC
6095259 Merge remote-tracking branch 'origin/vc/llvm8wasm' into vc/wasmbase 03 December 2019, 18:09:34 UTC
9d35462 backport wasm islocal patch 03 December 2019, 18:08:27 UTC
d0f58b9 Random: RandomDevice() share /dev/[u]random file handles (#27936) 03 December 2019, 15:40:15 UTC
e86b9e4 BitVector constructor from NTuple (#33792) 03 December 2019, 15:31:18 UTC
88dfa2e filter(f, ::Tuple) (#32968) Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com> 03 December 2019, 15:26:23 UTC
8efb95c Revert "Remove JULIA_ENABLE_THREADS feature flag (#32685)" This reverts commit a18ab97f74dce6f9d116690bff89ddd73c0ce308. 03 December 2019, 15:06:42 UTC
11dc7a8 Faster map(f, ::String), issue #32687 (#33989) 03 December 2019, 14:55:16 UTC
f80c3ee Fix colon-reshaping of OffsetVector (#33890) * Fix colon-reshaping of OffsetVector * reshape(::AbstractVector, ::Colon) is a no-op 03 December 2019, 14:42:45 UTC
5e0f0df doc UUID module (#33791) 03 December 2019, 14:39:55 UTC
a7aba54 Merge remote-tracking branch 'origin/vc/staticimg' into vc/wasmbase 03 December 2019, 14:38:41 UTC
1dd225a Merge remote-tracking branch 'origin/vc/make-sysimg-bc' into vc/wasmbase 03 December 2019, 14:38:01 UTC
bc82c35 fix #33974, wrong integer types used in `jl_array_sizehint` (#34005) 03 December 2019, 09:39:45 UTC
eacff50 [WASM] load the sysimage from a linked datafile Allows linking the sysimage statically with a binary instead of loading it through a shared library, currently does not support multi-versioning. Co-authored-by: Keno Fischer <keno@juliacomputing.com> Co-authored-by: Valentin Churavy <vchuravy@mit.edu> 03 December 2019, 03:20:20 UTC
84e8392 Add match_mode example for test_logs (#33975) 03 December 2019, 02:31:21 UTC
ea56a0c add Makefile option for bc emission 02 December 2019, 23:43:39 UTC
d945adf Bump `Pkg` version to include fix to git tree hash calculation (#33985) This fixes some recently-reported issues with restrictive `umask`'s and the `Pkg.Artifacts` git tree hash calculation. X-ref: JuliaPackaging/BinaryBuilder.jl#527 02 December 2019, 21:46:50 UTC
7024cda Add pointers to test_logs macro from test_warn and test_nowarn. (#33905) 02 December 2019, 19:44:38 UTC
656f412 Docstring for one more normpath method. (#33700) * Docstring for one more normpath method. * normpath and abspath always return String. 02 December 2019, 19:44:00 UTC
25ac16b devdocs: can run the parser without full re-build (#33980) This was useful to me when working on #32071 and might be useful for others as well. 02 December 2019, 19:26:17 UTC
042f097 Minor build system fixes (#33993) * Makefile: use = instead of == for comparisons While == works in many shells, it is not standard. * Makefile: use printf to properly print colors Otherwise, the string literal is printed instead of the desired colors. 02 December 2019, 19:23:17 UTC
871bcac [build] read uninstall from manifest (#33906) This helps us uninstall the right content more generally. And this also lets us print a warning of the user's versions mismatch those in the repository (may be intentional, so we just print a warning so that the user is aware). 02 December 2019, 18:35:35 UTC
2ced6c4 fix #33987, some varargs not recognized in kwarg lowering (#33992) 02 December 2019, 17:47:43 UTC
9478574 Improve how some kind of Expr are displayed by the show method (#32423) Fix some failing doctests in doc/src/mamual/metaprogramming.md. Some other small tweaks following Jeff Bezanson suggestions (see https://github.com/JuliaLang/julia/pull/32423). Fix a bug which caused errors when trying to show stuff like "Base.@int128_str \"11111111111111111111\"". Restrict the class of "special syntax" macrocalls which benefit of the modifications this PR is about, according to discussion at https://github.com/JuliaLang/julia/pull/32423 Change how nested interpolations are displayed (omitting unrequired parenthesis). Add test for nested quotes and interpolations. Correct small bug preventing correct display of "t[a b;]". Update metaprogramming docs to better reflect changes in how quoting and unquoting get displayed. Implement quote level counting mechanism to handle displaying of Expr "with more unquotes than quotes". Add more tests for quote_level mechanism. Include unhandled case into quote_level mechanism. Add a couple of tests for exotic heads mixed with nested quoting and interpolation. Handle repr of macrocall expressions with qualified macroname argument. * Handle nested quotes and blocks. Improve test_repr macro, testing whether removing line numbers spoils something. * Add test for Rule 1, which requires Meta.parse(string(ex)) == ex. 02 December 2019, 17:46:52 UTC
d8f2427 temp cleanup: broaden try-catch block (#33996) 02 December 2019, 14:13:55 UTC
9babbf5 Remove empty _str_sizehint definition (#33953) CategoricalArrays will stop overloading this soon and this kind of hack is only appropriate for a backport anyway. 30 November 2019, 20:29:20 UTC
e2cd1ff Change llvmcall ABI representation for Float16 (#33970) Change llvmcall ABI to emit `half` for Float16 30 November 2019, 17:29:58 UTC
0b80774 optimize `Symbol` with constant string argument (#32437) 30 November 2019, 15:25:38 UTC
f814301 Bump stable version referenced in readme (#33984) 29 November 2019, 18:45:45 UTC
f39cdc0 fix typo in `setindex!` in the documentation (#33934) 29 November 2019, 01:27:17 UTC
25beaf5 Pkg: bump version (includes Pkg protocol) (#33971) 28 November 2019, 18:25:18 UTC
c7e9d9f temp cleanup: wrap rm in try-catch (#33794) 27 November 2019, 19:32:33 UTC
81fb410 update mod2pi note about 2pi behavior (#33853) 27 November 2019, 13:35:02 UTC
6d26f14 [test] remove debugging printlns (#33944) 26 November 2019, 02:01:16 UTC
31bf76f Merge pull request #33942 from JuliaLang/jn/33899 Fix a small number of invalid unsafe code [round 2] 25 November 2019, 22:55:15 UTC
back to top