[CMake][EFL] Enable the LLInt
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2012 16:06:32 +0000 (16:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Sep 2012 16:06:32 +0000 (16:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=92682

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-09-10
Reviewed by Csaba Osztrogonác.

.:

Added LLInt to CMake buildsystem and enabled it by default on EFL.
Note that Ruby is not enforced: a secondary check is done when LLInt
is enabled on the JSC's CMakeLists.txt.

* CMakeLists.txt:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

Generate the headers needed by LLint when LLint is enabled.

* CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128065 268f45cc-cd09-0410-ab3c-d52691b4dbfc

CMakeLists.txt
ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/cmake/OptionsEfl.cmake
Source/cmake/WebKitFeatures.cmake
Source/cmakeconfig.h.cmake

index b477be3..5ff4edc 100644 (file)
@@ -66,6 +66,7 @@ FIND_PACKAGE(FLEX REQUIRED)
 FIND_PACKAGE(Gperf REQUIRED)
 FIND_PACKAGE(Perl REQUIRED)
 FIND_PACKAGE(PythonInterp REQUIRED)
+FIND_PACKAGE(Ruby)
 
 # -----------------------------------------------------------------------------
 # Determine the target processor
index 3fba05a..499705b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2012-09-10  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [CMake][EFL] Enable the LLInt
+        https://bugs.webkit.org/show_bug.cgi?id=92682
+
+        Reviewed by Csaba Osztrogonác.
+
+        Added LLInt to CMake buildsystem and enabled it by default on EFL.
+        Note that Ruby is not enforced: a secondary check is done when LLInt
+        is enabled on the JSC's CMakeLists.txt.
+
+        * CMakeLists.txt:
+        * Source/cmake/OptionsEfl.cmake:
+        * Source/cmake/WebKitFeatures.cmake:
+        * Source/cmakeconfig.h.cmake:
+
 2012-09-07  Simon Fraser  <simon.fraser@apple.com>
 
         box-shadow causes overlay scrollbars to be in the wrong position when element is composited
index 1a61fde..22d5719 100644 (file)
@@ -291,6 +291,65 @@ SET(JavaScriptCore_LIBRARIES
     ${WTF_LIBRARY_NAME}
 )
 
+IF (ENABLE_LLINT)
+    # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
+    # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
+    # for finding the only Ruby interpreter.
+    IF (NOT RUBY_EXECUTABLE)
+        MESSAGE(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
+    ENDIF ()
+
+    SET(LLINT_ASM
+        llint/LowLevelInterpreter.asm
+        llint/LowLevelInterpreter32_64.asm
+        llint/LowLevelInterpreter64.asm
+    )
+
+    SET(OFFLINE_ASM
+        offlineasm/armv7.rb
+        offlineasm/ast.rb
+        offlineasm/backends.rb
+        offlineasm/cloop.rb
+        offlineasm/config.rb
+        offlineasm/instructions.rb
+        offlineasm/offsets.rb
+        offlineasm/opt.rb
+        offlineasm/parser.rb
+        offlineasm/registers.rb
+        offlineasm/self_hash.rb
+        offlineasm/settings.rb
+        offlineasm/transform.rb
+        offlineasm/x86.rb
+    )
+
+    ADD_CUSTOM_COMMAND(
+        OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
+        MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
+        DEPENDS ${LLINT_ASM} ${OFFLINE_ASM}
+        COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
+        VERBATIM)
+
+    ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h)
+    ADD_EXECUTABLE(LLIntOffsetsExtractor ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp)
+
+    ADD_CUSTOM_COMMAND(
+        OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
+        MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
+        DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM}
+        COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
+        VERBATIM)
+
+    ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h)
+    LIST(APPEND JavaScriptCore_SOURCES
+        llint/LLIntCLoop.cpp
+        llint/LLIntData.cpp
+        llint/LLIntEntrypoints.cpp
+        llint/LLIntExceptions.cpp
+        llint/LLIntSlowPaths.cpp
+        llint/LLIntThunks.cpp
+        llint/LowLevelInterpreter.cpp
+    )
+ENDIF ()
 
 # GENERATOR 1-A: LUT creator
 FOREACH (_file ${JavaScriptCore_LUT_FILES})
index 9833a64..4b59dd5 100644 (file)
@@ -1,3 +1,14 @@
+2012-09-10  Thiago Marcos P. Santos  <thiago.santos@intel.com>
+
+        [CMake][EFL] Enable the LLInt
+        https://bugs.webkit.org/show_bug.cgi?id=92682
+
+        Reviewed by Csaba Osztrogonác.
+
+        Generate the headers needed by LLint when LLint is enabled.
+
+        * CMakeLists.txt:
+
 2012-09-10  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix make distcheck.
index 62fd482..525bf0f 100644 (file)
@@ -69,6 +69,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GLIB_SUPPORT ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_WEBKIT_BLOB_BUILDER ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LINK_PREFETCH ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LLINT ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CAPTURE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MICRODATA ON)
index 9e3a498..58a90d2 100644 (file)
@@ -71,6 +71,7 @@ MACRO (WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_LEGACY_WEBKIT_BLOB_BUILDER "Toggle Legacy WebKit Blob Builder Support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_LINK_PREFETCH "Toggle pre fetching support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_LINK_PRERENDER "Toggle pre rendering support" OFF)
+    WEBKIT_OPTION_DEFINE(ENABLE_LLINT "Enable JSC Low Level Interpreter" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_MATHML "Toggle MathML support" ON)
     WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_CAPTURE "Toggle Media Capture support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_SOURCE "Toggle Media Source support" OFF)
index cee260e..25731e0 100644 (file)
@@ -63,6 +63,7 @@
 #cmakedefine01 ENABLE_LEGACY_WEBKIT_BLOB_BUILDER
 #cmakedefine01 ENABLE_LINK_PREFETCH
 #cmakedefine01 ENABLE_LINK_PRERENDER
+#cmakedefine01 ENABLE_LLINT
 #cmakedefine01 ENABLE_MATHML
 #cmakedefine01 ENABLE_MEDIA_CAPTURE
 #cmakedefine01 ENABLE_MEDIA_SOURCE