aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4arraydata.cpp4
-rw-r--r--src/qml/jsruntime/qv4arraydata_p.h4
-rw-r--r--src/qml/jsruntime/qv4engine.cpp6
-rw-r--r--src/qml/jsruntime/qv4object.cpp7
-rw-r--r--src/qml/jsruntime/qv4script.cpp7
5 files changed, 7 insertions, 21 deletions
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp
index 6718f2637c..ecc0b138c0 100644
--- a/src/qml/jsruntime/qv4arraydata.cpp
+++ b/src/qml/jsruntime/qv4arraydata.cpp
@@ -162,8 +162,6 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt
}
newData->setAlloc(alloc);
newData->setType(newType);
- if (d)
- newData->d()->needsMark = d->d()->needsMark;
newData->setAttrs(enforceAttributes ? reinterpret_cast<PropertyAttributes *>(newData->d()->values.values + alloc) : nullptr);
o->setArrayData(newData);
@@ -186,8 +184,6 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt
memcpy(newData->d()->values.values, d->d()->values.values + offset, sizeof(Value)*toCopy);
}
- if (newType != Heap::ArrayData::Simple)
- newData->d()->needsMark = true;
if (newType != Heap::ArrayData::Sparse)
return;
diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h
index 887b8f283f..ac5b430356 100644
--- a/src/qml/jsruntime/qv4arraydata_p.h
+++ b/src/qml/jsruntime/qv4arraydata_p.h
@@ -92,7 +92,7 @@ namespace Heap {
#define ArrayDataMembers(class, Member) \
Member(class, NoMark, ushort, type) \
- Member(class, NoMark, ushort, needsMark) \
+ Member(class, NoMark, ushort, unused) \
Member(class, NoMark, uint, offset) \
Member(class, NoMark, PropertyAttributes *, attrs) \
Member(class, NoMark, SparseArray *, sparse) \
@@ -135,8 +135,6 @@ struct SimpleArrayData : public ArrayData {
uint mappedIndex(uint index) const { index += offset; if (index >= values.alloc) index -= values.alloc; return index; }
const Value &data(uint index) const { return values[mappedIndex(index)]; }
void setData(EngineBase *e, uint index, Value newVal) {
- if (newVal.isManaged())
- needsMark = true;
values.set(e, mappedIndex(index), newVal);
}
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index a8331f153e..1073a2abab 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -709,12 +709,6 @@ Heap::ArrayObject *ExecutionEngine::newArrayObject(const Value *values, int leng
// this doesn't require a write barrier, things will be ok, when the new array data gets inserted into
// the parent object
memcpy(&d->values.values, values, length*sizeof(Value));
- for (int i = 0; i < length; ++i) {
- if (values[i].isManaged()) {
- d->needsMark = true;
- break;
- }
- }
a->d()->arrayData.set(this, d);
a->setArrayLengthUnchecked(length);
}
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 516e9b3c65..79a63d1ee6 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -250,11 +250,8 @@ void Heap::Object::markObjects(Heap::Base *b, MarkStack *stack)
Object *o = static_cast<Object *>(b);
if (o->memberData)
o->memberData->mark(stack);
- if (o->arrayData) {
- o->arrayData->setMarkBit();
- if (o->arrayData->needsMark)
- ArrayData::markObjects(o->arrayData, stack);
- }
+ if (o->arrayData)
+ o->arrayData->mark(stack);
uint nInline = o->vtable()->nInlineProperties;
Value *v = reinterpret_cast<Value *>(o) + o->vtable()->inlinePropertyOffset;
const Value *end = v + nInline;
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index ca6e4c50b1..efd528860f 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -91,9 +91,10 @@ void Script::parse()
Module module(v4->debugger() != nullptr);
if (sourceCode.startsWith(QLatin1String("function("))) {
- qWarning() << "Warning: Using function expressions as statements in scripts in not compliant with the ECMAScript specification at\n"
- << (sourceCode.leftRef(70) + QLatin1String("..."))
- << "\nThis will throw a syntax error in Qt 5.12. If you want a function expression, surround it by parentheses.";
+ static const int snippetLength = 70;
+ qWarning() << "Warning: Using function expressions as statements in scripts is not compliant with the ECMAScript specification:\n"
+ << (sourceCode.leftRef(snippetLength) + QLatin1String("..."))
+ << "\nThis will throw a syntax error in Qt 5.12. If you want a function expression, surround it by parentheses.";
}
Engine ee, *engine = &ee;