diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-30 20:57:57 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-02 16:07:33 +0200 |
commit | ac8afca822031f3039dce31525a6ab48c741e73b (patch) | |
tree | 1f65aa3ac5ddd8234bd83125573691294f200707 /src/qml/compiler | |
parent | 1e454c8aa6ad0782eee1c8c94ac2780954a08351 (diff) |
Remove some more uses of QV4::Value
All remaining uses should be GC safe now.
Change-Id: I05c962de6ab896f108f70caa1bf937a24e67bfe1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qv4isel_masm.cpp | 12 | ||||
-rw-r--r-- | src/qml/compiler/qv4isel_masm_p.h | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp index 6dabbce5f8..6afbee2400 100644 --- a/src/qml/compiler/qv4isel_masm.cpp +++ b/src/qml/compiler/qv4isel_masm.cpp @@ -699,12 +699,12 @@ void InstructionSelection::run(int functionIndex) _as = oldAssembler; } -void *InstructionSelection::addConstantTable(QVector<Value> *values) +void *InstructionSelection::addConstantTable(QVector<Primitive> *values) { compilationUnit->constantValues.append(*values); values->clear(); - QVector<QV4::Value> &finalValues = compilationUnit->constantValues.last(); + QVector<QV4::Primitive> &finalValues = compilationUnit->constantValues.last(); finalValues.squeeze(); return finalValues.data(); } @@ -1872,14 +1872,14 @@ int InstructionSelection::prepareCallData(V4IR::ExprList* args, V4IR::Expr *this QT_BEGIN_NAMESPACE namespace QV4 { -bool operator==(const Value &v1, const Value &v2) +bool operator==(const Primitive &v1, const Primitive &v2) { return v1.rawValue() == v2.rawValue(); } } // QV4 namespace QT_END_NAMESPACE -int Assembler::ConstantTable::add(const Value &v) +int Assembler::ConstantTable::add(const Primitive &v) { int idx = _values.indexOf(v); if (idx == -1) { @@ -1895,12 +1895,12 @@ Assembler::ImplicitAddress Assembler::ConstantTable::loadValueAddress(V4IR::Cons return loadValueAddress(convertToValue(c), baseReg); } -Assembler::ImplicitAddress Assembler::ConstantTable::loadValueAddress(const Value &v, +Assembler::ImplicitAddress Assembler::ConstantTable::loadValueAddress(const Primitive &v, RegisterID baseReg) { _toPatch.append(_as->moveWithPatch(TrustedImmPtr(0), baseReg)); ImplicitAddress addr(baseReg); - addr.offset = add(v) * sizeof(QV4::Value); + addr.offset = add(v) * sizeof(QV4::Primitive); Q_ASSERT(addr.offset >= 0); return addr; } diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h index 20b0c1b7e8..a689cdf63e 100644 --- a/src/qml/compiler/qv4isel_masm_p.h +++ b/src/qml/compiler/qv4isel_masm_p.h @@ -72,7 +72,7 @@ struct CompilationUnit : public QV4::CompiledData::CompilationUnit // Coderef + execution engine QVector<JSC::MacroAssemblerCodeRef> codeRefs; - QList<QVector<QV4::Value> > constantValues; + QList<QVector<QV4::Primitive> > constantValues; QVector<int> codeSizes; // corresponding to the endOfCode labels. MacroAssemblerCodeRef's size may // be larger, as for example on ARM we append the exception handling table. }; @@ -387,14 +387,14 @@ public: public: ConstantTable(Assembler *as): _as(as) {} - int add(const QV4::Value &v); + int add(const QV4::Primitive &v); ImplicitAddress loadValueAddress(V4IR::Const *c, RegisterID baseReg); - ImplicitAddress loadValueAddress(const QV4::Value &v, RegisterID baseReg); + ImplicitAddress loadValueAddress(const QV4::Primitive &v, RegisterID baseReg); void finalize(JSC::LinkBuffer &linkBuffer, InstructionSelection *isel); private: Assembler *_as; - QVector<QV4::Value> _values; + QVector<QV4::Primitive> _values; QVector<DataLabelPtr> _toPatch; }; @@ -1361,7 +1361,7 @@ public: virtual void run(int functionIndex); - void *addConstantTable(QVector<QV4::Value> *values); + void *addConstantTable(QVector<QV4::Primitive> *values); protected: virtual QV4::CompiledData::CompilationUnit *backendCompileStep(); |