- 23 Jan, 2018 2 commits
-
-
Ben L. Titzer authored
R=clemensh@chromium.org,mstarzinger@chromium.org Bug: Change-Id: I1bc451f4d6f70f69e91217d3e44cecedcbdf07d4 Reviewed-on: https://chromium-review.googlesource.com/880951Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#50806}
-
Ben L. Titzer authored
As per TODO, this is its rightful place, which gets the module-compiler out of the business of doing finalization. R=mstarzinger@chromium.org,clemensh@chromium.org Bug: v8:7316 Change-Id: Ie419a1e348f14f2613f62fed7083e19365cd9347 Reviewed-on: https://chromium-review.googlesource.com/880950Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#50805}
-
- 16 Jan, 2018 3 commits
-
-
Ben L. Titzer authored
The WebAssembly JS API specification [1] covers the JS-visible side-effects of executing a grow_memory operation and states that a successful grow operation should always detach any prior array buffer. [1] https://github.com/WebAssembly/spec/blob/master/document/js-api/index.bs R=mstarzinger@chromium.org,gdeepti@chromium.org Bug: Change-Id: Ib9232e01209ba546c0bba1c9408c92da60ff6d92 Reviewed-on: https://chromium-review.googlesource.com/860011Reviewed-by:
Deepti Gandluri <gdeepti@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#50627}
-
Clemens Hammacher authored
Both tables are always updated together and are always accessed together. Thus merge them, reducing code complexity, but also code space and overhead for accessing them during runtime. Instead of two weak global handles, we only need one, which also means one less load for each indirect call. Merging them also improves cache locality, since signature and code address are not stored next to each other in memory, so they will very likely end up in the same cache line. R=titzer@chromium.org Change-Id: I862df7de93a98aa602a3895796610c2c520d6f21 Reviewed-on: https://chromium-review.googlesource.com/866868 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#50623}
-
Clemens Hammacher authored
Make this a member method of WasmTableObject, because it is pretty coupled with that object anyways, and is always being called together with WasmTableObject::Set or WasmTableObject::AddDispatchTable. It also simplifies another refactoring: https://crrev.com/c/866733 R=titzer@chromium.org Change-Id: I53392fb9cf21f2e45c2a144d180e9b3614657094 Reviewed-on: https://chromium-review.googlesource.com/866933Reviewed-by:
Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50605}
-
- 11 Jan, 2018 2 commits
-
-
Ben L. Titzer authored
R=ahaas@chromium.org Bug: Change-Id: I3817745013828d455ca1b623724d8789cc5f01ce Reviewed-on: https://chromium-review.googlesource.com/860643Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#50510}
-
Ben L. Titzer authored
This CL centralizes constants related to decoding from several places into one place and makes it no longer necessary to include wasm-opcodes.h for some simple constants. R=clemensh@chromium.org Bug: Change-Id: I53aa81e34167df467bc7455b717bf67083033943 Reviewed-on: https://chromium-review.googlesource.com/859764 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50503}
-
- 05 Jan, 2018 1 commit
-
-
Clemens Hammacher authored
Even though kSpecMaxWasmMemoryPages == WasmModule::kPageSize, the computation {wasm::kV8MaxWasmMemoryPages * wasm::kSpecMaxWasmMemoryPages} is semantically wrong. R=titzer@chromium.org Change-Id: If4a875c714f1ca3c1fc928ec79b8be8aab62e8d0 Reviewed-on: https://chromium-review.googlesource.com/850072Reviewed-by:
Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50375}
-
- 21 Dec, 2017 1 commit
-
-
Brad Nelson authored
R=eholk@chromium.org,mlippautz@chromium.org B=https://bugs.chromium.org/p/chromium/issues/detail?id=775047 Change-Id: Ia3b2f51d6cb4dabbf0f1f9ec78ecb8935775f53a Reviewed-on: https://chromium-review.googlesource.com/809165 Commit-Queue: Brad Nelson <bradnelson@chromium.org> Commit-Queue: Eric Holk <eholk@chromium.org> Reviewed-by:
Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#50254}
-
- 20 Dec, 2017 2 commits
-
-
Mircea Trofin authored
Bug: chromium:796584 Change-Id: Ib6a62d616d36344f35cad0b0a177f8f07c7fd2ac Reviewed-on: https://chromium-review.googlesource.com/836849Reviewed-by:
Brad Nelson <bradnelson@chromium.org> Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Cr-Commit-Position: refs/heads/master@{#50244}
-
Clemens Hammacher authored
We were passing a pointer to an object allocated as {InterpretedFrameImpl} in an {std::unique_ptr<InterpretedFrame>}. The default deleter then called {delete ptr;} on a ptr of type {InterpretedFrame*}, even though that object was allocated as {InterpretedFrameImpl}. This error might caught by validators. Fix this by passing a custom deleter on the unique_ptr. R=ahaas@chromium.org, ulan@chromium.org Bug: v8:7231 Change-Id: Ia18114236384813c4878319209ae4535fda56c41 Reviewed-on: https://chromium-review.googlesource.com/834510Reviewed-by:
Andreas Haas <ahaas@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50226}
-
- 18 Dec, 2017 5 commits
-
-
Clemens Hammacher authored
The WasmCompiledModule is kept alive from the Script, which again is kept alive then the debugger is enabled. This, however, should not keep the whole context alive, including the global object. Hence, we only store a weak reference to the native context. R=ahaas@chromium.org Bug: chromium:750256 Change-Id: Ia409995c40fb3e90665534fbc94c6eafc081c4e5 Reviewed-on: https://chromium-review.googlesource.com/832126 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#50174}
-
Clemens Hammacher authored
The interface of {WasmCompiledModule} currently mostly receives and provides handles to the contained data. Other interfaces don't (see {object-macros.h}. This leads to performance and memory overhead for chained accesses like {instance->compiled_module()->shared()->script()}, because intermediate accessors allocate Handles for no reason. It also breaks the constraints that lower-case accessors should be trivial to execute, but allocating a handle is not trivial (should not be done in a loop if not needed). It also silences gcmole errors, as documented in https://crrev.com/c/832268. R=ahaas@chromium.org, mtrofin@chromium.org Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Ib82fb295977a47b4a8ab9bae9c9b6e2b235ad5e5 Reviewed-on: https://chromium-review.googlesource.com/832387 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Mircea Trofin <mtrofin@chromium.org> Cr-Commit-Position: refs/heads/master@{#50173}
-
Clemens Hammacher authored
Add additional protection against OOB accesses by masking the index to access by a mask precomputed from the memory size. R=clemensh@chromium.org, bradnelson@chromium.org Change-Id: I1d5875121e1904074b115a2c88ca773b6c1c1a66 Reviewed-on: https://chromium-review.googlesource.com/830394Reviewed-by:
Andreas Haas <ahaas@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50162}
-
Clemens Hammacher authored
We had a number of accessors defined on {WasmCompiledModule}, which redirected to {WasmSharedModuleData}. This is uncommon in the code base and hides where information is really stored. This CL removes them and accesses information directly from the {WasmSharedModuleData} instead. R=ahaas@chromium.org Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I54fce75dbf7dcb2f16dcf13e4634b5618225a429 Reviewed-on: https://chromium-review.googlesource.com/831510Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50157}
-
Clemens Hammacher authored
Many methods currently defined in WasmCompiledModule actually only use shared information from WasmSharedModuleData. Hence, move them to this class. R=ahaas@chromium.org Bug: chromium:750256 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Ia298306c3757fca8e2d93eaaf3424d6f91150212 Reviewed-on: https://chromium-review.googlesource.com/831509Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50156}
-
- 15 Dec, 2017 1 commit
-
-
Ben L. Titzer authored
Bug: Change-Id: I1f4a9d06e91a0523e590a77f8073800d6f1994d6 Reviewed-on: https://chromium-review.googlesource.com/830393 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50140}
-
- 09 Dec, 2017 1 commit
-
-
https://crrev.com/c/802322Eric Holk authored
Bug: v8:7143 Change-Id: Ie8eee40ba1761a5790dc67a8ce03d2b2cb949722 Reviewed-on: https://chromium-review.googlesource.com/815677 Commit-Queue: Eric Holk <eholk@chromium.org> Reviewed-by:
Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#49975}
-
- 07 Dec, 2017 1 commit
-
-
Karl Schimpf authored
The previous code assumed that trap handling was a global concept, defined by function trap_handler::UseTrapHandler(). This CL does the first step in changing the decision to be specifiable at a module level. Therefore trap_handler::UseTrapHandler() is replaced by trap_handler::IsTrapHandlerEnabled(), and communicates if compilation supports the use of trap handlers (but still allowing the use of bounds checking on memory accesses). It then refactors the classes ModuleEnv and WasmCompiledModule to have a field "use_trap_handler" that specifies if traps should be used for the memory accesses in the module being compiled. Bug: v8:7143 Change-Id: I9844842d5721c86c2dd55e911b42bf8b9922cf63 Reviewed-on: https://chromium-review.googlesource.com/802322 Commit-Queue: Eric Holk <eholk@chromium.org> Reviewed-by:
Ben Titzer <titzer@chromium.org> Reviewed-by:
Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#49915}
-
- 28 Nov, 2017 4 commits
-
-
Mircea Trofin authored
This reverts commit b301203e. Reason for revert: Fixed issues on arm. Original change's description: > Revert "[wasm] JIT using WasmCodeManager" > > This reverts commit d4c8393c. > > Reason for revert: Breaks ARM hardware: > https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/5268 > > Original change's description: > > [wasm] JIT using WasmCodeManager > > > > This is the first step towards wasm code sharing. This CL moves wasm > > code generation outside the JavaScript GC heap using the previously - > > introduced WasmCodeManager (all this, behind the --wasm-jit-to-native > > flag). > > > > See design document: go/wasm-on-native-heap-stage-1 > > > > This CL doesn't change other wasm architectural invariants. We still > > have per-Isolate wasm code generation, and per-wasm module instance > > code specialization. > > > > Bug:v8:6876 > > > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng > > Change-Id: I1e08cecad75f93fb081545c31228a4568be276d3 > > Reviewed-on: https://chromium-review.googlesource.com/674086 > > Reviewed-by: Ben Titzer <titzer@chromium.org> > > Reviewed-by: Eric Holk <eholk@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#49689} > > TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org,eholk@chromium.org > > Change-Id: I89af1ea5decd841bc12cd2ceaf74d32bc4433885 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: v8:6876 > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng > Reviewed-on: https://chromium-review.googlesource.com/794690 > Reviewed-by: Michael Achenbach <machenbach@chromium.org> > Commit-Queue: Michael Achenbach <machenbach@chromium.org> > Cr-Commit-Position: refs/heads/master@{#49691} TBR=bradnelson@chromium.org,machenbach@chromium.org,titzer@chromium.org,mtrofin@chromium.org,eholk@chromium.org Change-Id: I1b07638d1bb2ba0664305b4b2dcfc1342dc8444f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6876 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Reviewed-on: https://chromium-review.googlesource.com/794434 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Mircea Trofin <mtrofin@chromium.org> Cr-Commit-Position: refs/heads/master@{#49692}
-
Michael Achenbach authored
This reverts commit d4c8393c. Reason for revert: Breaks ARM hardware: https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/5268 Original change's description: > [wasm] JIT using WasmCodeManager > > This is the first step towards wasm code sharing. This CL moves wasm > code generation outside the JavaScript GC heap using the previously - > introduced WasmCodeManager (all this, behind the --wasm-jit-to-native > flag). > > See design document: go/wasm-on-native-heap-stage-1 > > This CL doesn't change other wasm architectural invariants. We still > have per-Isolate wasm code generation, and per-wasm module instance > code specialization. > > Bug:v8:6876 > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng > Change-Id: I1e08cecad75f93fb081545c31228a4568be276d3 > Reviewed-on: https://chromium-review.googlesource.com/674086 > Reviewed-by: Ben Titzer <titzer@chromium.org> > Reviewed-by: Eric Holk <eholk@chromium.org> > Cr-Commit-Position: refs/heads/master@{#49689} TBR=bradnelson@chromium.org,titzer@chromium.org,mtrofin@chromium.org,eholk@chromium.org Change-Id: I89af1ea5decd841bc12cd2ceaf74d32bc4433885 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6876 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Reviewed-on: https://chromium-review.googlesource.com/794690Reviewed-by:
Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#49691}
-
Mircea Trofin authored
This is the first step towards wasm code sharing. This CL moves wasm code generation outside the JavaScript GC heap using the previously - introduced WasmCodeManager (all this, behind the --wasm-jit-to-native flag). See design document: go/wasm-on-native-heap-stage-1 This CL doesn't change other wasm architectural invariants. We still have per-Isolate wasm code generation, and per-wasm module instance code specialization. Bug:v8:6876 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I1e08cecad75f93fb081545c31228a4568be276d3 Reviewed-on: https://chromium-review.googlesource.com/674086Reviewed-by:
Ben Titzer <titzer@chromium.org> Reviewed-by:
Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#49689}
-
Clemens Hammacher authored
There are several places where we extract function information (instance and function index) from the deoptimization data. Add a central method to do this. Drive-by: Move {AttachWasmFunctionInfo} from wasm-compiler.h to wasm-objects.h. R=titzer@chromium.org Change-Id: I768d2c9aa8049f75a6be02242b1fe524ff42e3e4 Reviewed-on: https://chromium-review.googlesource.com/793046Reviewed-by:
Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#49682}
-
- 22 Nov, 2017 1 commit
-
-
Clemens Hammacher authored
R=eholk@chromium.org Change-Id: Iad3d1f0859c482c566cf86a32cf95a84c89b96e6 Reviewed-on: https://chromium-review.googlesource.com/782721Reviewed-by:
Eric Holk <eholk@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#49563}
-
- 20 Nov, 2017 3 commits
-
-
Mircea Trofin authored
This is a reland of c71fd20c Original change's description: > [wasm] Data structures for JIT-ing wasm to native memory. > > This CL introduces the structures for JIT-ing wasm on the native heap. > They are described in detail at go/wasm-on-native-heap-stage-1 > > Briefly: > - WasmCodeManager manages memory for modules and offers an interior > pointer lookup (i.e. PC -> WasmCode) > - WasmCode represents code, including reloc info. It holds wasm > specific data, like function index, and runtime information, like trap > handler info. > - NativeModule manages memory for one module. > > Tests cover the allocation and lookup aspects, following that current > regression tests cover the JITed code. A separate CL will enable > JITing using the new data structures. > > Bug: v8:6876 > Change-Id: I1731238409001fe97c97eafb7a12fd3922da6a42 > Reviewed-on: https://chromium-review.googlesource.com/767581 > Commit-Queue: Mircea Trofin <mtrofin@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Ben Titzer <titzer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#49501} Bug: v8:6876 Change-Id: Ifd1a4c23de8150dbdc75f059cd657e9670b15c9b Reviewed-on: https://chromium-review.googlesource.com/779680 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Brad Nelson <bradnelson@chromium.org> Cr-Commit-Position: refs/heads/master@{#49512}
-
Mircea Trofin authored
This reverts commit c71fd20c. Reason for revert: msvc is unhappy (https://build.chromium.org/p/client.v8/builders/V8%20Win64%20-%20msvc/builds/208) Original change's description: > [wasm] Data structures for JIT-ing wasm to native memory. > > This CL introduces the structures for JIT-ing wasm on the native heap. > They are described in detail at go/wasm-on-native-heap-stage-1 > > Briefly: > - WasmCodeManager manages memory for modules and offers an interior > pointer lookup (i.e. PC -> WasmCode) > - WasmCode represents code, including reloc info. It holds wasm > specific data, like function index, and runtime information, like trap > handler info. > - NativeModule manages memory for one module. > > Tests cover the allocation and lookup aspects, following that current > regression tests cover the JITed code. A separate CL will enable JITing > using the new data structures. > > Bug: v8:6876 > Change-Id: I1731238409001fe97c97eafb7a12fd3922da6a42 > Reviewed-on: https://chromium-review.googlesource.com/767581 > Commit-Queue: Mircea Trofin <mtrofin@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Ben Titzer <titzer@chromium.org> > Cr-Commit-Position: refs/heads/master@{#49501} TBR=bradnelson@chromium.org,ulan@chromium.org,mstarzinger@chromium.org,titzer@chromium.org,mtrofin@chromium.org,mlippautz@chromium.org Change-Id: Id54deb74782c6f0fd06c61ddcabb727eb7010333 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6876 Reviewed-on: https://chromium-review.googlesource.com/779679Reviewed-by:
Mircea Trofin <mtrofin@chromium.org> Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Cr-Commit-Position: refs/heads/master@{#49503}
-
Mircea Trofin authored
This CL introduces the structures for JIT-ing wasm on the native heap. They are described in detail at go/wasm-on-native-heap-stage-1 Briefly: - WasmCodeManager manages memory for modules and offers an interior pointer lookup (i.e. PC -> WasmCode) - WasmCode represents code, including reloc info. It holds wasm specific data, like function index, and runtime information, like trap handler info. - NativeModule manages memory for one module. Tests cover the allocation and lookup aspects, following that current regression tests cover the JITed code. A separate CL will enable JITing using the new data structures. Bug: v8:6876 Change-Id: I1731238409001fe97c97eafb7a12fd3922da6a42 Reviewed-on: https://chromium-review.googlesource.com/767581 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Reviewed-by:
Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#49501}
-
- 31 Oct, 2017 1 commit
-
-
Mircea Trofin authored
This both simplifies the code, and brings it in-line with what we need for wasm on the native heap. Bug: v8:6876 Change-Id: Ia48aed86ddcd94e85c0aecc053c327dfacb795d6 Reviewed-on: https://chromium-review.googlesource.com/744593 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Commit-Queue: Brad Nelson <bradnelson@chromium.org> Reviewed-by:
Brad Nelson <bradnelson@chromium.org> Cr-Commit-Position: refs/heads/master@{#49048}
-
- 25 Oct, 2017 1 commit
-
-
Ben L. Titzer authored
R=clemensh@chromium.org Bug: Change-Id: I0c92aa07e10dcd1e9d9fd34dcaf23885076721b0 Reviewed-on: https://chromium-review.googlesource.com/735724 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#48922}
-
- 20 Oct, 2017 1 commit
-
-
Ben Smith authored
The wasm memory deserialization didn't properly increment the object id, so wouldn't work properly if the memory object (or its contained SharedArrayBuffer) where included multiple times in the object. Bug: v8:6895 Change-Id: I5c4c25bad2ec6152883c5a7321038aba1950480a Reviewed-on: https://chromium-review.googlesource.com/721630Reviewed-by:
Deepti Gandluri <gdeepti@chromium.org> Commit-Queue: Ben Smith <binji@chromium.org> Cr-Commit-Position: refs/heads/master@{#48767}
-
- 16 Oct, 2017 2 commits
-
-
Ben L. Titzer authored
With the introduction of the WasmContext, compiled code is no longer specialized to the memory start and size (or recently, globals_start). This CL uses the same WasmContext between the interpreter and compiled code, removing the need for UpdateMemory() and cached instance info. R=clemensh@chromium.org Bug: Change-Id: I0bd52352c9b6f3029246e94e239dc29f635e7920 Reviewed-on: https://chromium-review.googlesource.com/712734 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#48584}
-
Ben L. Titzer authored
This CL removes the code specialization for WASM functions that access globals. Previously, we were embedding the start address of the globals memory (globals_start) as a constant in the code, which required patching for every instance. We now put this base in to the WasmContext, which is available as a parameter to every WasmFunction. R=ahaas@chromium.org, CC=mtrofin@chromium.org Bug: Change-Id: I04bb739e898cc5a3b7dd081cc166483022d113fd Reviewed-on: https://chromium-review.googlesource.com/712595 Commit-Queue: Ben Titzer <titzer@chromium.org> Reviewed-by:
Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Reviewed-by:
Bill Budge <bbudge@chromium.org> Cr-Commit-Position: refs/heads/master@{#48581}
-
- 04 Oct, 2017 1 commit
-
-
Ben L. Titzer authored
This CL also removes the v8::internal::wasm::testing namespace, which had methods that were defined in wasm-module.h, moving them to be *ForTesting methods on the corresponding WASM heap objects. R=clemensh@chromium.org Bug: v8:6877 Change-Id: I1b346ec64d93ee3a122b8f7e69772cfe98371754 Reviewed-on: https://chromium-review.googlesource.com/695523Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#48286}
-
- 28 Sep, 2017 2 commits
-
-
Enrico Bacis authored
The WasmContext struct introduced in this CL is used to store the mem_size and mem_start address of the wasm memory. These variables can be accessed at C++ level at graph build time (e.g., initialized during instance building). When the GrowMemory runtime is invoked, the context variables can be changed in the WasmContext at C++ level so that the generated code will load the correct values. This requires to insert a relocatable pointer only in the JSToWasmWrapper (and in the other wasm entry points), the value is then passed from function to function as an automatically added additional parameter. The WasmContext is then dropped when creating an Interpreter Entry or when invoking a JavaScript function. This removes the need of patching the generated code at runtime (i.e., when the memory grows) with respect to WASM_MEMORY_REFERENCE and WASM_MEMORY_SIZE_REFERENCE. However, we still need to patch the code at instance build time to patch the JSToWasmWrappers; in fact the address of the WasmContext is not known during compilation, but only when the instance is built. The WasmContext address is passed as the first parameter. This has the advantage of not having to move the WasmContext around if the function does not use many registers. This CL also changes the wasm calling convention so that the first parameter register is different from the return value register. The WasmContext is attached to every WasmMemoryObject, to share the same context with multiple instances sharing the same memory. Moreover, the nodes representing the WasmContext variables are cached in the SSA environment, similarly to other local variables that might change during execution. The nodes are created when initializing the SSA environment and refreshed every time a grow_memory or a function call happens, so that we are sure that they always represent the correct mem_size and mem_start variables. This CL also removes the WasmMemorySize runtime (since it's now possible to directly retrieve mem_size from the context) and simplifies the GrowMemory runtime (since every instance now has a memory_object). R=ahaas@chromium.org,clemensh@chromium.org CC=gdeepti@chromium.org Change-Id: I3f058e641284f5a1bbbfc35a64c88da6ff08e240 Reviewed-on: https://chromium-review.googlesource.com/671008 Commit-Queue: Enrico Bacis <enricobacis@google.com> Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#48209}
-
Ben L. Titzer authored
Note that this also makes it possible to move several classes into the module-compiler.cc file and inline their implementations. This also allows removing several uses of wasm-module.h from other places in V8 that include wasm-objects.h. R=yangguo@chromium.org,clemensh@chromium.org,ahaas@chromium.org Bug: Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I303ee2bb49dc53c951d377a1b65699c1e0e91da7 Reviewed-on: https://chromium-review.googlesource.com/687494Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#48204}
-
- 27 Sep, 2017 1 commit
-
-
Ben L. Titzer authored
These functions clearly belong closer to respective classes in wasm-objects.h. R=clemensh@chromium.org Bug: Change-Id: I46117b15181d33b237f4cdf318ce66ddb18d96bd Reviewed-on: https://chromium-review.googlesource.com/684594Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#48183}
-
- 19 Sep, 2017 1 commit
-
-
Mircea Trofin authored
Sanitize imports before we start the instance building process. This avoids the possibility of exiting to JS while building instances, and allowing JS to observe an inconsistent state of the wasm world - e.g. incomplete specialization chains. We now validate we never exit to JS during that process. Bug: chromium:766260 Change-Id: I34930c8b70bdac16af464b3f62a2b6a38107acb3 Reviewed-on: https://chromium-review.googlesource.com/671480 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Eric Holk <eholk@chromium.org> Cr-Commit-Position: refs/heads/master@{#48074}
-
- 11 Sep, 2017 1 commit
-
-
Deepti Gandluri authored
- Memory.Grow with guard pages enabled should adjust amount of allocated memory, and not allocate a new buffer. This was disabled because previously the backing store was freed in the MemoryFinalizer, and we needed to be sure that the backing store is not released till the last buffer using it is released. This is now safe as we no longer use the MemoryFinalizer - SetProtection should use Guard/Unprotect that use mprotect underneath, instead of CommitRegion/UncommitRegion that use mmap - Move buffer allocation to the end to avoid inconsistent memory due to GC BUG=v8:5886 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I0d7edb884bd1e3167eb5fbced6953c6401688d40 Reviewed-on: https://chromium-review.googlesource.com/629517Reviewed-by:
Brad Nelson <bradnelson@chromium.org> Reviewed-by:
Eric Holk <eholk@chromium.org> Commit-Queue: Deepti Gandluri <gdeepti@chromium.org> Cr-Commit-Position: refs/heads/master@{#47960}
-
- 08 Sep, 2017 2 commits
-
-
Aseem Garg authored
This is revert of commit aee1e1fb with the fix for A1 and N6 jetstream failure. R=bradnelson@chromium.org,mtrofin@chromium.org,clemensh@chromium.org Bug: chromium:750828 Change-Id: Id38896af51315f76a0667ace32c77a2ba7287eec Reviewed-on: https://chromium-review.googlesource.com/607092 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Brad Nelson <bradnelson@chromium.org> Cr-Commit-Position: refs/heads/master@{#47910}
-
Mircea Trofin authored
The previous design assumed we can't possibly have a cycle involving an instance, however, we can. For example: a script can reference an instance, which ends up referencing the native context because of how we generate wasm-to-js wrappers; that references the global object, which then references the script. A global handle to the indirect function table can then root such a cycle. That means the instance is never collected, which never deletes the global handle. This change addresses that by making the handles weak. Bug: Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ief7263af83974bf96505a4fba65d162474fe7c7c Reviewed-on: https://chromium-review.googlesource.com/653852 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Reviewed-by:
Brad Nelson <bradnelson@chromium.org> Reviewed-by:
Aseem Garg <aseemgarg@chromium.org> Cr-Commit-Position: refs/heads/master@{#47909}
-