Ignore:
Timestamp:
Nov 16, 2016, 3:34:39 PM (9 years ago)
Author:
[email protected]
Message:

Wasm function parser should use template functions for each binary and unary opcode
https://bugs.webkit.org/show_bug.cgi?id=164835

Reviewed by Mark Lam.

This patch changes the wasm function parser to call into a template specialization
for each binary/unary opcode. This change makes it easier to have custom implementations
of various opcodes. It is also, in theory a speedup since it does not require switching
on the opcode twice.

  • CMakeLists.txt:
  • DerivedSources.make:
  • wasm/WasmB3IRGenerator.cpp:

(): Deleted.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::binaryCase):
(JSC::Wasm::FunctionParser<Context>::unaryCase):
(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmValidate.cpp:
  • wasm/generateWasm.py:

(isBinary):
(isSimple):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py: Added.

(generateSimpleCode):

  • wasm/generateWasmOpsHeader.py:

(opcodeMacroizer):

  • wasm/generateWasmValidateInlinesHeader.py:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r208637 r208821  
    6666    WasmOps.h \
    6767    WasmValidateInlines.h \
     68    WasmB3IRGeneratorInlines.h \
    6869#
    6970
     
    307308        $(PYTHON) $(JavaScriptCore)/wasm/generateWasmValidateInlinesHeader.py $(JavaScriptCore)/wasm/wasm.json ./WasmValidateInlines.h
    308309
     310WasmB3IRGeneratorInlines.h: $(JavaScriptCore)/wasm/generateWasmB3IRGeneratorInlinesHeader.py $(JavaScriptCore)/wasm/generateWasm.py $(JavaScriptCore)/wasm/wasm.json
     311        $(PYTHON) $(JavaScriptCore)/wasm/generateWasmB3IRGeneratorInlinesHeader.py $(JavaScriptCore)/wasm/wasm.json ./WasmB3IRGeneratorInlines.h
     312
    309313# Dynamically-defined targets are listed below. Static targets belong up top.
    310314
Note: See TracChangeset for help on using the changeset viewer.