Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (182037 => 182038)
--- trunk/Source/_javascript_Core/ChangeLog 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-03-26 23:35:47 UTC (rev 182038)
@@ -1,5 +1,62 @@
2015-03-26 Geoffrey Garen <[email protected]>
+ "lineNo" does not match WebKit coding style guidelines
+ https://bugs.webkit.org/show_bug.cgi?id=143119
+
+ Reviewed by Michael Saboff.
+
+ We can afford to use whole words.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::lineNumberForBytecodeOffset):
+ (JSC::CodeBlock::expressionRangeForBytecodeOffset):
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedFunctionExecutable::link):
+ (JSC::UnlinkedFunctionExecutable::fromGlobalCode):
+ * bytecode/UnlinkedCodeBlock.h:
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::WhileNode::emitBytecode):
+ * debugger/Debugger.cpp:
+ (JSC::Debugger::toggleBreakpoint):
+ * interpreter/Interpreter.cpp:
+ (JSC::StackFrame::computeLineAndColumn):
+ (JSC::GetStackTraceFunctor::operator()):
+ (JSC::Interpreter::execute):
+ * interpreter/StackVisitor.cpp:
+ (JSC::StackVisitor::Frame::computeLineAndColumn):
+ * parser/Nodes.h:
+ (JSC::Node::firstLine):
+ (JSC::Node::lineNo): Deleted.
+ (JSC::StatementNode::firstLine): Deleted.
+ * parser/ParserError.h:
+ (JSC::ParserError::toErrorObject):
+ * profiler/LegacyProfiler.cpp:
+ (JSC::createCallIdentifierFromFunctionImp):
+ * runtime/CodeCache.cpp:
+ (JSC::CodeCache::getGlobalCodeBlock):
+ * runtime/Executable.cpp:
+ (JSC::ScriptExecutable::ScriptExecutable):
+ (JSC::ScriptExecutable::newCodeBlockFor):
+ (JSC::FunctionExecutable::fromGlobalCode):
+ * runtime/Executable.h:
+ (JSC::ScriptExecutable::firstLine):
+ (JSC::ScriptExecutable::setOverrideLineNumber):
+ (JSC::ScriptExecutable::hasOverrideLineNumber):
+ (JSC::ScriptExecutable::overrideLineNumber):
+ (JSC::ScriptExecutable::lineNo): Deleted.
+ (JSC::ScriptExecutable::setOverrideLineNo): Deleted.
+ (JSC::ScriptExecutable::hasOverrideLineNo): Deleted.
+ (JSC::ScriptExecutable::overrideLineNo): Deleted.
+ * runtime/FunctionConstructor.cpp:
+ (JSC::constructFunctionSkippingEvalEnabledCheck):
+ * runtime/FunctionConstructor.h:
+ * tools/CodeProfile.cpp:
+ (JSC::CodeProfile::report):
+ * tools/CodeProfile.h:
+ (JSC::CodeProfile::CodeProfile):
+
+2015-03-26 Geoffrey Garen <[email protected]>
+
Assertion firing in _javascript_Core/parser/parser.h for statesman.com site
https://bugs.webkit.org/show_bug.cgi?id=142974
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -2831,7 +2831,7 @@
unsigned CodeBlock::lineNumberForBytecodeOffset(unsigned bytecodeOffset)
{
RELEASE_ASSERT(bytecodeOffset < instructions().size());
- return m_ownerExecutable->lineNo() + m_unlinkedCode->lineNumberForBytecodeOffset(bytecodeOffset);
+ return m_ownerExecutable->firstLine() + m_unlinkedCode->lineNumberForBytecodeOffset(bytecodeOffset);
}
unsigned CodeBlock::columnNumberForBytecodeOffset(unsigned bytecodeOffset)
@@ -2850,7 +2850,7 @@
m_unlinkedCode->expressionRangeForBytecodeOffset(bytecodeOffset, divot, startOffset, endOffset, line, column);
divot += m_sourceOffset;
column += line ? 1 : firstLineColumnOffset();
- line += m_ownerExecutable->lineNo();
+ line += m_ownerExecutable->firstLine();
}
bool CodeBlock::hasOpDebugForLineAndColumn(unsigned line, unsigned column)
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -132,7 +132,7 @@
visitor.append(&thisObject->m_symbolTableForConstruct);
}
-FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& ownerSource, int overrideLineNo)
+FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& ownerSource, int overrideLineNumber)
{
SourceCode source = m_sourceOverride ? SourceCode(m_sourceOverride) : ownerSource;
unsigned firstLine = source.firstLine() + m_firstLineOffset;
@@ -146,14 +146,14 @@
SourceCode code(source.provider(), startOffset, startOffset + m_sourceLength, firstLine, startColumn);
FunctionExecutable* result = FunctionExecutable::create(vm, code, this, firstLine, firstLine + m_lineCount, startColumn, endColumn);
- if (overrideLineNo != -1)
- result->setOverrideLineNo(overrideLineNo);
+ if (overrideLineNumber != -1)
+ result->setOverrideLineNumber(overrideLineNumber);
return result;
}
UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(
const Identifier& name, ExecState& exec, const SourceCode& source,
- JSObject*& exception, int overrideLineNo)
+ JSObject*& exception, int overrideLineNumber)
{
ParserError error;
VM& vm = exec.vm();
@@ -165,7 +165,7 @@
globalObject.debugger()->sourceParsed(&exec, source.provider(), error.line(), error.message());
if (error.isValid()) {
- exception = error.toErrorObject(&globalObject, source, overrideLineNo);
+ exception = error.toErrorObject(&globalObject, source, overrideLineNumber);
return nullptr;
}
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h (182037 => 182038)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2015-03-26 23:35:47 UTC (rev 182038)
@@ -138,9 +138,9 @@
static UnlinkedFunctionExecutable* fromGlobalCode(
const Identifier&, ExecState&, const SourceCode&, JSObject*& exception,
- int overrideLineNo);
+ int overrideLineNumber);
- FunctionExecutable* link(VM&, const SourceCode&, int overrideLineNo = -1);
+ FunctionExecutable* link(VM&, const SourceCode&, int overrideLineNumber = -1);
void clearCodeForRecompilation()
{
Modified: trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -1987,7 +1987,7 @@
LabelScopePtr scope = generator.newLabelScope(LabelScope::Loop);
RefPtr<Label> topOfLoop = generator.newLabel();
- generator.emitDebugHook(WillExecuteStatement, m_expr->lineNo(), m_expr->startOffset(), m_expr->lineStartOffset());
+ generator.emitDebugHook(WillExecuteStatement, m_expr->firstLine(), m_expr->startOffset(), m_expr->lineStartOffset());
generator.emitNodeInConditionContext(m_expr, topOfLoop.get(), scope->breakTarget(), FallThroughMeansTrue);
generator.emitLabel(topOfLoop.get());
Modified: trunk/Source/_javascript_Core/debugger/Debugger.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/debugger/Debugger.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/debugger/Debugger.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -270,7 +270,7 @@
unsigned line = breakpoint.line;
unsigned column = breakpoint.column;
- unsigned startLine = executable->lineNo();
+ unsigned startLine = executable->firstLine();
unsigned startColumn = executable->startColumn();
unsigned endLine = executable->lastLine();
unsigned endColumn = executable->endColumn();
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -441,8 +441,8 @@
line = divotLine + lineOffset;
column = divotColumn + (divotLine ? 1 : firstLineColumnOffset);
- if (executable->hasOverrideLineNo())
- line = executable->overrideLineNo();
+ if (executable->hasOverrideLineNumber())
+ line = executable->overrideLineNumber();
}
void StackFrame::expressionInfo(int& divot, int& startOffset, int& endOffset, unsigned& line, unsigned& column)
@@ -496,7 +496,7 @@
Strong<ScriptExecutable>(vm, codeBlock->ownerExecutable()),
Strong<UnlinkedCodeBlock>(vm, codeBlock->unlinkedCodeBlock()),
codeBlock->source(),
- codeBlock->ownerExecutable()->lineNo(),
+ codeBlock->ownerExecutable()->firstLine(),
codeBlock->firstLineColumnOffset(),
codeBlock->sourceOffset(),
visitor->bytecodeOffset(),
@@ -845,7 +845,7 @@
protoCallFrame.init(codeBlock, JSCallee::create(vm, scope->globalObject(), scope), thisObj, 1);
if (LegacyProfiler* profiler = vm.enabledProfiler())
- profiler->willExecute(callFrame, program->sourceURL(), program->lineNo(), program->startColumn());
+ profiler->willExecute(callFrame, program->sourceURL(), program->firstLine(), program->startColumn());
// Execute the code:
JSValue result;
@@ -857,7 +857,7 @@
}
if (LegacyProfiler* profiler = vm.enabledProfiler())
- profiler->didExecute(callFrame, program->sourceURL(), program->lineNo(), program->startColumn());
+ profiler->didExecute(callFrame, program->sourceURL(), program->firstLine(), program->startColumn());
return checkedReturn(result);
}
@@ -1132,7 +1132,7 @@
protoCallFrame.init(codeBlock, JSCallee::create(vm, scope->globalObject(), scope), thisValue, 1);
if (LegacyProfiler* profiler = vm.enabledProfiler())
- profiler->willExecute(callFrame, eval->sourceURL(), eval->lineNo(), eval->startColumn());
+ profiler->willExecute(callFrame, eval->sourceURL(), eval->firstLine(), eval->startColumn());
// Execute the code:
JSValue result;
@@ -1144,7 +1144,7 @@
}
if (LegacyProfiler* profiler = vm.enabledProfiler())
- profiler->didExecute(callFrame, eval->sourceURL(), eval->lineNo(), eval->startColumn());
+ profiler->didExecute(callFrame, eval->sourceURL(), eval->firstLine(), eval->startColumn());
return checkedReturn(result);
}
Modified: trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -291,11 +291,11 @@
unsigned divotColumn = 0;
retrieveExpressionInfo(divot, unusedStartOffset, unusedEndOffset, divotLine, divotColumn);
- line = divotLine + codeBlock->ownerExecutable()->lineNo();
+ line = divotLine + codeBlock->ownerExecutable()->firstLine();
column = divotColumn + (divotLine ? 1 : codeBlock->firstLineColumnOffset());
- if (codeBlock->ownerExecutable()->hasOverrideLineNo())
- line = codeBlock->ownerExecutable()->overrideLineNo();
+ if (codeBlock->ownerExecutable()->hasOverrideLineNumber())
+ line = codeBlock->ownerExecutable()->overrideLineNumber();
}
void StackVisitor::Frame::retrieveExpressionInfo(int& divot, int& startOffset, int& endOffset, unsigned& line, unsigned& column)
Modified: trunk/Source/_javascript_Core/parser/Nodes.h (182037 => 182038)
--- trunk/Source/_javascript_Core/parser/Nodes.h 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/parser/Nodes.h 2015-03-26 23:35:47 UTC (rev 182038)
@@ -126,7 +126,7 @@
public:
virtual ~Node() { }
- int lineNo() const { return m_position.line; }
+ int firstLine() const { return m_position.line; }
int startOffset() const { return m_position.offset; }
int endOffset() const { return m_endOffset; }
int lineStartOffset() const { return m_position.lineStartOffset; }
@@ -184,7 +184,6 @@
virtual void emitBytecode(BytecodeGenerator&, RegisterID* destination = 0) = 0;
void setLoc(unsigned firstLine, unsigned lastLine, int startOffset, int lineStartOffset);
- unsigned firstLine() const { return lineNo(); }
unsigned lastLine() const { return m_lastLine; }
StatementNode* next() { return m_next; }
Modified: trunk/Source/_javascript_Core/parser/ParserError.h (182037 => 182038)
--- trunk/Source/_javascript_Core/parser/ParserError.h 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/parser/ParserError.h 2015-03-26 23:35:47 UTC (rev 182038)
@@ -87,7 +87,7 @@
JSObject* toErrorObject(
JSGlobalObject* globalObject, const SourceCode& source,
- int overrideLineNo = -1)
+ int overrideLineNumber = -1)
{
switch (m_type) {
case ErrorNone:
@@ -96,7 +96,7 @@
return addErrorInfo(
globalObject->globalExec(),
createSyntaxError(globalObject, m_message),
- overrideLineNo == -1 ? m_line : overrideLineNo, source);
+ overrideLineNumber == -1 ? m_line : overrideLineNumber, source);
case EvalError:
return createSyntaxError(globalObject, m_message);
case StackOverflow: {
Modified: trunk/Source/_javascript_Core/profiler/LegacyProfiler.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/profiler/LegacyProfiler.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/profiler/LegacyProfiler.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -201,7 +201,7 @@
const String& name = getCalculatedDisplayName(exec, function);
JSFunction* jsFunction = jsDynamicCast<JSFunction*>(function);
if (jsFunction && !jsFunction->isHostOrBuiltinFunction())
- return CallIdentifier(name.isEmpty() ? ASCIILiteral(AnonymousFunction) : name, jsFunction->jsExecutable()->sourceURL(), jsFunction->jsExecutable()->lineNo(), jsFunction->jsExecutable()->startColumn());
+ return CallIdentifier(name.isEmpty() ? ASCIILiteral(AnonymousFunction) : name, jsFunction->jsExecutable()->sourceURL(), jsFunction->jsExecutable()->firstLine(), jsFunction->jsExecutable()->startColumn());
return CallIdentifier(name.isEmpty() ? ASCIILiteral(AnonymousFunction) : name, defaultSourceURL, defaultLineNumber, defaultColumnNumber);
}
Modified: trunk/Source/_javascript_Core/runtime/CodeCache.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/runtime/CodeCache.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/runtime/CodeCache.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -98,15 +98,15 @@
if (!rootNode)
return nullptr;
- unsigned lineCount = rootNode->lastLine() - rootNode->lineNo();
+ unsigned lineCount = rootNode->lastLine() - rootNode->firstLine();
unsigned startColumn = rootNode->startColumn() + 1;
bool endColumnIsOnStartLine = !lineCount;
unsigned unlinkedEndColumn = rootNode->endColumn();
unsigned endColumn = unlinkedEndColumn + (endColumnIsOnStartLine ? startColumn : 1);
- executable->recordParse(rootNode->features(), rootNode->hasCapturedVariables(), rootNode->lineNo(), rootNode->lastLine(), startColumn, endColumn);
+ executable->recordParse(rootNode->features(), rootNode->hasCapturedVariables(), rootNode->firstLine(), rootNode->lastLine(), startColumn, endColumn);
UnlinkedCodeBlockType* unlinkedCodeBlock = UnlinkedCodeBlockType::create(&vm, executable->executableInfo());
- unlinkedCodeBlock->recordParse(rootNode->features(), rootNode->hasCapturedVariables(), rootNode->lineNo() - source.firstLine(), lineCount, unlinkedEndColumn);
+ unlinkedCodeBlock->recordParse(rootNode->features(), rootNode->hasCapturedVariables(), rootNode->firstLine() - source.firstLine(), lineCount, unlinkedEndColumn);
auto generator = std::make_unique<BytecodeGenerator>(vm, rootNode.get(), unlinkedCodeBlock, debuggerMode, profilerMode);
error = generator->generate();
Modified: trunk/Source/_javascript_Core/runtime/Executable.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/runtime/Executable.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/runtime/Executable.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -100,7 +100,7 @@
, m_hasCapturedVariables(false)
, m_neverInline(false)
, m_didTryToEnterInLoop(false)
- , m_overrideLineNo(-1)
+ , m_overrideLineNumber(-1)
, m_firstLine(-1)
, m_lastLine(-1)
, m_startColumn(UINT_MAX)
@@ -239,7 +239,7 @@
UnlinkedFunctionCodeBlock* unlinkedCodeBlock =
executable->m_unlinkedExecutable->codeBlockFor(
*vm, executable->m_source, kind, debuggerMode, profilerMode, error);
- recordParse(executable->m_unlinkedExecutable->features(), executable->m_unlinkedExecutable->hasCapturedVariables(), lineNo(), lastLine(), startColumn(), endColumn());
+ recordParse(executable->m_unlinkedExecutable->features(), executable->m_unlinkedExecutable->hasCapturedVariables(), firstLine(), lastLine(), startColumn(), endColumn());
if (!unlinkedCodeBlock) {
exception = vm->throwException(
globalObject->globalExec(),
@@ -611,15 +611,15 @@
FunctionExecutable* FunctionExecutable::fromGlobalCode(
const Identifier& name, ExecState& exec, const SourceCode& source,
- JSObject*& exception, int overrideLineNo)
+ JSObject*& exception, int overrideLineNumber)
{
UnlinkedFunctionExecutable* unlinkedExecutable =
UnlinkedFunctionExecutable::fromGlobalCode(
- name, exec, source, exception, overrideLineNo);
+ name, exec, source, exception, overrideLineNumber);
if (!unlinkedExecutable)
return nullptr;
- return unlinkedExecutable->link(exec.vm(), source, overrideLineNo);
+ return unlinkedExecutable->link(exec.vm(), source, overrideLineNumber);
}
void ExecutableBase::dump(PrintStream& out) const
Modified: trunk/Source/_javascript_Core/runtime/Executable.h (182037 => 182038)
--- trunk/Source/_javascript_Core/runtime/Executable.h 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/runtime/Executable.h 2015-03-26 23:35:47 UTC (rev 182038)
@@ -357,10 +357,10 @@
const SourceCode& source() const { return m_source; }
intptr_t sourceID() const { return m_source.providerID(); }
const String& sourceURL() const { return m_source.provider()->url(); }
- int lineNo() const { return m_firstLine; }
- void setOverrideLineNo(int overrideLineNo) { m_overrideLineNo = overrideLineNo; }
- bool hasOverrideLineNo() const { return m_overrideLineNo != -1; }
- int overrideLineNo() const { return m_overrideLineNo; }
+ int firstLine() const { return m_firstLine; }
+ void setOverrideLineNumber(int overrideLineNumber) { m_overrideLineNumber = overrideLineNumber; }
+ bool hasOverrideLineNumber() const { return m_overrideLineNumber != -1; }
+ int overrideLineNumber() const { return m_overrideLineNumber; }
int lastLine() const { return m_lastLine; }
unsigned startColumn() const { return m_startColumn; }
unsigned endColumn() const { return m_endColumn; }
@@ -432,7 +432,7 @@
bool m_hasCapturedVariables;
bool m_neverInline;
bool m_didTryToEnterInLoop;
- int m_overrideLineNo;
+ int m_overrideLineNumber;
int m_firstLine;
int m_lastLine;
unsigned m_startColumn;
@@ -555,7 +555,7 @@
}
static FunctionExecutable* fromGlobalCode(
const Identifier& name, ExecState&, const SourceCode&,
- JSObject*& exception, int overrideLineNo);
+ JSObject*& exception, int overrideLineNumber);
static void destroy(JSCell*);
Modified: trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -89,7 +89,7 @@
JSObject* constructFunctionSkippingEvalEnabledCheck(
ExecState* exec, JSGlobalObject* globalObject, const ArgList& args,
const Identifier& functionName, const String& sourceURL,
- const TextPosition& position, int overrideLineNo)
+ const TextPosition& position, int overrideLineNumber)
{
// How we stringify functions is sometimes important for web compatibility.
// See https://bugs.webkit.org/show_bug.cgi?id=24350.
@@ -116,7 +116,7 @@
SourceCode source = makeSource(program, sourceURL, position);
JSObject* exception = nullptr;
- FunctionExecutable* function = FunctionExecutable::fromGlobalCode(functionName, *exec, source, exception, overrideLineNo);
+ FunctionExecutable* function = FunctionExecutable::fromGlobalCode(functionName, *exec, source, exception, overrideLineNumber);
if (!function) {
ASSERT(exception);
return exec->vm().throwException(exec, exception);
Modified: trunk/Source/_javascript_Core/runtime/FunctionConstructor.h (182037 => 182038)
--- trunk/Source/_javascript_Core/runtime/FunctionConstructor.h 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/runtime/FunctionConstructor.h 2015-03-26 23:35:47 UTC (rev 182038)
@@ -61,7 +61,7 @@
JS_EXPORT_PRIVATE JSObject* constructFunctionSkippingEvalEnabledCheck(
ExecState*, JSGlobalObject*, const ArgList&, const Identifier&,
- const String&, const WTF::TextPosition&, int overrideLineNo = -1);
+ const String&, const WTF::TextPosition&, int overrideLineNumber = -1);
} // namespace JSC
Modified: trunk/Source/_javascript_Core/tools/CodeProfile.cpp (182037 => 182038)
--- trunk/Source/_javascript_Core/tools/CodeProfile.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/tools/CodeProfile.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -143,7 +143,7 @@
void CodeProfile::report()
{
- dataLogF("<CodeProfiling %s:%d>\n", m_file.data(), m_lineNo);
+ dataLogF("<CodeProfiling %s:%d>\n", m_file.data(), m_lineNumber);
// How many frames of C-code to print - 0, if not verbose, 1 if verbose, up to 1024 if very verbose.
unsigned recursionLimit = CodeProfiling::beVeryVerbose() ? 1024 : CodeProfiling::beVerbose();
@@ -186,7 +186,7 @@
for (size_t i = 0 ; i < m_children.size(); ++i)
m_children[i]->report();
- dataLogF("</CodeProfiling %s:%d>\n", m_file.data(), m_lineNo);
+ dataLogF("</CodeProfiling %s:%d>\n", m_file.data(), m_lineNumber);
}
}
Modified: trunk/Source/_javascript_Core/tools/CodeProfile.h (182037 => 182038)
--- trunk/Source/_javascript_Core/tools/CodeProfile.h 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/_javascript_Core/tools/CodeProfile.h 2015-03-26 23:35:47 UTC (rev 182038)
@@ -37,7 +37,7 @@
public:
CodeProfile(const SourceCode& source, CodeProfile* parent)
: m_file(source.provider()->url().utf8())
- , m_lineNo(source.firstLine())
+ , m_lineNumber(source.firstLine())
, m_parent(parent)
{
if (parent)
@@ -80,7 +80,7 @@
};
CString m_file;
- unsigned m_lineNo;
+ unsigned m_lineNumber;
CodeProfile* m_parent;
Vector<std::unique_ptr<CodeProfile>> m_children;
TieredMMapArray<CodeRecord> m_samples;
Modified: trunk/Source/WebCore/ChangeLog (182037 => 182038)
--- trunk/Source/WebCore/ChangeLog 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/WebCore/ChangeLog 2015-03-26 23:35:47 UTC (rev 182038)
@@ -1,3 +1,21 @@
+2015-03-26 Geoffrey Garen <[email protected]>
+
+ "lineNo" does not match WebKit coding style guidelines
+ https://bugs.webkit.org/show_bug.cgi?id=143119
+
+ Reviewed by Michael Saboff.
+
+ We can afford to use whole words.
+
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::initializeJSFunction):
+ * bindings/js/JSMainThreadExecStateInstrumentation.h:
+ (WebCore::JSMainThreadExecState::instrumentFunctionCall):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+ * testing/Internals.cpp:
+ (WebCore::Internals::parserMetaData):
+
2015-03-26 Roger Fong <[email protected]>
Apply blur effect to media control background.
Modified: trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp (182037 => 182038)
--- trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -106,11 +106,11 @@
// We want all errors to refer back to the line on which our attribute was
// declared, regardless of any newlines in our _javascript_ source text.
- int overrideLineNo = m_position.m_line.oneBasedInt();
+ int overrideLineNumber = m_position.m_line.oneBasedInt();
JSObject* jsFunction = constructFunctionSkippingEvalEnabledCheck(
exec, exec->lexicalGlobalObject(), args, Identifier(exec, m_functionName),
- m_sourceURL, m_position, overrideLineNo);
+ m_sourceURL, m_position, overrideLineNumber);
if (exec->hadException()) {
reportCurrentException(exec);
Modified: trunk/Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h (182037 => 182038)
--- trunk/Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h 2015-03-26 23:35:47 UTC (rev 182038)
@@ -41,7 +41,7 @@
int lineNumber = 1;
if (callType == JSC::CallTypeJS) {
resourceName = callData.js.functionExecutable->sourceURL();
- lineNumber = callData.js.functionExecutable->lineNo();
+ lineNumber = callData.js.functionExecutable->firstLine();
} else
resourceName = "undefined";
return InspectorInstrumentation::willCallFunction(context, resourceName, lineNumber);
Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (182037 => 182038)
--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -1375,7 +1375,7 @@
if (auto function = JSC::jsDynamicCast<JSC::JSFunction*>(handler)) {
if (!function->isHostOrBuiltinFunction()) {
if (auto executable = function->jsExecutable()) {
- lineNumber = executable->lineNo() - 1;
+ lineNumber = executable->firstLine() - 1;
scriptID = executable->sourceID() == JSC::SourceProvider::nullID ? emptyString() : String::number(executable->sourceID());
sourceName = executable->sourceURL();
}
Modified: trunk/Source/WebCore/testing/Internals.cpp (182037 => 182038)
--- trunk/Source/WebCore/testing/Internals.cpp 2015-03-26 23:24:02 UTC (rev 182037)
+++ trunk/Source/WebCore/testing/Internals.cpp 2015-03-26 23:35:47 UTC (rev 182038)
@@ -1346,7 +1346,7 @@
} else
return String();
- unsigned startLine = executable->lineNo();
+ unsigned startLine = executable->firstLine();
unsigned startColumn = executable->startColumn();
unsigned endLine = executable->lastLine();
unsigned endColumn = executable->endColumn();