diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-09 15:45:19 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-10 07:37:14 +0000 |
| commit | 74f0d35c2329c0f2566fea44097ecea614906567 (patch) | |
| tree | eeccbfd32ff0ad426d21c91b165d1a2094ebd8b8 /src/qml/compiler/qv4codegen.cpp | |
| parent | 0eb10519c263187f54ffad5c6d521d88736f2680 (diff) | |
Move qv4string{_p.h|.cpp} out of the devtools
The only thing we actually need is toArrayIndex() and that is a static
method. We provide it in a separate file.
Change-Id: I86b11e3d81a319202a0babacd17d87e7816ac88a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
| -rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 3c669c9b1a..edd479a0bd 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -47,7 +47,7 @@ #include <private/qqmljsast_p.h> #include <private/qqmljslexer_p.h> #include <private/qqmljsparser_p.h> -#include <private/qv4string_p.h> +#include <private/qv4stringtoarrayindex_p.h> #include <private/qv4value_p.h> #include <private/qv4compilercontext_p.h> #include <private/qv4compilercontrolflow_p.h> @@ -1245,7 +1245,7 @@ bool Codegen::visit(ArrayMemberExpression *ast) return false; if (AST::StringLiteral *str = AST::cast<AST::StringLiteral *>(ast->expression)) { QString s = str->value.toString(); - uint arrayIndex = QV4::String::toArrayIndex(s); + uint arrayIndex = stringToArrayIndex(s); if (arrayIndex == UINT_MAX) { setExprResult(Reference::fromMember(base, str->value.toString())); return false; @@ -2515,7 +2515,7 @@ bool Codegen::visit(ObjectPattern *ast) if (cname || p->type != PatternProperty::Literal) break; QString name = p->name->asString(); - uint arrayIndex = QV4::String::toArrayIndex(name); + uint arrayIndex = stringToArrayIndex(name); if (arrayIndex != UINT_MAX) break; if (members.contains(name)) |
