diff options
author | trav90 <travawine@palemoon.org> | 2018-09-12 19:07:57 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-09-12 19:07:57 -0500 |
commit | 8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc (patch) | |
tree | 7cd758eeff97ee61d26af3ec7046e6ca745d0dd5 /js | |
parent | 847f12e88faf1b9a34d0b6fa9b262dfed209aedb (diff) | |
download | UXP-8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc.tar UXP-8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc.tar.gz UXP-8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc.tar.lz UXP-8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc.tar.xz UXP-8bac8c27fa3455bc0b65c5210bf9cd6bc11a33fc.zip |
Initialize some asm.js structures using in-class initializers instead of PodZero
Diffstat (limited to 'js')
-rw-r--r-- | js/src/wasm/AsmJS.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 7fade24fb..2237d1d7f 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -249,14 +249,14 @@ typedef Vector<AsmJSImport, 0, SystemAllocPolicy> AsmJSImportVector; // case the function is toString()ed. class AsmJSExport { - uint32_t funcIndex_; + uint32_t funcIndex_ = 0; // All fields are treated as cacheable POD: - uint32_t startOffsetInModule_; // Store module-start-relative offsets - uint32_t endOffsetInModule_; // so preserved by serialization. + uint32_t startOffsetInModule_ = 0; // Store module-start-relative offsets + uint32_t endOffsetInModule_ = 0; // so preserved by serialization. public: - AsmJSExport() { PodZero(this); } + AsmJSExport() = default; AsmJSExport(uint32_t funcIndex, uint32_t startOffsetInModule, uint32_t endOffsetInModule) : funcIndex_(funcIndex), startOffsetInModule_(startOffsetInModule), @@ -288,12 +288,12 @@ enum class CacheResult struct AsmJSMetadataCacheablePod { - uint32_t numFFIs; - uint32_t srcLength; - uint32_t srcLengthWithRightBrace; - bool usesSimd; + uint32_t numFFIs = 0; + uint32_t srcLength = 0; + uint32_t srcLengthWithRightBrace = 0; + bool usesSimd = false; - AsmJSMetadataCacheablePod() { PodZero(this); } + AsmJSMetadataCacheablePod() = default; }; struct js::AsmJSMetadata : Metadata, AsmJSMetadataCacheablePod |