Changeset 253010 in webkit
- Timestamp:
- Dec 2, 2019 2:45:25 PM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/CMakeLists.txt
r252843 r253010 226 226 endif () 227 227 228 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeCacheVersion.h "#define JSC_BYTECODE_CACHE_VERSION ${BUILD_TIME}\n")229 230 228 list(APPEND JavaScriptCore_HEADERS 231 ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeCacheVersion.h232 229 ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h 233 230 ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h -
trunk/Source/JavaScriptCore/ChangeLog
r253008 r253010 1 2019-12-02 Tadeu Zagallo <tzagallo@apple.com> 2 3 [JSC] Remove BytecodeCacheVersion.h 4 https://bugs.webkit.org/show_bug.cgi?id=204760 5 6 Reviewed by Mark Lam. 7 8 Having that as a phony make target causes a lot of unnecessary rebuilds. That was a workaround 9 the fact that we only need a new cache version when we rebuild CachedTypes.cpp, but there was 10 no straightforward way to get the current timestamp as an integer at that point. Instead, we now 11 just use a constexpr function that hashes __TIMESTAMP__. 12 13 * CMakeLists.txt: 14 * DerivedSources-output.xcfilelist: 15 * DerivedSources.make: 16 * runtime/CachedTypes.cpp: 17 (JSC::jscBytecodeCacheVersion): 18 (JSC::GenericCacheEntry::isUpToDate const): 19 1 20 2019-12-02 Mark Lam <mark.lam@apple.com> 2 21 -
trunk/Source/JavaScriptCore/DerivedSources-output.xcfilelist
r251886 r253010 9 9 $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/BigIntPrototype.lut.h 10 10 $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/BooleanPrototype.lut.h 11 $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/BytecodeCacheVersion.h12 11 $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/BytecodeIndices.h 13 12 $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/BytecodeStructs.h -
trunk/Source/JavaScriptCore/DerivedSources.make
r251959 r253010 364 364 $(OBJECT_LUT_HEADERS) \ 365 365 # 366 367 .PHONY : BytecodeCacheVersion.h368 369 BytecodeCacheVersion.h:370 echo "#define JSC_BYTECODE_CACHE_VERSION $(shell date '+%s')" > BytecodeCacheVersion.h371 372 all : BytecodeCacheVersion.h -
trunk/Source/JavaScriptCore/runtime/CachedTypes.cpp
r252032 r253010 28 28 29 29 #include "BytecodeCacheError.h" 30 #include "BytecodeCacheVersion.h"31 30 #include "BytecodeLivenessAnalysis.h" 32 31 #include "JSCInlines.h" … … 65 64 template<typename T> 66 65 using SourceType = typename SourceTypeImpl<T>::type; 66 67 static constexpr unsigned jscBytecodeCacheVersion() 68 { 69 return StringHasher::computeHash(__TIMESTAMP__); 70 } 67 71 68 72 class Encoder { … … 2266 2270 bool isUpToDate(Decoder& decoder) const 2267 2271 { 2268 if (m_cacheVersion != JSC_BYTECODE_CACHE_VERSION)2272 if (m_cacheVersion != jscBytecodeCacheVersion()) 2269 2273 return false; 2270 2274 if (m_bootSessionUUID.decode(decoder) != bootSessionUUIDString()) … … 2274 2278 2275 2279 private: 2276 uint32_t m_cacheVersion { JSC_BYTECODE_CACHE_VERSION};2280 uint32_t m_cacheVersion { jscBytecodeCacheVersion() }; 2277 2281 CachedString m_bootSessionUUID; 2278 2282 CachedCodeBlockTag m_tag;
Note: See TracChangeset
for help on using the changeset viewer.