Skip to content

Commit c7def5a

Browse files
committed
Renamed SourceCode members to match their accessor names
https://bugs.webkit.org/show_bug.cgi?id=165573 Reviewed by Keith Miller. startChar => startOffset endChar => endOffset * parser/UnlinkedSourceCode.h: (JSC::UnlinkedSourceCode::UnlinkedSourceCode): (JSC::UnlinkedSourceCode::view): (JSC::UnlinkedSourceCode::startOffset): (JSC::UnlinkedSourceCode::endOffset): (JSC::UnlinkedSourceCode::length): Canonical link: https://commits.webkit.org/183169@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 1a11fd7 commit c7def5a

3 files changed

Lines changed: 32 additions & 15 deletions

File tree

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
2016-12-07 Geoffrey Garen <ggaren@apple.com>
2+
3+
Renamed SourceCode members to match their accessor names
4+
https://bugs.webkit.org/show_bug.cgi?id=165573
5+
6+
Reviewed by Keith Miller.
7+
8+
startChar => startOffset
9+
endChar => endOffset
10+
11+
* parser/UnlinkedSourceCode.h:
12+
(JSC::UnlinkedSourceCode::UnlinkedSourceCode):
13+
(JSC::UnlinkedSourceCode::view):
14+
(JSC::UnlinkedSourceCode::startOffset):
15+
(JSC::UnlinkedSourceCode::endOffset):
16+
(JSC::UnlinkedSourceCode::length):
17+
118
2016-12-07 Keith Miller <keith_miller@apple.com>
219

320
Add more missing trivial wasm ops.

‎Source/JavaScriptCore/parser/UnlinkedSourceCode.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ CString UnlinkedSourceCode::toUTF8() const
3636
if (!m_provider)
3737
return CString("", 0);
3838

39-
return m_provider->source().substring(m_startChar, m_endChar - m_startChar).utf8();
39+
return m_provider->source().substring(m_startOffset, m_endOffset - m_startOffset).utf8();
4040
}
4141

4242
} // namespace JSC

‎Source/JavaScriptCore/parser/UnlinkedSourceCode.h‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ namespace JSC {
3737
public:
3838
UnlinkedSourceCode()
3939
: m_provider(0)
40-
, m_startChar(0)
41-
, m_endChar(0)
40+
, m_startOffset(0)
41+
, m_endOffset(0)
4242
{
4343
}
4444

@@ -49,22 +49,22 @@ namespace JSC {
4949

5050
UnlinkedSourceCode(PassRefPtr<SourceProvider> provider)
5151
: m_provider(provider)
52-
, m_startChar(0)
53-
, m_endChar(m_provider->source().length())
52+
, m_startOffset(0)
53+
, m_endOffset(m_provider->source().length())
5454
{
5555
}
5656

5757
UnlinkedSourceCode(PassRefPtr<SourceProvider> provider, int startOffset, int endOffset)
5858
: m_provider(provider)
59-
, m_startChar(startOffset)
60-
, m_endChar(endOffset)
59+
, m_startOffset(startOffset)
60+
, m_endOffset(endOffset)
6161
{
6262
}
6363

6464
UnlinkedSourceCode(const UnlinkedSourceCode& other)
6565
: m_provider(other.m_provider)
66-
, m_startChar(other.m_startChar)
67-
, m_endChar(other.m_endChar)
66+
, m_startOffset(other.m_startOffset)
67+
, m_endOffset(other.m_endOffset)
6868
{
6969
}
7070

@@ -80,20 +80,20 @@ namespace JSC {
8080
{
8181
if (!m_provider)
8282
return StringView();
83-
return m_provider->getRange(m_startChar, m_endChar);
83+
return m_provider->getRange(m_startOffset, m_endOffset);
8484
}
8585

8686
CString toUTF8() const;
8787

8888
bool isNull() const { return !m_provider; }
89-
int startOffset() const { return m_startChar; }
90-
int endOffset() const { return m_endChar; }
91-
int length() const { return m_endChar - m_startChar; }
89+
int startOffset() const { return m_startOffset; }
90+
int endOffset() const { return m_endOffset; }
91+
int length() const { return m_endOffset - m_startOffset; }
9292

9393
protected:
9494
RefPtr<SourceProvider> m_provider;
95-
int m_startChar;
96-
int m_endChar;
95+
int m_startOffset;
96+
int m_endOffset;
9797
};
9898

9999
} // namespace JSC

0 commit comments

Comments
 (0)