Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog (199465 => 199466)
--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog 2016-04-13 12:23:48 UTC (rev 199465)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog 2016-04-13 12:27:09 UTC (rev 199466)
@@ -1,3 +1,13 @@
+2016-03-30 Saam Barati <[email protected]>
+
+ Change some release asserts in CodeBlock linking into debug asserts
+ https://bugs.webkit.org/show_bug.cgi?id=155500
+
+ Reviewed by Filip Pizlo.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::finishCreation):
+
2016-03-29 Yusuke Suzuki <[email protected]>
REGRESSION(r192914): 10% regression on Sunspider's date-format-tofte
Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/bytecode/CodeBlock.cpp (199465 => 199466)
--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/bytecode/CodeBlock.cpp 2016-04-13 12:23:48 UTC (rev 199465)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/bytecode/CodeBlock.cpp 2016-04-13 12:27:09 UTC (rev 199466)
@@ -1858,20 +1858,27 @@
m_constantRegisters[registerIndex].set(*m_vm, this, m_globalObject->jsCellForLinkTimeConstant(type));
}
+#if !ASSERT_DISABLED
HashSet<int, WTF::IntHash<int>, WTF::UnsignedWithZeroKeyHashTraits<int>> clonedConstantSymbolTables;
+#endif
{
+#if !ASSERT_DISABLED
HashSet<SymbolTable*> clonedSymbolTables;
+#endif
+ bool hasTypeProfiler = !!vm.typeProfiler();
for (unsigned i = 0; i < m_constantRegisters.size(); i++) {
if (m_constantRegisters[i].get().isEmpty())
continue;
if (SymbolTable* symbolTable = jsDynamicCast<SymbolTable*>(m_constantRegisters[i].get())) {
- RELEASE_ASSERT(clonedSymbolTables.add(symbolTable).isNewEntry);
- if (m_vm->typeProfiler()) {
+ ASSERT(clonedSymbolTables.add(symbolTable).isNewEntry);
+ if (hasTypeProfiler) {
ConcurrentJITLocker locker(symbolTable->m_lock);
symbolTable->prepareForTypeProfiling(locker);
}
m_constantRegisters[i].set(*m_vm, this, symbolTable->cloneScopePart(*m_vm));
+#if !ASSERT_DISABLED
clonedConstantSymbolTables.add(i + FirstConstantRegisterIndex);
+#endif
}
}
}
@@ -1887,10 +1894,11 @@
replaceConstant(unlinkedModuleProgramCodeBlock->moduleEnvironmentSymbolTableConstantRegisterOffset(), clonedSymbolTable);
}
+ bool shouldUpdateFunctionHasExecutedCache = vm.typeProfiler() || vm.controlFlowProfiler();
m_functionDecls = RefCountedArray<WriteBarrier<FunctionExecutable>>(unlinkedCodeBlock->numberOfFunctionDecls());
for (size_t count = unlinkedCodeBlock->numberOfFunctionDecls(), i = 0; i < count; ++i) {
UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionDecl(i);
- if (vm.typeProfiler() || vm.controlFlowProfiler())
+ if (shouldUpdateFunctionHasExecutedCache)
vm.functionHasExecutedCache()->insertUnexecutedRange(ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
m_functionDecls[i].set(*m_vm, this, unlinkedExecutable->link(*m_vm, ownerExecutable->source()));
}
@@ -1898,7 +1906,7 @@
m_functionExprs = RefCountedArray<WriteBarrier<FunctionExecutable>>(unlinkedCodeBlock->numberOfFunctionExprs());
for (size_t count = unlinkedCodeBlock->numberOfFunctionExprs(), i = 0; i < count; ++i) {
UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionExpr(i);
- if (vm.typeProfiler() || vm.controlFlowProfiler())
+ if (shouldUpdateFunctionHasExecutedCache)
vm.functionHasExecutedCache()->insertUnexecutedRange(ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
m_functionExprs[i].set(*m_vm, this, unlinkedExecutable->link(*m_vm, ownerExecutable->source()));
}
@@ -2070,11 +2078,13 @@
case op_get_array_length:
CRASH();
+#if !ASSERT_DISABLED
case op_create_lexical_environment: {
int symbolTableIndex = pc[3].u.operand;
- RELEASE_ASSERT(clonedConstantSymbolTables.contains(symbolTableIndex));
+ ASSERT(clonedConstantSymbolTables.contains(symbolTableIndex));
break;
}
+#endif
case op_resolve_scope: {
const Identifier& ident = identifier(pc[3].u.operand);
@@ -2139,12 +2149,12 @@
// Only do watching if the property we're putting to is not anonymous.
if (static_cast<unsigned>(pc[2].u.operand) != UINT_MAX) {
int symbolTableIndex = pc[5].u.operand;
- RELEASE_ASSERT(clonedConstantSymbolTables.contains(symbolTableIndex));
+ ASSERT(clonedConstantSymbolTables.contains(symbolTableIndex));
SymbolTable* symbolTable = jsCast<SymbolTable*>(getConstant(symbolTableIndex));
const Identifier& ident = identifier(pc[2].u.operand);
ConcurrentJITLocker locker(symbolTable->m_lock);
auto iter = symbolTable->find(locker, ident.impl());
- RELEASE_ASSERT(iter != symbolTable->end(locker));
+ ASSERT(iter != symbolTable->end(locker));
iter->value.prepareToWatch();
instructions[i + 5].u.watchpointSet = iter->value.watchpointSet();
} else
@@ -2210,7 +2220,7 @@
}
case ProfileTypeBytecodeLocallyResolved: {
int symbolTableIndex = pc[2].u.operand;
- RELEASE_ASSERT(clonedConstantSymbolTables.contains(symbolTableIndex));
+ ASSERT(clonedConstantSymbolTables.contains(symbolTableIndex));
SymbolTable* symbolTable = jsCast<SymbolTable*>(getConstant(symbolTableIndex));
const Identifier& ident = identifier(pc[4].u.operand);
ConcurrentJITLocker locker(symbolTable->m_lock);