Bug 149031

Summary: Implement global variables in WebAssembly
Product: WebKit Reporter: Sukolsak Sakshuwong <sukolsak>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, fpizlo, ggaren, mark.lam, sbarati, sukolsak
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 146064    
Attachments:
Description Flags
Patch
none
Patch none

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)