aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-07-30 15:33:33 +0200
committerLars Knoll <lars.knoll@qt.io>2018-07-30 20:45:06 +0000
commit4ac9cf78969436dae456c8fec4a0a706a3d65ec4 (patch)
tree14fdb3b3dca12d31f461e0edf09fade94afee5fa /src/qml/jsruntime/qv4engine.cpp
parent26f2eabe2847a3c98d7b84b09531ff82b13fcd67 (diff)
Fix the remaining test failures with non strict arguments objects
Change-Id: Ib50f602263dd0146d792fb3d12bd5971585fda30 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index f9ef6b45a1..a776e7d14a 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -148,8 +148,6 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine)
, globalCode(nullptr)
, v8Engine(nullptr)
, publicEngine(jsEngine)
- , argumentsAccessors(nullptr)
- , nArgumentsAccessors(0)
, m_engineId(engineSerial.fetchAndAddOrdered(1))
, regExpCache(nullptr)
, m_multiplyWrappedQObjects(nullptr)
@@ -611,7 +609,6 @@ ExecutionEngine::~ExecutionEngine()
delete jsStack;
gcStack->deallocate();
delete gcStack;
- delete [] argumentsAccessors;
}
ExecutionContext *ExecutionEngine::currentContext() const
@@ -982,42 +979,8 @@ QUrl ExecutionEngine::resolvedUrl(const QString &file)
return base.resolved(src);
}
-void ExecutionEngine::requireArgumentsAccessors(int n)
-{
- if (n <= nArgumentsAccessors)
- return;
-
- Scope scope(this);
- ScopedFunctionObject get(scope);
- ScopedFunctionObject set(scope);
-
- if (n >= nArgumentsAccessors) {
- Property *oldAccessors = argumentsAccessors;
- int oldSize = nArgumentsAccessors;
- nArgumentsAccessors = qMax(8, n);
- argumentsAccessors = new Property[nArgumentsAccessors];
- if (oldAccessors) {
- memcpy(static_cast<void *>(argumentsAccessors), static_cast<const void *>(oldAccessors), oldSize*sizeof(Property));
- delete [] oldAccessors;
- }
- ExecutionContext *global = rootContext();
- for (int i = oldSize; i < nArgumentsAccessors; ++i) {
- argumentsAccessors[i].value = ScopedValue(scope, memoryManager->allocate<ArgumentsGetterFunction>(global, i));
- argumentsAccessors[i].set = ScopedValue(scope, memoryManager->allocate<ArgumentsSetterFunction>(global, i));
- }
- }
-}
-
void ExecutionEngine::markObjects(MarkStack *markStack)
{
- for (int i = 0; i < nArgumentsAccessors; ++i) {
- const Property &pd = argumentsAccessors[i];
- if (Heap::FunctionObject *getter = pd.getter())
- getter->mark(markStack);
- if (Heap::FunctionObject *setter = pd.setter())
- setter->mark(markStack);
- }
-
for (int i = 0; i < NClasses; ++i)
if (classes[i])
classes[i]->mark(markStack);