Commit 45207fbe authored by Alberto Garcia's avatar Alberto Garcia
Browse files

New upstream version 2.17.92

parent b2dfe431
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKit2GTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.17.91</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.17.92</p></div>
</div>
<hr>
</div>
......
......@@ -177,7 +177,7 @@ against at application run time.</p>
<hr>
<div class="refsect2">
<a name="WEBKIT-MICRO-VERSION:CAPS"></a><h3>WEBKIT_MICRO_VERSION</h3>
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (91)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (92)
</pre>
<p>Like <a class="link" href="webkit2gtk-4.0-WebKitVersion.html#webkit-get-micro-version" title="webkit_get_micro_version ()"><code class="function">webkit_get_micro_version()</code></a>, but from the headers used at
application compile time, rather than from the library linked
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitDOMGTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.17.91</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.17.92</p></div>
</div>
<hr>
</div>
......
==================
WebKitGTK+ 2.17.92
==================
What's new in WebKitGTK+ 2.17.92?
- Improve CPU usage when rendering under Wayland in accelerated compositing mode.
- Improve the memory consumption of the UI process under Wayland.
- Fix rendering issues in some web sites with accelerated compositing enabled.
- Fix a web process crash when closing the WebView.
- Initialize libgcrypt in the network process too.
- Show controls if a video element isn't allowed to play inline.
- Add support for cookies and screenshots commands in WebDriver.
- Fix several crashes and rendering issues.
- Translation updates: Brazilian Portuguese, Polish.
==================
WebKitGTK+ 2.17.91
==================
......
......@@ -927,8 +927,8 @@ set(JavaScriptCore_SOURCES
runtime/VMTraps.cpp
runtime/VarOffset.cpp
runtime/Watchdog.cpp
runtime/WeakMapBase.cpp
runtime/WeakMapConstructor.cpp
runtime/WeakMapData.cpp
runtime/WeakMapPrototype.cpp
runtime/WeakSetConstructor.cpp
runtime/WeakSetPrototype.cpp
......
......@@ -2490,18 +2490,18 @@ void CodeBlock::updateAllPredictionsAndCountLiveness(unsigned& numberOfLiveNonAr
numberOfLiveNonArgumentValueProfiles = 0;
numberOfSamplesInProfiles = 0; // If this divided by ValueProfile::numberOfBuckets equals numberOfValueProfiles() then value profiles are full.
for (unsigned i = 0; i < totalNumberOfValueProfiles(); ++i) {
ValueProfile* profile = getFromAllValueProfiles(i);
unsigned numSamples = profile->totalNumberOfSamples();
ValueProfile& profile = getFromAllValueProfiles(i);
unsigned numSamples = profile.totalNumberOfSamples();
if (numSamples > ValueProfile::numberOfBuckets)
numSamples = ValueProfile::numberOfBuckets; // We don't want profiles that are extremely hot to be given more weight.
numberOfSamplesInProfiles += numSamples;
if (profile->m_bytecodeOffset < 0) {
profile->computeUpdatedPrediction(locker);
if (profile.m_bytecodeOffset < 0) {
profile.computeUpdatedPrediction(locker);
continue;
}
if (profile->numberOfSamples() || profile->m_prediction != SpecNone)
if (profile.numberOfSamples() || profile.m_prediction != SpecNone)
numberOfLiveNonArgumentValueProfiles++;
profile->computeUpdatedPrediction(locker);
profile.computeUpdatedPrediction(locker);
}
#if ENABLE(DFG_JIT)
......@@ -2609,17 +2609,17 @@ void CodeBlock::dumpValueProfiles()
{
dataLog("ValueProfile for ", *this, ":\n");
for (unsigned i = 0; i < totalNumberOfValueProfiles(); ++i) {
ValueProfile* profile = getFromAllValueProfiles(i);
if (profile->m_bytecodeOffset < 0) {
ASSERT(profile->m_bytecodeOffset == -1);
ValueProfile& profile = getFromAllValueProfiles(i);
if (profile.m_bytecodeOffset < 0) {
ASSERT(profile.m_bytecodeOffset == -1);
dataLogF(" arg = %u: ", i);
} else
dataLogF(" bc = %d: ", profile->m_bytecodeOffset);
if (!profile->numberOfSamples() && profile->m_prediction == SpecNone) {
dataLogF(" bc = %d: ", profile.m_bytecodeOffset);
if (!profile.numberOfSamples() && profile.m_prediction == SpecNone) {
dataLogF("<empty>\n");
continue;
}
profile->dump(WTF::dataFile());
profile.dump(WTF::dataFile());
dataLogF("\n");
}
dataLog("RareCaseProfile for ", *this, ":\n");
......@@ -2739,11 +2739,19 @@ String CodeBlock::nameForRegister(VirtualRegister virtualRegister)
return "";
}
ValueProfile* CodeBlock::valueProfileForBytecodeOffset(int bytecodeOffset)
ValueProfile* CodeBlock::tryGetValueProfileForBytecodeOffset(int bytecodeOffset)
{
return tryBinarySearch<ValueProfile, int>(
m_valueProfiles, m_valueProfiles.size(), bytecodeOffset,
getValueProfileBytecodeOffset<ValueProfile>);
}
ValueProfile& CodeBlock::valueProfileForBytecodeOffset(int bytecodeOffset)
{
OpcodeID opcodeID = Interpreter::getOpcodeID(instructions()[bytecodeOffset]);
unsigned length = opcodeLength(opcodeID);
return instructions()[bytecodeOffset + length - 1].u.profile;
ASSERT(!!tryGetValueProfileForBytecodeOffset(bytecodeOffset));
return *instructions()[bytecodeOffset + length - 1].u.profile;
}
void CodeBlock::validate()
......@@ -2770,6 +2778,14 @@ void CodeBlock::validate()
endValidationDidFail();
}
}
for (unsigned i = 0; i + 1 < numberOfValueProfiles(); ++i) {
if (valueProfile(i).m_bytecodeOffset > valueProfile(i + 1).m_bytecodeOffset) {
beginValidationDidFail();
dataLog(" Value profiles are not sorted.\n");
endValidationDidFail();
}
}
}
void CodeBlock::beginValidationDidFail()
......
......@@ -401,19 +401,20 @@ public:
ASSERT(m_argumentValueProfiles.size() == static_cast<unsigned>(m_numParameters));
return m_argumentValueProfiles.size();
}
ValueProfile* valueProfileForArgument(unsigned argumentIndex)
ValueProfile& valueProfileForArgument(unsigned argumentIndex)
{
ValueProfile* result = &m_argumentValueProfiles[argumentIndex];
ASSERT(result->m_bytecodeOffset == -1);
ValueProfile& result = m_argumentValueProfiles[argumentIndex];
ASSERT(result.m_bytecodeOffset == -1);
return result;
}
unsigned numberOfValueProfiles() { return m_valueProfiles.size(); }
ValueProfile* valueProfile(int index) { return &m_valueProfiles[index]; }
ValueProfile* valueProfileForBytecodeOffset(int bytecodeOffset);
ValueProfile& valueProfile(int index) { return m_valueProfiles[index]; }
ValueProfile& valueProfileForBytecodeOffset(int bytecodeOffset);
ValueProfile* tryGetValueProfileForBytecodeOffset(int bytecodeOffset);
SpeculatedType valueProfilePredictionForBytecodeOffset(const ConcurrentJSLocker& locker, int bytecodeOffset)
{
if (ValueProfile* valueProfile = valueProfileForBytecodeOffset(bytecodeOffset))
if (ValueProfile* valueProfile = tryGetValueProfileForBytecodeOffset(bytecodeOffset))
return valueProfile->computeUpdatedPrediction(locker);
return SpecNone;
}
......@@ -422,7 +423,7 @@ public:
{
return numberOfArgumentValueProfiles() + numberOfValueProfiles();
}
ValueProfile* getFromAllValueProfiles(unsigned index)
ValueProfile& getFromAllValueProfiles(unsigned index)
{
if (index < numberOfArgumentValueProfiles())
return valueProfileForArgument(index);
......
......@@ -1907,8 +1907,8 @@ bool ByteCodeParser::handleInlining(
// calls.
if (codeBlock && argument < static_cast<unsigned>(codeBlock->numParameters())) {
ConcurrentJSLocker locker(codeBlock->m_lock);
if (ValueProfile* profile = codeBlock->valueProfileForArgument(argument))
variable->predict(profile->computeUpdatedPrediction(locker));
ValueProfile& profile = codeBlock->valueProfileForArgument(argument);
variable->predict(profile.computeUpdatedPrediction(locker));
}
Node* setArgument = addToGraph(SetArgument, OpInfo(variable));
......
......@@ -1532,7 +1532,7 @@ MethodOfGettingAValueProfile Graph::methodOfGettingAValueProfileFor(Node* curren
return nullptr;
if (node->variableAccessData() != argumentNode->variableAccessData())
return nullptr;
return profiledBlock->valueProfileForArgument(argument);
return &profiledBlock->valueProfileForArgument(argument);
}();
if (result)
return result;
......@@ -1546,7 +1546,7 @@ MethodOfGettingAValueProfile Graph::methodOfGettingAValueProfileFor(Node* curren
}
if (node->hasHeapPrediction())
return profiledBlock->valueProfileForBytecodeOffset(node->origin.semantic.bytecodeIndex);
return &profiledBlock->valueProfileForBytecodeOffset(node->origin.semantic.bytecodeIndex);
if (profiledBlock->hasBaselineJITProfiling()) {
if (ArithProfile* result = profiledBlock->arithProfileForBytecodeOffset(node->origin.semantic.bytecodeIndex))
......
......@@ -52,12 +52,9 @@ public:
ConcurrentJSLocker locker(profiledBlock()->m_lock);
for (size_t arg = 0; arg < static_cast<size_t>(codeBlock()->numParameters()); ++arg) {
ValueProfile* profile = profiledBlock()->valueProfileForArgument(arg);
if (!profile)
continue;
ValueProfile& profile = profiledBlock()->valueProfileForArgument(arg);
m_graph.m_arguments[arg]->variableAccessData()->predict(
profile->computeUpdatedPrediction(locker));
profile.computeUpdatedPrediction(locker));
}
}
......
......@@ -57,7 +57,7 @@
#include "ScopedArguments.h"
#include "SourceCode.h"
#include "TypedArrayInlines.h"
#include "WeakMapData.h"
#include "WeakMapBase.h"
using namespace JSC;
......@@ -424,7 +424,7 @@ JSValue JSInjectedScriptHost::weakMapSize(ExecState* exec)
if (!weakMap)
return jsUndefined();
return jsNumber(weakMap->weakMapData()->size());
return jsNumber(weakMap->size());
}
JSValue JSInjectedScriptHost::weakMapEntries(ExecState* exec)
......@@ -449,7 +449,7 @@ JSValue JSInjectedScriptHost::weakMapEntries(ExecState* exec)
JSArray* array = constructEmptyArray(exec, nullptr);
RETURN_IF_EXCEPTION(scope, JSValue());
for (auto it = weakMap->weakMapData()->begin(); it != weakMap->weakMapData()->end(); ++it) {
for (auto it = weakMap->begin(); it != weakMap->end(); ++it) {
JSObject* entry = constructEmptyObject(exec);
entry->putDirect(exec->vm(), Identifier::fromString(exec, "key"), it->key);
entry->putDirect(exec->vm(), Identifier::fromString(exec, "value"), it->value.get());
......@@ -473,7 +473,7 @@ JSValue JSInjectedScriptHost::weakSetSize(ExecState* exec)
if (!weakSet)
return jsUndefined();
return jsNumber(weakSet->weakMapData()->size());
return jsNumber(weakSet->size());
}
JSValue JSInjectedScriptHost::weakSetEntries(ExecState* exec)
......@@ -498,7 +498,7 @@ JSValue JSInjectedScriptHost::weakSetEntries(ExecState* exec)
JSArray* array = constructEmptyArray(exec, nullptr);
RETURN_IF_EXCEPTION(scope, JSValue());
for (auto it = weakSet->weakMapData()->begin(); it != weakSet->weakMapData()->end(); ++it) {
for (auto it = weakSet->begin(); it != weakSet->end(); ++it) {
JSObject* entry = constructEmptyObject(exec);
entry->putDirect(exec->vm(), Identifier::fromString(exec, "value"), it->key);
array->putDirectIndex(exec, fetched++, entry);
......
......@@ -334,7 +334,7 @@ namespace JSC {
// This assumes that the value to profile is in regT0 and that regT3 is available for
// scratch.
void emitValueProfilingSite(ValueProfile*);
void emitValueProfilingSite(ValueProfile&);
void emitValueProfilingSite(unsigned bytecodeOffset);
void emitValueProfilingSite();
void emitArrayProfilingSiteWithCell(RegisterID cell, RegisterID indexingType, ArrayProfile*);
......
......@@ -968,10 +968,9 @@ ALWAYS_INLINE bool JIT::isOperandConstantChar(int src)
return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isString() && asString(getConstantOperand(src).asCell())->length() == 1;
}
inline void JIT::emitValueProfilingSite(ValueProfile* valueProfile)
inline void JIT::emitValueProfilingSite(ValueProfile& valueProfile)
{
ASSERT(shouldEmitProfiling());
ASSERT(valueProfile);
const RegisterID value = regT0;
#if USE(JSVALUE32_64)
......@@ -981,9 +980,9 @@ inline void JIT::emitValueProfilingSite(ValueProfile* valueProfile)
// We're in a simple configuration: only one bucket, so we can just do a direct
// store.
#if USE(JSVALUE64)
store64(value, valueProfile->m_buckets);
store64(value, valueProfile.m_buckets);
#else
EncodedValueDescriptor* descriptor = bitwise_cast<EncodedValueDescriptor*>(valueProfile->m_buckets);
EncodedValueDescriptor* descriptor = bitwise_cast<EncodedValueDescriptor*>(valueProfile.m_buckets);
store32(value, &descriptor->asBits.payload);
store32(valueTag, &descriptor->asBits.tag);
#endif
......
......@@ -41,7 +41,7 @@ BytecodeSequence::BytecodeSequence(CodeBlock* codeBlock)
for (unsigned i = 0; i < codeBlock->numberOfArgumentValueProfiles(); ++i) {
ConcurrentJSLocker locker(codeBlock->m_lock);
CString description = codeBlock->valueProfileForArgument(i)->briefDescription(locker);
CString description = codeBlock->valueProfileForArgument(i).briefDescription(locker);
if (!description.length())
continue;
out.reset();
......
......@@ -27,25 +27,12 @@
#include "JSWeakMap.h"
#include "JSCInlines.h"
#include "WeakMapData.h"
#include "WeakMapBase.h"
namespace JSC {
const ClassInfo JSWeakMap::s_info = { "WeakMap", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSWeakMap) };
void JSWeakMap::finishCreation(VM& vm)
{
Base::finishCreation(vm);
m_weakMapData.set(vm, this, WeakMapData::create(vm));
}
void JSWeakMap::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
Base::visitChildren(cell, visitor);
JSWeakMap* thisObj = jsCast<JSWeakMap*>(cell);
visitor.append(thisObj->m_weakMapData);
}
String JSWeakMap::toStringName(const JSObject*, ExecState*)
{
return ASCIILiteral("Object");
......
......@@ -26,14 +26,13 @@
#pragma once
#include "JSObject.h"
#include "WeakMapBase.h"
namespace JSC {
class WeakMapData;
class JSWeakMap : public JSNonFinalObject {
class JSWeakMap final : public WeakMapBase {
public:
typedef JSNonFinalObject Base;
using Base = WeakMapBase;
DECLARE_EXPORT_INFO;
......@@ -54,26 +53,13 @@ public:
return create(exec->vm(), structure);
}
WeakMapData* weakMapData() { return m_weakMapData.get(); }
JSValue get(CallFrame*, JSObject*);
bool has(CallFrame*, JSObject*);
bool remove(CallFrame*, JSObject*);
void set(CallFrame*, JSObject*, JSValue);
void clear(CallFrame*);
private:
JSWeakMap(VM& vm, Structure* structure)
: Base(vm, structure)
{
}
void finishCreation(VM&);
static void visitChildren(JSCell*, SlotVisitor&);
static String toStringName(const JSObject*, ExecState*);
WriteBarrier<WeakMapData> m_weakMapData;
};
} // namespace JSC
......@@ -27,25 +27,12 @@
#include "JSWeakSet.h"
#include "JSCInlines.h"
#include "WeakMapData.h"
#include "WeakMapBase.h"
namespace JSC {
const ClassInfo JSWeakSet::s_info = { "WeakSet", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSWeakSet) };
void JSWeakSet::finishCreation(VM& vm)
{
Base::finishCreation(vm);
m_weakMapData.set(vm, this, WeakMapData::create(vm));
}
void JSWeakSet::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
Base::visitChildren(cell, visitor);
JSWeakSet* thisObj = jsCast<JSWeakSet*>(cell);
visitor.append(thisObj->m_weakMapData);
}
String JSWeakSet::toStringName(const JSC::JSObject*, ExecState*)
{
return ASCIILiteral("Object");
......
......@@ -26,14 +26,13 @@
#pragma once
#include "JSObject.h"
#include "WeakMapBase.h"
namespace JSC {
class WeakMapData;
class JSWeakSet : public JSNonFinalObject {
class JSWeakSet final : public WeakMapBase {
public:
typedef JSNonFinalObject Base;
using Base = WeakMapBase;
DECLARE_EXPORT_INFO;
......@@ -54,26 +53,13 @@ public:
return create(exec->vm(), structure);
}
WeakMapData* weakMapData() { return m_weakMapData.get(); }
JSValue get(CallFrame*, JSObject*);
bool has(CallFrame*, JSObject*);
bool remove(CallFrame*, JSObject*);
void set(CallFrame*, JSObject*, JSValue);
void clear(CallFrame*);
private:
JSWeakSet(VM& vm, Structure* structure)
: Base(vm, structure)
{
}
void finishCreation(VM&);
static void visitChildren(JSCell*, SlotVisitor&);
static String toStringName(const JSObject*, ExecState*);
WriteBarrier<WeakMapData> m_weakMapData;
};
} // namespace JSC
......@@ -272,7 +272,7 @@ template <ParserMode mode> TokenType LiteralParser<CharType>::Lexer::lex(Literal
if (*m_ptr == ';') {
token.type = TokSemi;
token.end = ++m_ptr;
return TokAssign;
return TokSemi;
}
if (isASCIIAlpha(*m_ptr) || *m_ptr == '_' || *m_ptr == '$')
return lexIdentifier(token);
......@@ -317,11 +317,15 @@ ALWAYS_INLINE TokenType LiteralParser<UChar>::Lexer::lexIdentifier(LiteralParser
template <typename CharType>
TokenType LiteralParser<CharType>::Lexer::next()
{
TokenType result;
if (m_mode == NonStrictJSON)
return lex<NonStrictJSON>(m_currentToken);
if (m_mode == JSONP)
return lex<JSONP>(m_currentToken);
return lex<StrictJSON>(m_currentToken);
result = lex<NonStrictJSON>(m_currentToken);
else if (m_mode == JSONP)
result = lex<JSONP>(m_currentToken);
else
result = lex<StrictJSON>(m_currentToken);
ASSERT(m_currentToken.type == result);
return result;
}
template <>
......
......@@ -111,7 +111,6 @@
#include "WasmWorklist.h"
#include "Watchdog.h"
#include "WeakGCMapInlines.h"
#include "WeakMapData.h"
#include <wtf/CurrentTime.h>
#include <wtf/ProcessID.h>
#include <wtf/ReadWriteLock.h>
......@@ -260,7 +259,6 @@ VM::VM(VMType vmType, HeapType heapType)
unlinkedFunctionCodeBlockStructure.set(*this, UnlinkedFunctionCodeBlock::createStructure(*this, 0, jsNull()));
unlinkedModuleProgramCodeBlockStructure.set(*this, UnlinkedModuleProgramCodeBlock::createStructure(*this, 0, jsNull()));
propertyTableStructure.set(*this, PropertyTable::createStructure(*this, 0, jsNull()));
weakMapDataStructure.set(*this, WeakMapData::createStructure(*this, 0, jsNull()));
inferredValueStructure.set(*this, InferredValue::createStructure(*this, 0, jsNull()));
inferredTypeStructure.set(*this, InferredType::createStructure(*this, 0, jsNull()));
inferredTypeTableStructure.set(*this, InferredTypeTable::createStructure(*this, 0, jsNull()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment