Deploy OrdinalNumber in JSC::SourceCode
https://bugs.webkit.org/show_bug.cgi?id=165687
Reviewed by Michael Saboff.
Source/JavaScriptCore:
We have a lot of confusion between 1-based and 0-based counting in line
and column numbers. Let's use OrdinalNumber to clear up the confusion.
- bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::link):
- bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitExpressionInfo):
- inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::functionDetails):
(JSC::Lexer<T>::setCode):
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parse):
(JSC::SourceCode::SourceCode):
(JSC::SourceCode::firstLine):
(JSC::SourceCode::startColumn):
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
- runtime/ScriptExecutable.h:
(JSC::ScriptExecutable::firstLine):
(JSC::ScriptExecutable::startColumn):
(JSC::CodeProfile::CodeProfile):
Source/WebCore:
Updated for interface changes.
- bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateModule):
- bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::startLine):
Source/WTF:
- wtf/text/OrdinalNumber.h:
(WTF::OrdinalNumber::operator>): Added a >.