Changeset 209652 in webkit for trunk/Source/JavaScriptCore/wasm/WasmPlan.cpp
- Timestamp:
- Dec 9, 2016, 11:12:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/wasm/WasmPlan.cpp
r209630 r209652 73 73 m_moduleInformation = WTFMove(moduleParser.moduleInformation()); 74 74 m_functionLocationInBinary = WTFMove(moduleParser.functionLocationInBinary()); 75 m_functionIndexSpace = WTFMove(moduleParser.functionIndexSpace()); 75 m_functionIndexSpace.size = moduleParser.functionIndexSpace().size(); 76 m_functionIndexSpace.buffer = moduleParser.functionIndexSpace().releaseBuffer(); 76 77 } 77 78 if (verbose) … … 104 105 Signature* signature = m_moduleInformation->importFunctions.at(import->kindIndex); 105 106 m_wasmToJSStubs.uncheckedAppend(importStubGenerator(m_vm, m_callLinkInfos, signature, importFunctionIndex)); 106 m_functionIndexSpace [importFunctionIndex].code = m_wasmToJSStubs[importFunctionIndex].code().executableAddress();107 m_functionIndexSpace.buffer.get()[importFunctionIndex].code = m_wasmToJSStubs[importFunctionIndex].code().executableAddress(); 107 108 } 108 109 … … 115 116 Signature* signature = m_moduleInformation->internalFunctionSignatures[functionIndex]; 116 117 unsigned functionIndexSpace = m_wasmToJSStubs.size() + functionIndex; 117 ASSERT(m_functionIndexSpace [functionIndexSpace].signature == signature);118 ASSERT(m_functionIndexSpace.buffer.get()[functionIndexSpace].signature == signature); 118 119 119 String error = validateFunction(functionStart, functionLength, signature, m_functionIndexSpace, m_moduleInformation->memory);120 String error = validateFunction(functionStart, functionLength, signature, m_functionIndexSpace, *m_moduleInformation); 120 121 if (!error.isNull()) { 121 122 if (verbose) { … … 129 130 130 131 unlinkedWasmToWasmCalls.uncheckedAppend(Vector<UnlinkedWasmToWasmCall>()); 131 m_wasmInternalFunctions.uncheckedAppend(parseAndCompile(*m_vm, functionStart, functionLength, m_moduleInformation->memory, signature, unlinkedWasmToWasmCalls.at(functionIndex), m_functionIndexSpace));132 m_functionIndexSpace [functionIndexSpace].code = m_wasmInternalFunctions[functionIndex]->code->code().executableAddress();132 m_wasmInternalFunctions.uncheckedAppend(parseAndCompile(*m_vm, functionStart, functionLength, signature, unlinkedWasmToWasmCalls.at(functionIndex), m_functionIndexSpace, *m_moduleInformation)); 133 m_functionIndexSpace.buffer.get()[functionIndexSpace].code = m_wasmInternalFunctions[functionIndex]->code->code().executableAddress(); 133 134 } 134 135 … … 136 137 for (auto& unlinked : unlinkedWasmToWasmCalls) { 137 138 for (auto& call : unlinked) 138 MacroAssembler::repatchCall(call.callLocation, CodeLocationLabel(m_functionIndexSpace [call.functionIndex].code));139 MacroAssembler::repatchCall(call.callLocation, CodeLocationLabel(m_functionIndexSpace.buffer.get()[call.functionIndex].code)); 139 140 } 140 141
Note:
See TracChangeset
for help on using the changeset viewer.