Bug 149031 - Implement global variables in WebAssembly
Summary: Implement global variables in WebAssembly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 146064
  Show dependency treegraph
 
Reported: 2015-09-09 22:03 PDT by Sukolsak Sakshuwong
Modified: 2015-09-22 03:46 PDT (History)
6 users (show)

See Also:


Attachments
Patch (18.61 KB, patch)
2015-09-09 22:48 PDT, Sukolsak Sakshuwong
no flags Details | Formatted Diff | Diff
Patch (18.55 KB, patch)
2015-09-09 22:51 PDT, Sukolsak Sakshuwong
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sukolsak Sakshuwong 2015-09-09 22:03:09 PDT
Implement global variables in WebAssembly
Comment 1 Sukolsak Sakshuwong 2015-09-09 22:48:24 PDT
Created attachment 260911 [details]
Patch
Comment 2 Sukolsak Sakshuwong 2015-09-09 22:51:51 PDT
Created attachment 260912 [details]
Patch
Comment 3 Geoffrey Garen 2015-09-10 11:29:04 PDT
Comment on attachment 260912 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2015-09-10 12:34:51 PDT
Comment on attachment 260912 [details]
Patch

Clearing flags on attachment: 260912

Committed r189584: <http://trac.webkit.org/changeset/189584>
Comment 5 WebKit Commit Bot 2015-09-10 12:34:55 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Sukolsak Sakshuwong 2015-09-22 03:46:47 PDT
Global variables have been removed from the MVP.

"Mutable global variables

In the MVP, there are no global variables; C/C++ global variables are stored in linear memory and thus accessed through normal linear memory operations. Dynamic linking will add some form of immutable global variable analogous to "symbols" in native binaries. In some cases, though, it may be useful to have a fully mutable global variable which lives outside linear memory. This would allow more aggressive compiler optimizations (due to better alias information). If globals are additionally allowed array types, significant portions of memory could be moved out of linear memory which could reduce fragmentation issues. Langauges like FORTRAN which limit aliasing would be one use case. C/C++ compilers could also determine that some global variables never have their address taken." (https://github.com/WebAssembly/design/blob/master/FutureFeatures.md#mutable-global-variables)

"Postpone adding globals until dynamic linking" (https://github.com/WebAssembly/design/issues/154)