Ignore:
Timestamp:
Aug 27, 2015, 6:13:39 PM (10 years ago)
Author:
[email protected]
Message:

Create WebAssembly functions
https://bugs.webkit.org/show_bug.cgi?id=148373

Patch by Sukolsak Sakshuwong <Sukolsak Sakshuwong> on 2015-08-27
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Create functions from WebAssembly files generated by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>.
WebAssembly functions created by this patch can only return 0.
Actual code generation will be implemented in subsequent patches.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::hash):
(JSC::CodeBlock::sourceCodeForTools):
(JSC::CodeBlock::dumpAssumingJITType):
(JSC::CodeBlock::dumpSource):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::install):
(JSC::CodeBlock::newReplacement):
(JSC::WebAssemblyCodeBlock::replacement):
(JSC::WebAssemblyCodeBlock::capabilityLevelInternal):
(JSC::CodeBlock::updateAllPredictions):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::ownerExecutable):
(JSC::CodeBlock::ownerScriptExecutable):
(JSC::CodeBlock::codeType):
(JSC::WebAssemblyCodeBlock::WebAssemblyCodeBlock):

  • debugger/Debugger.cpp:

(JSC::Debugger::toggleBreakpoint):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::sourceIDForCallFrame):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::InlineStackEntry::executable):
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::isSupportedForInlining):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::executableFor):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • inspector/ScriptCallStackFactory.cpp:

(Inspector::CreateScriptCallStackFunctor::operator()):

  • interpreter/Interpreter.cpp:

(JSC::eval):
(JSC::isWebAssemblyExecutable):
(JSC::GetStackTraceFunctor::operator()):
(JSC::UnwindFunctor::operator()):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::sourceURL):
(JSC::StackVisitor::Frame::computeLineAndColumn):

  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:

(JSC::isWebAssemblyExecutable):
(JSC::linkPolymorphicCall):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/Executable.cpp:

(JSC::WebAssemblyExecutable::WebAssemblyExecutable):
(JSC::WebAssemblyExecutable::destroy):
(JSC::WebAssemblyExecutable::visitChildren):
(JSC::WebAssemblyExecutable::clearCode):
(JSC::WebAssemblyExecutable::prepareForExecution):

  • runtime/Executable.h:

(JSC::ExecutableBase::isEvalExecutable):
(JSC::ExecutableBase::isFunctionExecutable):
(JSC::ExecutableBase::isProgramExecutable):
(JSC::ExecutableBase::isWebAssemblyExecutable):
(JSC::ExecutableBase::clearCodeVirtual):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::create):

  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::JSFunction):
(JSC::JSFunction::isBuiltinFunction):

  • runtime/JSType.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/JSWASMModule.h:

(JSC::JSWASMModule::functions):

  • wasm/WASMFunctionParser.cpp:

(JSC::WASMFunctionParser::compile):

  • wasm/WASMFunctionParser.h:
  • wasm/WASMModuleParser.cpp:

(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parse):
(JSC::WASMModuleParser::parseFunctionDeclarationSection):
(JSC::WASMModuleParser::parseFunctionDefinition):
(JSC::WASMModuleParser::parseExportSection):
(JSC::parseWebAssembly):

  • wasm/WASMModuleParser.h:

Source/WebCore:

No new tests because it's a function rename.

  • testing/Internals.cpp:

(WebCore::Internals::parserMetaData):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp

    r188311 r189079  
    113113   
    114114    if (bytecodeIndex)
    115         codeBlock->ownerExecutable()->setDidTryToEnterInLoop(true);
     115        codeBlock->ownerScriptExecutable()->setDidTryToEnterInLoop(true);
    116116   
    117117    if (codeBlock->jitType() != JITCode::DFGJIT) {
Note: See TracChangeset for help on using the changeset viewer.