Merge remote-tracking branch 'origin/stable' into dev
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 18 Feb 2014 08:58:57 +0000 (09:58 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Tue, 18 Feb 2014 08:58:57 +0000 (09:58 +0100)
Conflicts:
src/qml/jsruntime/qv4functionobject.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h

Change-Id: Id164f6c3b45501aa466908659ec4e3b957323753

1  2 
src/qml/compiler/qv4ssa.cpp
src/qml/jsruntime/qv4functionobject.cpp
src/qml/qml/qqmljavascriptexpression.cpp
src/quick/items/qquickitemview.cpp
src/quick/items/qquickrectangle.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
src/quick/scenegraph/coreapi/qsgrenderer_p.h
src/quick/scenegraph/qsgcontext.cpp
src/quick/scenegraph/qsgcontext_p.h
tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp

Simple merge
@@@ -447,6 -448,9 +447,9 @@@ ReturnedValue ScriptFunction::construct
      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);
  
@@@ -470,14 -472,16 +471,16 @@@ ReturnedValue ScriptFunction::call(Mana
  
      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)
@@@ -542,6 -546,8 +545,8 @@@ ReturnedValue SimpleScriptFunction::con
      }
      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);
  
@@@ -579,6 -583,8 +582,8 @@@ ReturnedValue SimpleScriptFunction::cal
      }
      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);
  
Simple merge
Simple merge
@@@ -371,7 -371,7 +371,7 @@@ public
          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());
@@@ -388,7 -388,7 +388,8 @@@ public
      QHash<QSGMaterialType *, Shader *> stockShaders;
  
      QOpenGLShaderProgram *blitProgram;
 +    QOpenGLShaderProgram *visualizeProgram;
+     QSGRenderContext *context;
  };
  
  class Q_QUICK_PRIVATE_EXPORT Renderer : public QSGRenderer
Simple merge
Simple merge