Changeset 224272 in webkit


Ignore:
Timestamp:
Oct 31, 2017 11:15:59 PM (6 years ago)
Author:
jfbastien@apple.com
Message:

WebAssembly: Wasm::IndexOrName has a raw pointer to Name
https://bugs.webkit.org/show_bug.cgi?id=176644

Reviewed by Michael Saboff.

IndexOrName now keeps a RefPtr to its original NameSection, which
holds the Name (or references nullptr if Index). Holding onto the
entire section seems like the better thing to do, since backtraces
probably contain multiple names from the same Module.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • interpreter/Interpreter.cpp:

(JSC::GetStackTraceFunctor::operator() const):

  • interpreter/StackVisitor.h: Frame is no longer POD because of the

RefPtr.

  • runtime/StackFrame.cpp:

(JSC::StackFrame::StackFrame):

  • runtime/StackFrame.h: Drop the union, size is now 40 bytes.

(JSC::StackFrame::StackFrame): Deleted. Initialized in class instead.
(JSC::StackFrame::wasm): Deleted. Make it a ctor instead.

  • wasm/WasmBBQPlanInlines.h:

(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmCallee.cpp:

(JSC::Wasm::Callee::Callee):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::create):

  • wasm/WasmFormat.h: Move NameSection to its own header.

(JSC::Wasm::isValidNameType):
(JSC::Wasm::NameSection::get): Deleted.

  • wasm/WasmIndexOrName.cpp:

(JSC::Wasm::IndexOrName::IndexOrName):
(JSC::Wasm::makeString):

  • wasm/WasmIndexOrName.h:

(JSC::Wasm::IndexOrName::IndexOrName):
(JSC::Wasm::IndexOrName::isEmpty const):
(JSC::Wasm::IndexOrName::isIndex const):

  • wasm/WasmModuleInformation.cpp:

(JSC::Wasm::ModuleInformation::ModuleInformation):

  • wasm/WasmModuleInformation.h:

(JSC::Wasm::ModuleInformation::ModuleInformation): Deleted.

  • wasm/WasmNameSection.h:

(JSC::Wasm::NameSection::get):
(JSC::Wasm::NameSection::create): Deleted.

  • wasm/WasmNameSectionParser.cpp:

(JSC::Wasm::NameSectionParser::parse):

  • wasm/WasmNameSectionParser.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

Location:
trunk/Source/JavaScriptCore
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r224263 r224272  
     12017-10-31  JF Bastien  <jfbastien@apple.com>
     2
     3        WebAssembly: Wasm::IndexOrName has a raw pointer to Name
     4        https://bugs.webkit.org/show_bug.cgi?id=176644
     5
     6        Reviewed by Michael Saboff.
     7
     8        IndexOrName now keeps a RefPtr to its original NameSection, which
     9        holds the Name (or references nullptr if Index). Holding onto the
     10        entire section seems like the better thing to do, since backtraces
     11        probably contain multiple names from the same Module.
     12
     13        * JavaScriptCore.xcodeproj/project.pbxproj:
     14        * interpreter/Interpreter.cpp:
     15        (JSC::GetStackTraceFunctor::operator() const):
     16        * interpreter/StackVisitor.h: Frame is no longer POD because of the
     17        RefPtr.
     18        * runtime/StackFrame.cpp:
     19        (JSC::StackFrame::StackFrame):
     20        * runtime/StackFrame.h: Drop the union, size is now 40 bytes.
     21        (JSC::StackFrame::StackFrame): Deleted. Initialized in class instead.
     22        (JSC::StackFrame::wasm): Deleted. Make it a ctor instead.
     23        * wasm/WasmBBQPlanInlines.h:
     24        (JSC::Wasm::BBQPlan::initializeCallees):
     25        * wasm/WasmCallee.cpp:
     26        (JSC::Wasm::Callee::Callee):
     27        * wasm/WasmCallee.h:
     28        (JSC::Wasm::Callee::create):
     29        * wasm/WasmFormat.h: Move NameSection to its own header.
     30        (JSC::Wasm::isValidNameType):
     31        (JSC::Wasm::NameSection::get): Deleted.
     32        * wasm/WasmIndexOrName.cpp:
     33        (JSC::Wasm::IndexOrName::IndexOrName):
     34        (JSC::Wasm::makeString):
     35        * wasm/WasmIndexOrName.h:
     36        (JSC::Wasm::IndexOrName::IndexOrName):
     37        (JSC::Wasm::IndexOrName::isEmpty const):
     38        (JSC::Wasm::IndexOrName::isIndex const):
     39        * wasm/WasmModuleInformation.cpp:
     40        (JSC::Wasm::ModuleInformation::ModuleInformation):
     41        * wasm/WasmModuleInformation.h:
     42        (JSC::Wasm::ModuleInformation::ModuleInformation): Deleted.
     43        * wasm/WasmNameSection.h:
     44        (JSC::Wasm::NameSection::get):
     45        (JSC::Wasm::NameSection::create): Deleted.
     46        * wasm/WasmNameSectionParser.cpp:
     47        (JSC::Wasm::NameSectionParser::parse):
     48        * wasm/WasmNameSectionParser.h:
     49        * wasm/WasmOMGPlan.cpp:
     50        (JSC::Wasm::OMGPlan::work):
     51
    1522017-10-31  Tim Horton  <timothy_horton@apple.com>
    253
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r224136 r224272  
    14891489                AD5C36EF1F7A263A000BCAAF /* WasmMemoryMode.h in Headers */ = {isa = PBXBuildFile; fileRef = AD5C36EE1F7A2629000BCAAF /* WasmMemoryMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14901490                AD7438C01E0457A400FD0C2A /* WasmSignature.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7438BF1E04579200FD0C2A /* WasmSignature.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1491                AD7B4B2E1FA3E29800C9DF79 /* WasmNameSection.h in Headers */ = {isa = PBXBuildFile; fileRef = AD7B4B2D1FA3E28600C9DF79 /* WasmNameSection.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14911492                AD86A93E1AA4D88D002FE77F /* WeakGCMapInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = AD86A93D1AA4D87C002FE77F /* WeakGCMapInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14921493                AD8FF3981EB5BDB20087FF82 /* WasmIndexOrName.h in Headers */ = {isa = PBXBuildFile; fileRef = AD8FF3951EB5BD850087FF82 /* WasmIndexOrName.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    42394240                AD7438BE1E04579200FD0C2A /* WasmSignature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WasmSignature.cpp; sourceTree = "<group>"; };
    42404241                AD7438BF1E04579200FD0C2A /* WasmSignature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmSignature.h; sourceTree = "<group>"; };
     4242                AD7B4B2D1FA3E28600C9DF79 /* WasmNameSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmNameSection.h; sourceTree = "<group>"; };
    42414243                AD86A93D1AA4D87C002FE77F /* WeakGCMapInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCMapInlines.h; sourceTree = "<group>"; };
    42424244                AD8DD6CF1F67089F0004EB52 /* JSToWasm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSToWasm.h; path = js/JSToWasm.h; sourceTree = "<group>"; };
     
    61546156                                53F40E941D5A7AEF0099A1B6 /* WasmModuleParser.h */,
    61556157                                AD5B416E1EBAFB65008EFA43 /* WasmName.h */,
     6158                                AD7B4B2D1FA3E28600C9DF79 /* WasmNameSection.h */,
    61566159                                ADD8FA441EB3077100DF542F /* WasmNameSectionParser.cpp */,
    61576160                                ADD8FA431EB3077100DF542F /* WasmNameSectionParser.h */,
     
    82638266                                A77A423E17A0BBFD00A8DB81 /* DFGAbstractHeap.h in Headers */,
    82648267                                A704D90317A0BAA8006BA554 /* DFGAbstractInterpreter.h in Headers */,
     8268                                AD7B4B2E1FA3E29800C9DF79 /* WasmNameSection.h in Headers */,
    82658269                                A704D90417A0BAA8006BA554 /* DFGAbstractInterpreterInlines.h in Headers */,
    82668270                                0F620177143FCD3F0068B77C /* DFGAbstractValue.h in Headers */,
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r223875 r224272  
    508508        if (m_remainingCapacityForFrameCapture) {
    509509            if (visitor->isWasmFrame()) {
    510                 m_results.append(StackFrame::wasm(visitor->wasmFunctionIndexOrName()));
     510                m_results.append(StackFrame(visitor->wasmFunctionIndexOrName()));
    511511            } else if (!!visitor->codeBlock() && !visitor->codeBlock()->unlinkedCodeBlock()->isBuiltinFunction()) {
    512512                m_results.append(
  • trunk/Source/JavaScriptCore/interpreter/StackVisitor.h

    r223738 r224272  
    122122        size_t m_argumentCountIncludingThis;
    123123        unsigned m_bytecodeOffset;
    124         Wasm::IndexOrName m_wasmFunctionIndexOrName;
    125124        bool m_callerIsEntryFrame : 1;
    126125        bool m_isWasmFrame : 1;
     126        Wasm::IndexOrName m_wasmFunctionIndexOrName;
    127127
    128128        friend class StackVisitor;
  • trunk/Source/JavaScriptCore/runtime/StackFrame.cpp

    r221836 r224272  
    3636StackFrame::StackFrame(VM& vm, JSCell* owner, JSCell* callee)
    3737    : m_callee(vm, owner, callee)
    38     , m_bytecodeOffset(UINT_MAX)
    3938{
    4039}
     
    4443    , m_codeBlock(vm, owner, codeBlock)
    4544    , m_bytecodeOffset(bytecodeOffset)
     45{
     46}
     47
     48StackFrame::StackFrame(Wasm::IndexOrName indexOrName)
     49    : m_wasmFunctionIndexOrName(indexOrName)
     50    , m_isWasmFrame(true)
    4651{
    4752}
  • trunk/Source/JavaScriptCore/runtime/StackFrame.h

    r221836 r224272  
    3838class StackFrame {
    3939public:
    40     StackFrame()
    41         : m_bytecodeOffset(UINT_MAX)
    42     { }
    43 
    4440    StackFrame(VM&, JSCell* owner, JSCell* callee);
    45 
    4641    StackFrame(VM&, JSCell* owner, JSCell* callee, CodeBlock*, unsigned bytecodeOffset);
    47 
    48     static StackFrame wasm(Wasm::IndexOrName indexOrName)
    49     {
    50         StackFrame result;
    51         result.m_isWasmFrame = true;
    52         result.m_wasmFunctionIndexOrName = indexOrName;
    53         return result;
    54     }
     42    StackFrame(Wasm::IndexOrName);
    5543
    5644    bool hasLineAndColumnInfo() const { return !!m_codeBlock; }
     
    7462    WriteBarrier<JSCell> m_callee { };
    7563    WriteBarrier<CodeBlock> m_codeBlock { };
    76     union {
    77         unsigned m_bytecodeOffset;
    78         Wasm::IndexOrName m_wasmFunctionIndexOrName;
    79     };
     64    Wasm::IndexOrName m_wasmFunctionIndexOrName;
     65    unsigned m_bytecodeOffset { UINT_MAX };
    8066    bool m_isWasmFrame { false };
    8167};
  • trunk/Source/JavaScriptCore/wasm/WasmBBQPlanInlines.h

    r223738 r224272  
    3131#include "WasmBBQPlan.h"
    3232#include "WasmCallee.h"
     33#include "WasmNameSection.h"
    3334
    3435namespace JSC { namespace Wasm {
     
    4849        InternalFunction* function = m_wasmInternalFunctions[internalFunctionIndex].get();
    4950        size_t functionIndexSpace = internalFunctionIndex + m_moduleInformation->importFunctionCount();
    50         Ref<Wasm::Callee> wasmEntrypointCallee = Wasm::Callee::create(WTFMove(function->entrypoint), functionIndexSpace, m_moduleInformation->nameSection.get(functionIndexSpace));
     51        Ref<Wasm::Callee> wasmEntrypointCallee = Wasm::Callee::create(WTFMove(function->entrypoint), functionIndexSpace, m_moduleInformation->nameSection->get(functionIndexSpace));
    5152        MacroAssembler::repatchPointer(function->calleeMoveLocation, CalleeBits::boxWasm(wasmEntrypointCallee.ptr()));
    5253
  • trunk/Source/JavaScriptCore/wasm/WasmCallee.cpp

    r216597 r224272  
    3939}
    4040
    41 Callee::Callee(Entrypoint&& entrypoint, size_t index, const Name* name)
     41Callee::Callee(Entrypoint&& entrypoint, size_t index, std::pair<const Name*, RefPtr<NameSection>>&& name)
    4242    : m_entrypoint(WTFMove(entrypoint))
    43     , m_indexOrName(index, name)
     43    , m_indexOrName(index, WTFMove(name))
    4444{
    4545    registerCode(m_entrypoint.compilation->codeRef().executableMemory()->start(), m_entrypoint.compilation->codeRef().executableMemory()->end());
  • trunk/Source/JavaScriptCore/wasm/WasmCallee.h

    r216597 r224272  
    4545    }
    4646
    47     static Ref<Callee> create(Wasm::Entrypoint&& entrypoint, size_t index, const Name* name)
     47    static Ref<Callee> create(Wasm::Entrypoint&& entrypoint, size_t index, std::pair<const Name*, RefPtr<NameSection>>&& name)
    4848    {
    49         Callee* callee = new Callee(WTFMove(entrypoint), index, name);
     49        Callee* callee = new Callee(WTFMove(entrypoint), index, WTFMove(name));
    5050        return adoptRef(*callee);
    5151    }
     
    5858private:
    5959    JS_EXPORT_PRIVATE Callee(Wasm::Entrypoint&&);
    60     JS_EXPORT_PRIVATE Callee(Wasm::Entrypoint&&, size_t, const Name*);
     60    JS_EXPORT_PRIVATE Callee(Wasm::Entrypoint&&, size_t, std::pair<const Name*, RefPtr<NameSection>>&&);
    6161
    6262    Wasm::Entrypoint m_entrypoint;
  • trunk/Source/JavaScriptCore/wasm/WasmFormat.h

    r223907 r224272  
    3535#include "WasmMemoryInformation.h"
    3636#include "WasmName.h"
     37#include "WasmNameSection.h"
    3738#include "WasmOps.h"
    3839#include "WasmPageCount.h"
     
    254255    return false;
    255256}
    256    
    257 struct NameSection {
    258     Name moduleName;
    259     Vector<Name> functionNames;
    260     const Name* get(size_t functionIndexSpace)
    261     {
    262         return functionIndexSpace < functionNames.size() ? &functionNames[functionIndexSpace] : nullptr;
    263     }
    264 };
    265257
    266258struct UnlinkedWasmToWasmCall {
  • trunk/Source/JavaScriptCore/wasm/WasmIndexOrName.cpp

    r216597 r224272  
    2929namespace JSC { namespace Wasm {
    3030
    31 IndexOrName::IndexOrName(Index index, const Name* name)
     31IndexOrName::IndexOrName(Index index, std::pair<const Name*, RefPtr<NameSection>>&& name)
    3232{
    33     static_assert(sizeof(m_index) == sizeof(m_name), "bit-tagging depends on sizes being equal");
    34     static_assert(sizeof(m_index) == sizeof(*this), "bit-tagging depends on object being the size of the union's types");
     33    static_assert(sizeof(m_indexName.index) == sizeof(m_indexName.name), "bit-tagging depends on sizes being equal");
    3534
    36     if ((index & allTags) || (bitwise_cast<Index>(name) & allTags))
     35    if ((index & allTags) || (bitwise_cast<Index>(name.first) & allTags))
    3736        *this = IndexOrName();
    38     else if (name)
    39         m_name = name;
    40     else
    41         m_index = indexTag | index;
     37    else {
     38        if (name.first)
     39            m_indexName.name = name.first;
     40        else
     41            m_indexName.index = indexTag | index;
     42        m_nameSection = WTFMove(name.second);
     43    }
    4244}
    4345
     
    4749        return String();
    4850    if (ion.isIndex())
    49         return String::number(ion.m_index & ~IndexOrName::indexTag);
    50     return String(ion.m_name->data(), ion.m_name->size());
     51        return String::number(ion.m_indexName.index & ~IndexOrName::indexTag);
     52    return String(ion.m_indexName.name->data(), ion.m_indexName.name->size());
    5153};
    5254
  • trunk/Source/JavaScriptCore/wasm/WasmIndexOrName.h

    r216597 r224272  
    2727
    2828#include "WasmName.h"
     29#include "WasmNameSection.h"
     30#include <wtf/RefPtr.h>
    2931#include <wtf/StdLibExtras.h>
    3032#include <wtf/text/WTFString.h>
     
    3234namespace JSC { namespace Wasm {
    3335
     36struct NameSection;
     37
    3438struct IndexOrName {
    3539    typedef size_t Index;
    3640
    37     IndexOrName()
    38         : m_index(emptyTag)
    39     { }
    40     IndexOrName(Index, const Name*);
    41     bool isEmpty() const { return bitwise_cast<Index>(*this) & emptyTag; }
    42     bool isIndex() const { return bitwise_cast<Index>(*this) & indexTag; }
     41    IndexOrName() { m_indexName.index = emptyTag; }
     42    IndexOrName(Index, std::pair<const Name*, RefPtr<NameSection>>&&);
     43    bool isEmpty() const { return bitwise_cast<Index>(m_indexName) & emptyTag; }
     44    bool isIndex() const { return bitwise_cast<Index>(m_indexName) & indexTag; }
    4345    bool isName() const { return !(isEmpty() || isName()); }
    4446
     
    4749private:
    4850    union {
    49         Index m_index;
    50         const Name* m_name;
    51     };
     51        Index index;
     52        const Name* name;
     53    } m_indexName;
     54    RefPtr<NameSection> m_nameSection;
    5255
    5356    // Use the top bits as tags. Neither pointers nor the function index space should use them.
  • trunk/Source/JavaScriptCore/wasm/WasmModuleInformation.cpp

    r214919 r224272  
    2929#if ENABLE(WEBASSEMBLY)
    3030
     31#include "WasmNameSection.h"
     32
    3133namespace JSC { namespace Wasm {
    3234
     35ModuleInformation::ModuleInformation(Vector<uint8_t>&& sourceBytes)
     36    : source(WTFMove(sourceBytes))
     37    , nameSection(new NameSection())
     38{
     39}
    3340ModuleInformation::~ModuleInformation() { }
    3441
  • trunk/Source/JavaScriptCore/wasm/WasmModuleInformation.h

    r216597 r224272  
    3333
    3434struct ModuleInformation : public ThreadSafeRefCounted<ModuleInformation> {
     35    ModuleInformation() = delete;
     36    ModuleInformation(const ModuleInformation&) = delete;
     37    ModuleInformation(ModuleInformation&&) = delete;
     38
     39    ModuleInformation(Vector<uint8_t>&& sourceBytes);
     40
     41    JS_EXPORT_PRIVATE ~ModuleInformation();
     42   
    3543    size_t functionIndexSpaceSize() const { return importFunctionSignatureIndices.size() + internalFunctionSignatureIndices.size(); }
    3644    bool isImportedFunctionFromFunctionIndexSpace(size_t functionIndex) const
     
    4856    uint32_t importFunctionCount() const { return importFunctionSignatureIndices.size(); }
    4957    uint32_t internalFunctionCount() const { return internalFunctionSignatureIndices.size(); }
    50 
    51     ModuleInformation(Vector<uint8_t>&& sourceBytes)
    52         : source(WTFMove(sourceBytes))
    53     {
    54     }
    55 
    56     JS_EXPORT_PRIVATE ~ModuleInformation();
    5758
    5859    const Vector<uint8_t> source;
     
    7576    unsigned firstInternalGlobal { 0 };
    7677    Vector<CustomSection> customSections;
    77     NameSection nameSection;
     78    RefPtr<NameSection> nameSection;
    7879};
    7980
  • trunk/Source/JavaScriptCore/wasm/WasmNameSection.h

    r223738 r224272  
    2929#include <wtf/ThreadSafeRefCounted.h>
    3030#include <wtf/Vector.h>
     31#include <utility>
    3132
    3233namespace JSC { namespace Wasm {
    3334
    34 struct NameSection : ThreadSafeRefCounted<NameSection> {
    35     static Ref<NameSection> create()
     35struct NameSection : public ThreadSafeRefCounted<NameSection> {
     36    std::pair<const Name*, RefPtr<NameSection>> get(size_t functionIndexSpace)
    3637    {
    37         return adoptRef(*new NameSection());
     38        return functionIndexSpace < functionNames.size() ? std::make_pair(&functionNames[functionIndexSpace], RefPtr<NameSection>(this)) : std::pair<const Name*, RefPtr<NameSection>>(nullptr, nullptr);
    3839    }
    39 
    4040    Name moduleName;
    4141    Vector<Name> functionNames;
    42     const Name* get(size_t functionIndexSpace)
    43     {
    44         return functionIndexSpace < functionNames.size() ? &functionNames[functionIndexSpace] : nullptr;
    45     }
    4642};
    4743
  • trunk/Source/JavaScriptCore/wasm/WasmNameSectionParser.cpp

    r219134 r224272  
    3030
    3131#include "IdentifierInlines.h"
     32#include "WasmNameSection.h"
    3233
    3334namespace JSC { namespace Wasm {
     
    3536auto NameSectionParser::parse() -> Result
    3637{
    37     NameSection nameSection;
    38     WASM_PARSER_FAIL_IF(!nameSection.functionNames.tryReserveCapacity(m_info.functionIndexSpaceSize()), "can't allocate enough memory for function names");
    39     nameSection.functionNames.resize(m_info.functionIndexSpaceSize());
     38    RefPtr<NameSection> nameSection(adoptRef(*new NameSection()));
     39    WASM_PARSER_FAIL_IF(!nameSection->functionNames.tryReserveCapacity(m_info.functionIndexSpaceSize()), "can't allocate enough memory for function names");
     40    nameSection->functionNames.resize(m_info.functionIndexSpaceSize());
    4041
    4142    for (size_t payloadNumber = 0; m_offset < length(); ++payloadNumber) {
     
    5960            WASM_PARSER_FAIL_IF(!parseVarUInt32(nameLen), "can't get module's name length for payload ", payloadNumber);
    6061            WASM_PARSER_FAIL_IF(!consumeUTF8String(nameString, nameLen), "can't get module's name of length ", nameLen, " for payload ", payloadNumber);
    61             nameSection.moduleName = WTFMove(nameString);
     62            nameSection->moduleName = WTFMove(nameString);
    6263            break;
    6364        }
     
    7374                WASM_PARSER_FAIL_IF(!parseVarUInt32(nameLen), "can't get functions ", function, "'s name length for payload ", payloadNumber);
    7475                WASM_PARSER_FAIL_IF(!consumeUTF8String(nameString, nameLen), "can't get function ", function, "'s name of length ", nameLen, " for payload ", payloadNumber);
    75                 nameSection.functionNames[index] = WTFMove(nameString);
     76                nameSection->functionNames[index] = WTFMove(nameString);
    7677            }
    7778            break;
  • trunk/Source/JavaScriptCore/wasm/WasmNameSectionParser.h

    r216597 r224272  
    3030#include "WasmFormat.h"
    3131#include "WasmParser.h"
     32#include <wtf/RefPtr.h>
    3233
    3334namespace JSC { namespace Wasm {
    3435
    35 class NameSectionParser : public Parser<NameSection> {
     36class NameSectionParser : public Parser<RefPtr<NameSection>> {
    3637public:
    3738    NameSectionParser(const uint8_t* sourceBuffer, size_t sourceLength, const ModuleInformation& info)
  • trunk/Source/JavaScriptCore/wasm/WasmOMGPlan.cpp

    r224020 r224272  
    3939#include "WasmMachineThreads.h"
    4040#include "WasmMemory.h"
     41#include "WasmNameSection.h"
    4142#include "WasmValidate.h"
    4243#include "WasmWorklist.h"
     
    106107    {
    107108        ASSERT(m_codeBlock.ptr() == m_module->codeBlockFor(mode()));
    108         Ref<Callee> callee = Callee::create(WTFMove(omgEntrypoint), functionIndexSpace, m_moduleInformation->nameSection.get(functionIndexSpace));
     109        Ref<Callee> callee = Callee::create(WTFMove(omgEntrypoint), functionIndexSpace, m_moduleInformation->nameSection->get(functionIndexSpace));
    109110        MacroAssembler::repatchPointer(parseAndCompileResult.value()->calleeMoveLocation, CalleeBits::boxWasm(callee.ptr()));
    110111        ASSERT(!m_codeBlock->m_optimizedCallees[m_functionIndex]);
Note: See TracChangeset for help on using the changeset viewer.