diff options
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 12 | ||||
-rw-r--r-- | src/qml/compiler/qqmlirbuilder_p.h | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmlscript_p.h | 31 |
3 files changed, 0 insertions, 49 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 85159c7f75..9c32b9aed1 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -1432,18 +1432,6 @@ void IRBuilder::collectTypeReferences() } } -QQmlScript::LocationSpan IRBuilder::location(QQmlJS::AST::SourceLocation start, QQmlJS::AST::SourceLocation end) -{ - QQmlScript::LocationSpan rv; - rv.start.line = start.startLine; - rv.start.column = start.startColumn; - rv.end.line = end.startLine; - rv.end.column = end.startColumn + end.length - 1; - rv.range.offset = start.offset; - rv.range.length = end.offset + end.length - start.offset; - return rv; -} - bool IRBuilder::isStatementNodeScript(QQmlJS::AST::Statement *statement) { if (QQmlJS::AST::ExpressionStatement *stmt = QQmlJS::AST::cast<QQmlJS::AST::ExpressionStatement *>(statement)) { diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h index 2f398eb008..c2e1ee496e 100644 --- a/src/qml/compiler/qqmlirbuilder_p.h +++ b/src/qml/compiler/qqmlirbuilder_p.h @@ -368,10 +368,6 @@ public: { return QStringRef(&sourceCode, loc.offset, loc.length); } QStringRef textRefAt(const QQmlJS::AST::SourceLocation &first, const QQmlJS::AST::SourceLocation &last) const; - static QQmlScript::LocationSpan location(QQmlJS::AST::UiQualifiedId *id) - { - return location(id->identifierToken, id->identifierToken); - } void setBindingValue(QV4::CompiledData::Binding *binding, QQmlJS::AST::Statement *statement); @@ -392,8 +388,6 @@ public: void collectTypeReferences(); - static QQmlScript::LocationSpan location(QQmlJS::AST::SourceLocation start, QQmlJS::AST::SourceLocation end); - quint32 registerString(const QString &str) const { return jsGenerator->registerString(str); } template <typename _Tp> _Tp *New() { return pool->New<_Tp>(); } diff --git a/src/qml/qml/qqmlscript_p.h b/src/qml/qml/qqmlscript_p.h index 3d8f66f847..14421b9231 100644 --- a/src/qml/qml/qqmlscript_p.h +++ b/src/qml/qml/qqmlscript_p.h @@ -71,37 +71,6 @@ namespace QQmlJS { class Engine; namespace AST { class Node; class StringLiteral namespace QQmlScript { -struct Location -{ - Location() : line(0), column(0) {} - quint16 line; - quint16 column; - - inline bool operator<(const Location &other) { - return line < other.line || - (line == other.line && column < other.column); - } -}; - -struct LocationRange -{ - LocationRange() : offset(0), length(0) {} - quint32 offset; - quint32 length; -}; - -struct LocationSpan -{ - Location start; - Location end; - LocationRange range; - - bool operator<(LocationSpan &o) const { - return (start.line < o.start.line) || - (start.line == o.start.line && start.column < o.start.column); - } -}; - class Object; class TypeReference : public QQmlPool::Class { |