Ignore:
Timestamp:
Aug 23, 2013, 10:53:11 AM (12 years ago)
Author:
[email protected]
Message:

Support in memory compression of rarely used data
https://bugs.webkit.org/show_bug.cgi?id=120143

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

Include zlib in LD_FLAGS and make UnlinkedCodeBlock make use of CompressibleVector. This saves ~200k on google maps.

  • Configurations/JavaScriptCore.xcconfig:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
(JSC::UnlinkedCodeBlock::addExpressionInfo):

  • bytecode/UnlinkedCodeBlock.h:

Source/WTF:

Adds a set of utility functions to wrap the use of zlib over a generic
type or a Vector<> as well as adding CompressibleVector that wraps
either a Vector<> or compressed data.

  • GNUmakefile.list.am:
  • WTF.pro:
  • WTF.vcxproj/WTF.vcxproj:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CheckedArithmetic.h:
  • wtf/Compression.cpp: Added.

(WTF::zAlloc):
(WTF::zFree):
(WTF::GenericCompressedData::create):
(WTF::GenericCompressedData::decompress):

  • wtf/Compression.h: Added.

(WTF::GenericCompressedData::compressedSize):
(WTF::GenericCompressedData::originalSize):
(WTF::GenericCompressedData::GenericCompressedData):
(WTF::CompressedVector::create):
(WTF::CompressedVector::decompress):
(WTF::CompressedVector::size):
(WTF::CompressibleVector::CompressibleVector):
(WTF::CompressibleVector::shrinkToFit):
(WTF::CompressibleVector::size):
(WTF::CompressibleVector::operator[]):
(WTF::CompressibleVector::at):
(WTF::CompressibleVector::begin):
(WTF::CompressibleVector::end):
(WTF::CompressibleVector::data):
(WTF::CompressibleVector::decompressIfNecessary):

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.