Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (237187 => 237188)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2018-10-16 17:29:34 UTC (rev 237187)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2018-10-16 17:44:22 UTC (rev 237188)
@@ -238,10 +238,17 @@
endif ()
add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredSettings.h
+ MAIN_DEPENDENCY ${_javascript_CORE_DIR}/offlineasm/generate_settings_extractor.rb
+ DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
+ COMMAND ${RUBY_EXECUTABLE} ${_javascript_CORE_DIR}/offlineasm/generate_settings_extractor.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${_javascript_CORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredSettings.h ${OFFLINE_ASM_BACKEND}
+ VERBATIM)
+
+add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
MAIN_DEPENDENCY ${_javascript_CORE_DIR}/offlineasm/generate_offset_extractor.rb
- DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
- COMMAND ${RUBY_EXECUTABLE} ${_javascript_CORE_DIR}/offlineasm/generate_offset_extractor.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${_javascript_CORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${OFFLINE_ASM_BACKEND}
+ DEPENDS LLIntSettingsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
+ COMMAND ${RUBY_EXECUTABLE} ${_javascript_CORE_DIR}/offlineasm/generate_offset_extractor.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${_javascript_CORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntSettingsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${OFFLINE_ASM_BACKEND}
VERBATIM)
# We add the header files directly to the ADD_EXECUTABLE call instead of setting the
@@ -253,10 +260,18 @@
# Additionally, setting the OBJECT_DEPENDS property will make the .h files a Makefile
# dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
# actually be run multiple times!
+add_executable(LLIntSettingsExtractor
+ ${_javascript_CORE_DIR}/llint/LLIntSettingsExtractor.cpp
+ ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredSettings.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
+)
+
add_executable(LLIntOffsetsExtractor
${_javascript_CORE_DIR}/llint/LLIntOffsetsExtractor.cpp
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
)
+
+target_link_libraries(LLIntSettingsExtractor WTF)
+add_dependencies(LLIntSettingsExtractor _javascript_CoreForwardingHeaders)
target_link_libraries(LLIntOffsetsExtractor WTF)
add_dependencies(LLIntOffsetsExtractor _javascript_CoreForwardingHeaders)
@@ -1219,6 +1234,12 @@
FLATTENED
)
+target_include_directories(LLIntSettingsExtractor PRIVATE
+ ${_javascript_Core_INCLUDE_DIRECTORIES}
+ ${_javascript_Core_PRIVATE_INCLUDE_DIRECTORIES}
+)
+target_include_directories(LLIntSettingsExtractor SYSTEM PRIVATE ${_javascript_Core_SYSTEM_INCLUDE_DIRECTORIES})
+
target_include_directories(LLIntOffsetsExtractor PRIVATE
${_javascript_Core_INCLUDE_DIRECTORIES}
${_javascript_Core_PRIVATE_INCLUDE_DIRECTORIES}
Modified: trunk/Source/_javascript_Core/ChangeLog (237187 => 237188)
--- trunk/Source/_javascript_Core/ChangeLog 2018-10-16 17:29:34 UTC (rev 237187)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-10-16 17:44:22 UTC (rev 237188)
@@ -1,5 +1,17 @@
2018-10-16 Keith Miller <keith_mil...@apple.com>
+ Unreviewed, reland https://bugs.webkit.org/show_bug.cgi?id=189708 with build fix.
+
+ * CMakeLists.txt:
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * llint/LLIntOffsetsExtractor.cpp:
+ (JSC::LLIntOffsetsExtractor::dummy):
+ * offlineasm/generate_offset_extractor.rb:
+ * offlineasm/offsets.rb:
+ * offlineasm/settings.rb:
+
+2018-10-16 Keith Miller <keith_mil...@apple.com>
+
Unreviewed, add missing include.
* runtime/BasicBlockLocation.h:
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (237187 => 237188)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-10-16 17:29:34 UTC (rev 237187)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-10-16 17:44:22 UTC (rev 237188)
@@ -15,10 +15,23 @@
);
dependencies = (
65442D5018EBB744007AF92F /* PBXTargetDependency */,
+ 14BD68992151916D0050DAFF /* PBXTargetDependency */,
);
name = "LLInt Offsets";
productName = "Derived Sources";
};
+ 14BD688F215191450050DAFF /* LLInt Settings */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 14BD6893215191450050DAFF /* Build configuration list for PBXAggregateTarget "LLInt Settings" */;
+ buildPhases = (
+ 14BD6892215191450050DAFF /* Generate Derived Sources */,
+ );
+ dependencies = (
+ 14BD6890215191450050DAFF /* PBXTargetDependency */,
+ );
+ name = "LLInt Settings";
+ productName = "Derived Sources";
+ };
53B4BD041F68AF8900D2BEA3 /* Generate Unified Sources */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 53B4BD0A1F68AF8900D2BEA3 /* Build configuration list for PBXAggregateTarget "Generate Unified Sources" */;
@@ -798,6 +811,7 @@
14BA78F113AAB88F005B7C2C /* SlotVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BA78F013AAB88F005B7C2C /* SlotVisitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
14BA7A9813AADFF8005B7C2C /* Heap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BA7A9613AADFF8005B7C2C /* Heap.h */; settings = {ATTRIBUTES = (Private, ); }; };
14BD59C50A3E8F9F00BAF59C /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* _javascript_Core.framework */; };
+ 14BD689D215191C10050DAFF /* LLIntSettingsExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14BD689C215191B30050DAFF /* LLIntSettingsExtractor.cpp */; };
14BE7D3317135CF400D1807A /* WeakInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BE7D3217135CF400D1807A /* WeakInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
14BFCE6910CDB1FC00364CCE /* WeakGCMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
14CA958B16AB50DE00938A06 /* StaticPropertyAnalyzer.h in Headers */ = {isa = PBXBuildFile; fileRef = 14CA958A16AB50DE00938A06 /* StaticPropertyAnalyzer.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1846,6 +1860,34 @@
remoteGlobalIDString = 0F4680A914BA7FD900BFE272;
remoteInfo = "LLInt Offsets";
};
+ 14BD6883215191310050DAFF /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 65FB3F6609D11E9100F49DEB;
+ remoteInfo = "Derived Sources";
+ };
+ 14BD6891215191450050DAFF /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 65FB3F6609D11E9100F49DEB;
+ remoteInfo = "Derived Sources";
+ };
+ 14BD68982151916D0050DAFF /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 14BD6881215191310050DAFF;
+ remoteInfo = JSCLLIntSettingsExtractor;
+ };
+ 14BD689A215191740050DAFF /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 14BD688F215191450050DAFF;
+ remoteInfo = "LLInt Settings";
+ };
53B4BD131F68C2AA00D2BEA3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
@@ -3180,6 +3222,8 @@
14BD5A2A0A3E91F600BAF59C /* JSContextRef.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSContextRef.h; sourceTree = "<group>"; };
14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSValueRef.cpp; sourceTree = "<group>"; };
14BD5A2D0A3E91F600BAF59C /* testapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testapi.c; path = API/tests/testapi.c; sourceTree = "<group>"; };
+ 14BD688E215191310050DAFF /* JSCLLIntSettingsExtractor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = JSCLLIntSettingsExtractor; sourceTree = BUILT_PRODUCTS_DIR; };
+ 14BD689C215191B30050DAFF /* LLIntSettingsExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntSettingsExtractor.cpp; path = llint/LLIntSettingsExtractor.cpp; sourceTree = "<group>"; };
14BE7D3217135CF400D1807A /* WeakInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakInlines.h; sourceTree = "<group>"; };
14BFCE6810CDB1FC00364CCE /* WeakGCMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakGCMap.h; sourceTree = "<group>"; };
14CA958A16AB50DE00938A06 /* StaticPropertyAnalyzer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticPropertyAnalyzer.h; sourceTree = "<group>"; };
@@ -3533,7 +3577,6 @@
5C4E8E951DBEBDA20036F1FC /* JSONParseTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONParseTest.h; path = API/tests/JSONParseTest.h; sourceTree = "<group>"; };
5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = /usr/lib/libedit.dylib; sourceTree = "<absolute>"; };
5DAFD6CB146B686300FBEFB4 /* JSC.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = JSC.xcconfig; sourceTree = "<group>"; };
- 5DDDF44614FEE72200B4FB4D /* LLIntDesiredOffsets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntDesiredOffsets.h; path = LLIntOffsets/LLIntDesiredOffsets.h; sourceTree = BUILT_PRODUCTS_DIR; };
5DE3D0F40DD8DDFB00468714 /* WebKitAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAvailability.h; sourceTree = "<group>"; };
623A37EB1B87A7BD00754209 /* RegisterMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterMap.h; sourceTree = "<group>"; };
627673211B680C1E00FD9F2E /* CallMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallMode.cpp; sourceTree = "<group>"; };
@@ -4870,6 +4913,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 14BD6888215191310050DAFF /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
651122FC14046A4C002B101D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -4929,6 +4979,7 @@
0F9327591C20BCBA00CF6564 /* dynbench */,
932F5BE10822A1C700736975 /* jsc */,
0FF922CF14F46B130041A24E /* JSCLLIntOffsetsExtractor */,
+ 14BD688E215191310050DAFF /* JSCLLIntSettingsExtractor */,
141211200A48793C00480255 /* minidom */,
0F6183431C45F62A0072450B /* testair */,
14BD59BF0A3E8F9000BAF59C /* testapi */,
@@ -5020,7 +5071,6 @@
0F4680C514BBB16900BFE272 /* LLIntCommon.h */,
0F4680CE14BBB3D100BFE272 /* LLIntData.cpp */,
0F4680CF14BBB3D100BFE272 /* LLIntData.h */,
- 5DDDF44614FEE72200B4FB4D /* LLIntDesiredOffsets.h */,
0F38B00F17CF077F00B144D3 /* LLIntEntrypoint.cpp */,
0F38B01017CF077F00B144D3 /* LLIntEntrypoint.h */,
0F46809D14BA7F8200BFE272 /* LLIntExceptions.cpp */,
@@ -5029,6 +5079,7 @@
0F4680A114BA7F8200BFE272 /* LLIntOffsetsExtractor.cpp */,
FED287B115EC9A5700DA8161 /* LLIntOpcode.h */,
79CFC6EF1C33B10000C768EA /* LLIntPCRanges.h */,
+ 14BD689C215191B30050DAFF /* LLIntSettingsExtractor.cpp */,
0F46809F14BA7F8200BFE272 /* LLIntSlowPaths.cpp */,
0F4680A014BA7F8200BFE272 /* LLIntSlowPaths.h */,
0F0B839714BCF45A00885B4F /* LLIntThunks.cpp */,
@@ -9807,6 +9858,25 @@
productReference = 14BD59BF0A3E8F9000BAF59C /* testapi */;
productType = "com.apple.product-type.tool";
};
+ 14BD6881215191310050DAFF /* JSCLLIntSettingsExtractor */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 14BD6889215191310050DAFF /* Build configuration list for PBXNativeTarget "JSCLLIntSettingsExtractor" */;
+ buildPhases = (
+ 14BD6886215191310050DAFF /* Sources */,
+ 14BD6888215191310050DAFF /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 14BD6882215191310050DAFF /* PBXTargetDependency */,
+ 14BD689B215191740050DAFF /* PBXTargetDependency */,
+ );
+ name = JSCLLIntSettingsExtractor;
+ productInstallPath = /usr/local/bin;
+ productName = jsc;
+ productReference = 14BD688E215191310050DAFF /* JSCLLIntSettingsExtractor */;
+ productType = "com.apple.product-type.tool";
+ };
651122F714046A4C002B101D /* testRegExp */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6511230014046A4C002B101D /* Build configuration list for PBXNativeTarget "testRegExp" */;
@@ -9929,8 +9999,10 @@
targets = (
932F5BE30822A1C700736975 /* All */,
932F5B3E0822A1C700736975 /* _javascript_Core */,
+ 65FB3F6609D11E9100F49DEB /* Derived Sources */,
+ 14BD688F215191450050DAFF /* LLInt Settings */,
+ 14BD6881215191310050DAFF /* JSCLLIntSettingsExtractor */,
0F4680A914BA7FD900BFE272 /* LLInt Offsets */,
- 65FB3F6609D11E9100F49DEB /* Derived Sources */,
0FF922C314F46B130041A24E /* JSCLLIntOffsetsExtractor */,
65788A9D18B409EB00C189FF /* Offline Assembler */,
53B4BD041F68AF8900D2BEA3 /* Generate Unified Sources */,
@@ -9972,8 +10044,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredOffsets.h\" \"${ARCHS} C_LOOP\"\n";
+ shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/JSCLLIntSettingsExtractor\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredOffsets.h\" \"${ARCHS} C_LOOP\"\n";
};
+ 14BD6892215191450050DAFF /* Generate Derived Sources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Generate Derived Sources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "set -e\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_settings_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredSettings.h\" \"${ARCHS} C_LOOP\"\n";
+ };
1A02D9A81B34A882000D1522 /* Add Symlink in /System/Library/PrivateFrameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
@@ -10246,6 +10332,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 14BD6886215191310050DAFF /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 14BD689D215191C10050DAFF /* LLIntSettingsExtractor.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
651122FA14046A4C002B101D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -10470,6 +10564,26 @@
target = 0F4680A914BA7FD900BFE272 /* LLInt Offsets */;
targetProxy = 0FF922D214F46B2F0041A24E /* PBXContainerItemProxy */;
};
+ 14BD6882215191310050DAFF /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 65FB3F6609D11E9100F49DEB /* Derived Sources */;
+ targetProxy = 14BD6883215191310050DAFF /* PBXContainerItemProxy */;
+ };
+ 14BD6890215191450050DAFF /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 65FB3F6609D11E9100F49DEB /* Derived Sources */;
+ targetProxy = 14BD6891215191450050DAFF /* PBXContainerItemProxy */;
+ };
+ 14BD68992151916D0050DAFF /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 14BD6881215191310050DAFF /* JSCLLIntSettingsExtractor */;
+ targetProxy = 14BD68982151916D0050DAFF /* PBXContainerItemProxy */;
+ };
+ 14BD689B215191740050DAFF /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 14BD688F215191450050DAFF /* LLInt Settings */;
+ targetProxy = 14BD689A215191740050DAFF /* PBXContainerItemProxy */;
+ };
53B4BD141F68C2AA00D2BEA3 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 53B4BD041F68AF8900D2BEA3 /* Generate Unified Sources */;
@@ -10856,6 +10970,90 @@
};
name = Production;
};
+ 14BD688A215191310050DAFF /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+ buildSettings = {
+ HEADER_SEARCH_PATHS = (
+ "\"${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\"",
+ "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
+ "\"$(_javascript_CORE_FRAMEWORKS_DIR)/_javascript_Core.framework/PrivateHeaders\"",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 14BD688B215191310050DAFF /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+ buildSettings = {
+ HEADER_SEARCH_PATHS = (
+ "\"${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\"",
+ "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
+ "\"$(_javascript_CORE_FRAMEWORKS_DIR)/_javascript_Core.framework/PrivateHeaders\"",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 14BD688C215191310050DAFF /* Profiling */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+ buildSettings = {
+ HEADER_SEARCH_PATHS = (
+ "\"${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\"",
+ "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
+ "\"$(_javascript_CORE_FRAMEWORKS_DIR)/_javascript_Core.framework/PrivateHeaders\"",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Profiling;
+ };
+ 14BD688D215191310050DAFF /* Production */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
+ buildSettings = {
+ HEADER_SEARCH_PATHS = (
+ "\"${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core\"",
+ "\"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"",
+ "\"$(_javascript_CORE_FRAMEWORKS_DIR)/_javascript_Core.framework/PrivateHeaders\"",
+ "$(inherited)",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Production;
+ };
+ 14BD6894215191450050DAFF /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 14BD6895215191450050DAFF /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 14BD6896215191450050DAFF /* Profiling */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Profiling;
+ };
+ 14BD6897215191450050DAFF /* Production */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Production;
+ };
53B4BD0B1F68AF8900D2BEA3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -11243,6 +11441,28 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Production;
};
+ 14BD6889215191310050DAFF /* Build configuration list for PBXNativeTarget "JSCLLIntSettingsExtractor" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 14BD688A215191310050DAFF /* Debug */,
+ 14BD688B215191310050DAFF /* Release */,
+ 14BD688C215191310050DAFF /* Profiling */,
+ 14BD688D215191310050DAFF /* Production */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Production;
+ };
+ 14BD6893215191450050DAFF /* Build configuration list for PBXAggregateTarget "LLInt Settings" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 14BD6894215191450050DAFF /* Debug */,
+ 14BD6895215191450050DAFF /* Release */,
+ 14BD6896215191450050DAFF /* Profiling */,
+ 14BD6897215191450050DAFF /* Production */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Production;
+ };
53B4BD0A1F68AF8900D2BEA3 /* Build configuration list for PBXAggregateTarget "Generate Unified Sources" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Modified: trunk/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp (237187 => 237188)
--- trunk/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp 2018-10-16 17:29:34 UTC (rev 237187)
+++ trunk/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp 2018-10-16 17:44:22 UTC (rev 237188)
@@ -60,6 +60,7 @@
#include "VM.h"
#include "ValueProfile.h"
#include "Watchdog.h"
+#include <stdio.h>
#include <wtf/text/StringImpl.h>
namespace JSC {
@@ -80,7 +81,7 @@
// classes friends with LLIntOffsetsExtractor, and include the header here, to get the C++
// compiler to kindly step aside and yield to our best intentions.
#include "LLIntDesiredOffsets.h"
- return extractorTable;
+ return offsetExtractorTable;
}
} // namespace JSC
Modified: trunk/Source/_javascript_Core/offlineasm/generate_offset_extractor.rb (237187 => 237188)
--- trunk/Source/_javascript_Core/offlineasm/generate_offset_extractor.rb 2018-10-16 17:29:34 UTC (rev 237187)
+++ trunk/Source/_javascript_Core/offlineasm/generate_offset_extractor.rb 2018-10-16 17:44:22 UTC (rev 237188)
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-# Copyright (C) 2011 Apple Inc. All rights reserved.
+# Copyright (C) 2011-2018 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -37,11 +37,19 @@
IncludeFile.processIncludeOptions()
inputFlnm = ARGV.shift
+settingsFlnm = ARGV.shift
outputFlnm = ARGV.shift
validBackends = canonicalizeBackendNames(ARGV.shift.split(/[,\s]+/))
includeOnlyBackends(validBackends)
+begin
+ configurationList = configurationIndices(settingsFlnm)
+rescue MissingMagicValuesException
+ $stderr.puts "OffsetExtractor: No magic values found. Skipping offsets extractor file generation."
+ exit 1
+end
+
def emitMagicNumber
OFFSET_MAGIC_NUMBERS.each {
| number |
@@ -49,7 +57,8 @@
}
end
-inputHash = "// offlineasm input hash: #{parseHash(inputFlnm)} #{selfHash}"
+configurationHash = Digest::SHA1.hexdigest(configurationList.join(' '))
+inputHash = "// OffsetExtractor input hash: #{parseHash(inputFlnm)} #{configurationHash} #{selfHash}"
if FileTest.exist? outputFlnm
File.open(outputFlnm, "r") {
@@ -56,115 +65,55 @@
| inp |
firstLine = inp.gets
if firstLine and firstLine.chomp == inputHash
- $stderr.puts "offlineasm: Nothing changed."
+ $stderr.puts "OffsetExtractor: Nothing changed."
exit 0
end
}
end
-originalAST = parse(inputFlnm)
+ast = parse(inputFlnm)
+settingsCombinations = computeSettingsCombinations(ast)
-#
-# Optimize the AST to make configuration extraction faster. This reduces the AST to a form
-# that only contains the things that matter for our purposes: offsets, sizes, and if
-# statements.
-#
-
-class Node
- def offsetsPruneTo(sequence)
- children.each {
- | child |
- child.offsetsPruneTo(sequence)
- }
- end
-
- def offsetsPrune
- result = Sequence.new(codeOrigin, [])
- offsetsPruneTo(result)
- result
- end
-end
-
-class IfThenElse
- def offsetsPruneTo(sequence)
- ifThenElse = IfThenElse.new(codeOrigin, predicate, thenCase.offsetsPrune)
- ifThenElse.elseCase = elseCase.offsetsPrune
- sequence.list << ifThenElse
- end
-end
-
-class StructOffset
- def offsetsPruneTo(sequence)
- sequence.list << self
- end
-end
-
-class Sizeof
- def offsetsPruneTo(sequence)
- sequence.list << self
- end
-end
-
-class ConstExpr
- def offsetsPruneTo(sequence)
- sequence.list << self
- end
-end
-
-prunedAST = originalAST.offsetsPrune
-
File.open(outputFlnm, "w") {
| outp |
$output = outp
outp.puts inputHash
- length = 0
- emitCodeInAllConfigurations(prunedAST) {
- | settings, ast, backend, index |
- constsList = ast.filter(ConstExpr).uniq.sort
+ outp.puts "static const int64_t offsetExtractorTable[] = {"
+ configurationList.each {
+ | configIndex |
+ forSettings(settingsCombinations[configIndex], ast) {
+ | concreteSettings, lowLevelAST, backend |
- constsList.each_with_index {
- | const, index |
- outp.puts "constexpr int64_t constValue#{index} = static_cast<int64_t>(#{const.value});"
- }
- }
+ offsetsList = offsetsList(lowLevelAST)
+ sizesList = sizesList(lowLevelAST)
+ constsList = constsList(lowLevelAST)
- emitCodeInAllConfigurations(prunedAST) {
- | settings, ast, backend, index |
- offsetsList = ast.filter(StructOffset).uniq.sort
- sizesList = ast.filter(Sizeof).uniq.sort
- constsList = ast.filter(ConstExpr).uniq.sort
- length += OFFSET_HEADER_MAGIC_NUMBERS.size + (OFFSET_MAGIC_NUMBERS.size + 1) * (1 + offsetsList.size + sizesList.size + constsList.size)
- }
- outp.puts "static const int64_t extractorTable[#{length}] = {"
- emitCodeInAllConfigurations(prunedAST) {
- | settings, ast, backend, index |
- OFFSET_HEADER_MAGIC_NUMBERS.each {
- | number |
- $output.puts "unsigned(#{number}),"
- }
+ emitCodeInConfiguration(concreteSettings, lowLevelAST, backend) {
+ OFFSET_HEADER_MAGIC_NUMBERS.each {
+ | number |
+ outp.puts "unsigned(#{number}),"
+ }
- offsetsList = ast.filter(StructOffset).uniq.sort
- sizesList = ast.filter(Sizeof).uniq.sort
- constsList = ast.filter(ConstExpr).uniq.sort
-
- emitMagicNumber
- outp.puts "#{index},"
- offsetsList.each {
- | offset |
- emitMagicNumber
- outp.puts "OFFLINE_ASM_OFFSETOF(#{offset.struct}, #{offset.field}),"
+ emitMagicNumber
+ outp.puts "#{configIndex},"
+ offsetsList.each {
+ | offset |
+ emitMagicNumber
+ outp.puts "OFFLINE_ASM_OFFSETOF(#{offset.struct}, #{offset.field}),"
+ }
+ sizesList.each {
+ | sizeof |
+ emitMagicNumber
+ outp.puts "sizeof(#{sizeof.struct}),"
+ }
+ constsList.each {
+ | const |
+ emitMagicNumber
+ outp.puts "static_cast<int64_t>(#{const.value}),"
+ }
+ }
}
- sizesList.each {
- | sizeof |
- emitMagicNumber
- outp.puts "sizeof(#{sizeof.struct}),"
- }
- constsList.each_index {
- | index |
- emitMagicNumber
- outp.puts "constValue#{index},"
- }
}
outp.puts "};"
Modified: trunk/Source/_javascript_Core/offlineasm/offsets.rb (237187 => 237188)
--- trunk/Source/_javascript_Core/offlineasm/offsets.rb 2018-10-16 17:29:34 UTC (rev 237187)
+++ trunk/Source/_javascript_Core/offlineasm/offsets.rb 2018-10-16 17:44:22 UTC (rev 237188)
@@ -56,65 +56,53 @@
ast.filter(ConstExpr).uniq.sort
end
-#
-# offsetsAndConfigurationIndex(ast, file) ->
-# [[offsets, index], ...]
-#
-# Parses the offsets from a file and returns a list of offsets and the
-# index of the configuration that is valid in this build target.
-#
+def readInt(endianness, bytes)
+ if endianness == :little
+ # Little endian
+ number = (bytes[0] << 0 |
+ bytes[1] << 8 |
+ bytes[2] << 16 |
+ bytes[3] << 24 |
+ bytes[4] << 32 |
+ bytes[5] << 40 |
+ bytes[6] << 48 |
+ bytes[7] << 56)
+ else
+ # Big endian
+ number = (bytes[0] << 56 |
+ bytes[1] << 48 |
+ bytes[2] << 40 |
+ bytes[3] << 32 |
+ bytes[4] << 24 |
+ bytes[5] << 16 |
+ bytes[6] << 8 |
+ bytes[7] << 0)
+ end
+ if number > 0x7fffffff_ffffffff
+ number -= 1 << 64
+ end
+ number
+end
-def offsetsAndConfigurationIndex(file)
- endiannessMarkerBytes = nil
- result = {}
-
- def readInt(endianness, bytes)
- if endianness == :little
- # Little endian
- number = (bytes[0] << 0 |
- bytes[1] << 8 |
- bytes[2] << 16 |
- bytes[3] << 24 |
- bytes[4] << 32 |
- bytes[5] << 40 |
- bytes[6] << 48 |
- bytes[7] << 56)
- else
- # Big endian
- number = (bytes[0] << 56 |
- bytes[1] << 48 |
- bytes[2] << 40 |
- bytes[3] << 32 |
- bytes[4] << 24 |
- bytes[5] << 16 |
- bytes[6] << 8 |
- bytes[7] << 0)
+def prepareMagic(endianness, numbers)
+ magicBytes = []
+ numbers.each {
+ | number |
+ currentBytes = []
+ 8.times {
+ currentBytes << (number & 0xff)
+ number >>= 8
+ }
+ if endianness == :big
+ currentBytes.reverse!
end
- if number > 0x7fffffff_ffffffff
- number -= 1 << 64
- end
- number
- end
-
- def prepareMagic(endianness, numbers)
- magicBytes = []
- numbers.each {
- | number |
- currentBytes = []
- 8.times {
- currentBytes << (number & 0xff)
- number >>= 8
- }
- if endianness == :big
- currentBytes.reverse!
- end
- magicBytes += currentBytes
- }
- magicBytes
- end
-
+ magicBytes += currentBytes
+ }
+ magicBytes
+end
+
+def fileBytes(file)
fileBytes = []
-
File.open(file, "rb") {
| inp |
loop {
@@ -123,36 +111,50 @@
fileBytes << byte
}
}
-
- def sliceByteArrays(byteArray, pattern)
- result = []
- lastSlicePoint = 0
- (byteArray.length - pattern.length + 1).times {
- | index |
- foundOne = true
- pattern.length.times {
- | subIndex |
- if byteArray[index + subIndex] != pattern[subIndex]
- foundOne = false
- break
- end
- }
- if foundOne
- result << byteArray[lastSlicePoint...index]
- lastSlicePoint = index + pattern.length
+ fileBytes
+end
+
+def sliceByteArrays(byteArray, pattern)
+ result = []
+ lastSlicePoint = 0
+ (byteArray.length - pattern.length + 1).times {
+ | index |
+ foundOne = true
+ pattern.length.times {
+ | subIndex |
+ if byteArray[index + subIndex] != pattern[subIndex]
+ foundOne = false
+ break
end
}
-
- result << byteArray[lastSlicePoint...(byteArray.length)]
-
- result
- end
-
+ if foundOne
+ result << byteArray[lastSlicePoint...index]
+ lastSlicePoint = index + pattern.length
+ end
+ }
+
+ result << byteArray[lastSlicePoint...(byteArray.length)]
+
+ result
+end
+
+#
+# offsetsAndConfigurationIndex(ast, file) ->
+# [[offsets, index], ...]
+#
+# Parses the offsets from a file and returns a list of offsets and the
+# index of the configuration that is valid in this build target.
+#
+
+def offsetsAndConfigurationIndex(file)
+ fileBytes = fileBytes(file)
+ result = {}
+
[:little, :big].each {
| endianness |
headerMagicBytes = prepareMagic(endianness, OFFSET_HEADER_MAGIC_NUMBERS)
magicBytes = prepareMagic(endianness, OFFSET_MAGIC_NUMBERS)
-
+
bigArray = sliceByteArrays(fileBytes, headerMagicBytes)
unless bigArray.size <= 1
bigArray[1..-1].each {
@@ -168,9 +170,9 @@
}
end
}
-
+
raise MissingMagicValuesException unless result.length >= 1
-
+
# result is {index1=>offsets1, index2=>offsets2} but we want to return
# [[offsets1, index1], [offsets2, index2]].
return result.map {
@@ -180,6 +182,36 @@
end
#
+# configurationIndices(ast, file) ->
+# [[offsets, index], ...]
+#
+# Parses the configurations from a file and returns a list of the indices of
+# the configurations that are valid in this build target.
+#
+
+def configurationIndices(file)
+ fileBytes = fileBytes(file)
+ result = []
+
+ [:little, :big].each {
+ | endianness |
+ headerMagicBytes = prepareMagic(endianness, OFFSET_HEADER_MAGIC_NUMBERS)
+
+ bigArray = sliceByteArrays(fileBytes, headerMagicBytes)
+ unless bigArray.size <= 1
+ bigArray[1..-1].each {
+ | configArray |
+ result << readInt(endianness, configArray)
+ }
+ end
+ }
+
+ raise MissingMagicValuesException unless result.length >= 1
+
+ return result
+end
+
+#
# buildOffsetsMap(ast, extractedConstants) -> map
#
# Builds a mapping between StructOffset, Sizeof, and ConstExpr nodes and their values.
Modified: trunk/Source/_javascript_Core/offlineasm/settings.rb (237187 => 237188)
--- trunk/Source/_javascript_Core/offlineasm/settings.rb 2018-10-16 17:29:34 UTC (rev 237187)
+++ trunk/Source/_javascript_Core/offlineasm/settings.rb 2018-10-16 17:44:22 UTC (rev 237188)
@@ -90,7 +90,6 @@
def forSettings(concreteSettings, ast)
# Check which architectures this combinator claims to support.
- numClaimedBackends = 0
selectedBackend = nil
BACKENDS.each {
| backend |