Auto generate bytecode information for bytecode parser and LLInt
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Feb 2014 19:45:38 +0000 (19:45 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Feb 2014 19:45:38 +0000 (19:45 +0000)
commit5bcde497ca1e4ae02bc309a1f30f76bdbc8fca46
tree00d3d4558858845b209d066528b0800c4d5b69f6
parent3c38055493b79fddec6da9aadf36de48418ec1de
Auto generate bytecode information for bytecode parser and LLInt
https://bugs.webkit.org/show_bug.cgi?id=129181

Reviewed by Mark Lam.

Source/JavaScriptCore:

Added new bytecode/BytecodeList.json that contains a list of bytecodes and related
helpers.  It also includes bytecode length and other information used to generate files.
Added a new generator, generate-bytecode-files that generates Bytecodes.h and InitBytecodes.asm
in DerivedSources/JavaScriptCore/.

Added the generation of these files to the "DerivedSource" build step.
Slighty changed the build order, since the Bytecodes.h file is needed by
JSCLLIntOffsetsExtractor.  Moved the offline assembly to a separate step since it needs
to be run after JSCLLIntOffsetsExtractor.

Made related changes to OPCODE macros and their use.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json: Added.
* bytecode/Opcode.h:
(JSC::padOpcodeName):
* generate-bytecode-files: Added.
* llint/LLIntCLoop.cpp:
(JSC::LLInt::CLoop::initialize):
* llint/LLIntCLoop.h:
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* llint/LLIntOpcode.h:
* llint/LowLevelInterpreter.asm:

Source/WebKit:

Added ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} to WebKit_INCLUDE_DIRECTORIES due to new
generated Bytecodes.h include file.

* CMakeLists.txt:

Source/WebKit2:

Added ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} to WebKit2_INCLUDE_DIRECTORIES due to new
generated Bytecodes.h include file.

* CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/DerivedSources.make
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/bytecode/BytecodeList.json [new file with mode: 0644]
Source/JavaScriptCore/bytecode/Opcode.h
Source/JavaScriptCore/generate-bytecode-files [new file with mode: 0755]
Source/JavaScriptCore/llint/LLIntCLoop.cpp
Source/JavaScriptCore/llint/LLIntCLoop.h
Source/JavaScriptCore/llint/LLIntData.cpp
Source/JavaScriptCore/llint/LLIntOpcode.h
Source/JavaScriptCore/llint/LowLevelInterpreter.asm
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog