summaryrefslogtreecommitdiffstats
path: root/lld/wasm/WriterUtils.h
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Initialize memory in start functionThomas Lively2019-09-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: - `__wasm_init_memory` is now the WebAssembly start function instead of being called from `__wasm_call_ctors` or called directly by the runtime. - Adds a new synthetic data symbol `__wasm_init_memory_flag` that is atomically incremented from zero to one by the thread responsible for initializing memory. - All threads now unconditionally perform data.drop on all passive segments. - Removes --passive-segments and --active-segments flags and controls segment type based on --shared-memory instead. The deleted flags were only present to ameliorate the upgrade path in Emscripten. Reviewers: sbc100, aheejin Subscribers: dschuff, jgravelle-google, sunfish, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65783 llvm-svn: 370965
* [Coding style change][lld] Rename variables for non-ELF portsRui Ueyama2019-07-111-24/+24
| | | | | | | | | | | This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory. With this, the naming style conversion is complete for lld. Differential Revision: https://reviews.llvm.org/D64473 llvm-svn: 365730
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [WebAssembly] Add support for the event sectionHeejin Ahn2018-12-081-1/+6
| | | | | | | | | | | | | | | | | Summary: This adds support for the 'event section' specified in the exception handling proposal. Wasm exception handling binary model spec: https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md#changes-to-the-binary-model Reviewers: sbc100, ruiu Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54875 llvm-svn: 348703
* [WebAssembly] Remove `using` statements from header files. NFC.Sam Clegg2018-11-271-3/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D54758 llvm-svn: 347621
* [WebAssembly] Refactor use of signaturesDerek Schuff2018-10-031-1/+2
| | | | | | | | Update use of WebAssemblySignature to go along with D52580 Differential Revision: https://reviews.llvm.org/D52622 llvm-svn: 343734
* [WebAssembly] Add export/import for function pointer tableNicholas Wilson2018-03-271-0/+2
| | | | | | | | | | This enables callback-style programming where the JavaScript environment can call back into the Wasm environment using a function pointer received from the module. Differential Revision: https://reviews.llvm.org/D44427 llvm-svn: 328643
* [WebAssembly] Use DenseMapInfo traits from LLVM repo. NFCNicholas Wilson2018-03-141-23/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D44150 llvm-svn: 327527
* [WebAssembly] Use uint8_t for single byte values to match the specSam Clegg2018-03-011-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D43922 llvm-svn: 326455
* [WebAssembly] Use Twine rather than StringRef for logging messagesSam Clegg2018-03-011-7/+8
| | | | | | | | Also add missing tracing to writeU8. Differential Revision: https://reviews.llvm.org/D43919 llvm-svn: 326398
* [WebAssembly] Add explicit symbol tableSam Clegg2018-02-231-0/+12
| | | | | | | | | | | | | | | | | | This change modified lld to in response the llvm change which moved to a more explicit symbol table in the object format. Based on patches by Nicholas Wilson: 1. https://reviews.llvm.org/D41955 2. https://reviews.llvm.org/D42585 The primary difference that we see in the test output is that for relocatable (-r) output we now have symbol table which replaces exports/imports and globals. See: https://github.com/WebAssembly/tool-conventions/issues/38 Differential Revision: https://reviews.llvm.org/D43264 llvm-svn: 325861
* Do not create a temporary data structure for relocations.Rui Ueyama2018-02-201-8/+0
| | | | | | | | | | | | This patch removes `OutRelocations` vector from the InputChunk and directly consume `Relocations` vector instead. This should make the linker faster because we don't create a temporary data structure, and it matches the lld's design principle that we don't create temporary data structures for object files but instead directly consume mmap'ed data whenever possible. Differential Revision: https://reviews.llvm.org/D43491 llvm-svn: 325549
* Refactor wasm/WriterUtil.{cpp,h}.Rui Ueyama2018-02-161-10/+9
| | | | | | | | | | | | | | | | Summary: - Makes code more in line with LLVM style (e.g. const char * -> StringRef) - Do not use formatv since we can construct message just by `+` - Replace some odd types such as `const StringRef` with more common type - Do not use default arguments if they are not necessary Reviewers: sbc100 Subscribers: jfb, aheejin, llvm-commits, sunfish Differential Revision: https://reviews.llvm.org/D43403 llvm-svn: 325383
* Style fix. NFC.Rui Ueyama2018-02-161-9/+9
| | | | llvm-svn: 325377
* [WebAssembly] Update to match llvm change rL323901. NFCSam Clegg2018-01-311-0/+2
| | | | | | | | | | See: https://reviews.llvm.org/rL323901 Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42751 llvm-svn: 323903
* [WebAssembly] Allow function signature checking at link timeSam Clegg2017-11-301-0/+15
| | | | | | | | | | | | | | This change allows checking of function signatures but does not yes enable it by default. In this mode, linking two objects that were compiled with a different signatures for the same function will produce a link error. New options for enabling and disabling this feature have been added: (--check-signatures/--no-check-signatures). Differential Revision: https://reviews.llvm.org/D40371 llvm-svn: 319396
* [WebAssembly] Initial wasm linker implementationSam Clegg2017-11-171-0/+63
This linker backend is still a work in progress but is enough to link simple programs including linking against library archives. Differential Revision: https://reviews.llvm.org/D34851 llvm-svn: 318539
OpenPOWER on IntegriCloud