callData->thisObject = obj.asReturnedValue();
ExecutionContext *ctx = context->newCallContext(f.getPointer(), callData);
- ScopedValue result(scope, f->function->code(ctx, f->function->codeData));
+ ExecutionContextSaver ctxSaver(context);
++ ScopedValue result(scope, Q_V4_PROFILE(v4, ctx, f->function));
+
if (f->function->compiledFunction->hasQmlDependencies())
QmlContextWrapper::registerQmlDependencies(v4, f->function->compiledFunction);
CallContext *ctx = context->newCallContext(f, callData);
- ScopedValue result(scope, f->function->code(ctx, f->function->codeData));
+ ExecutionContextSaver ctxSaver(context);
++ ScopedValue result(scope, Q_V4_PROFILE(v4, ctx, f->function));
+
if (f->function->compiledFunction->hasQmlDependencies())
QmlContextWrapper::registerQmlDependencies(ctx->engine, f->function->compiledFunction);
- ExecutionContextSaver ctxSaver(context);
- return Q_V4_PROFILE(v4, ctx, f->function);
+ return result.asReturnedValue();
}
-DEFINE_MANAGED_VTABLE(SimpleScriptFunction);
+DEFINE_OBJECT_VTABLE(SimpleScriptFunction);
SimpleScriptFunction::SimpleScriptFunction(ExecutionContext *scope, Function *function)
: FunctionObject(scope, function->name, true)
}
Q_ASSERT(v4->currentContext() == &ctx);
- Scoped<Object> result(scope, f->function->code(&ctx, f->function->codeData));
++ Scoped<Object> result(scope, Q_V4_PROFILE(v4, &ctx, f->function));
+
if (f->function->compiledFunction->hasQmlDependencies())
QmlContextWrapper::registerQmlDependencies(v4, f->function->compiledFunction);
}
Q_ASSERT(v4->currentContext() == &ctx);
- ScopedValue result(scope, f->function->code(&ctx, f->function->codeData));
++ ScopedValue result(scope, Q_V4_PROFILE(v4, &ctx, f->function));
+
if (f->function->compiledFunction->hasQmlDependencies())
QmlContextWrapper::registerQmlDependencies(v4, f->function->compiledFunction);
float lastOpacity;
};
- ShaderManager() : blitProgram(0), visualizeProgram(0) { }
- ShaderManager(QSGRenderContext *ctx) : blitProgram(0), context(ctx) { }
++ ShaderManager(QSGRenderContext *ctx) : blitProgram(0), visualizeProgram(0), context(ctx) { }
~ShaderManager() {
qDeleteAll(rewrittenShaders.values());
qDeleteAll(stockShaders.values());
QHash<QSGMaterialType *, Shader *> stockShaders;
QOpenGLShaderProgram *blitProgram;
+ QOpenGLShaderProgram *visualizeProgram;
+ QSGRenderContext *context;
};
class Q_QUICK_PRIVATE_EXPORT Renderer : public QSGRenderer