From 784a55a15ddc65b59cc4709e54453238438eae48 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 9 Oct 2018 14:58:01 +0200 Subject: V4: Collect trace information in the interpreter Collect type information about values used in a function. These include all parameters, and the results of many bytecode instructions. For array loads/stores, it also tracks if the access is in-bounds of a SimpleArrayData. Collection is only enabled when the qml-tracing feature is turned on while configuring. In subsequent patches this is used to generated optimized JITted code. Change-Id: I63985c334c3fdc55fca7fb4addfe3e535989aac5 Reviewed-by: Ulf Hermann --- src/qml/jit/qv4assemblercommon.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/qml/jit/qv4assemblercommon.cpp') diff --git a/src/qml/jit/qv4assemblercommon.cpp b/src/qml/jit/qv4assemblercommon.cpp index 35b8f34633..d5d97f8284 100644 --- a/src/qml/jit/qv4assemblercommon.cpp +++ b/src/qml/jit/qv4assemblercommon.cpp @@ -298,6 +298,19 @@ void PlatformAssemblerCommon::passInt32AsArg(int value, int arg) store32(TrustedImm32(value), argStackAddress(arg)); } +void JIT::PlatformAssemblerCommon::passPointerAsArg(void *ptr, int arg) +{ +#ifndef QT_NO_DEBUG + Q_ASSERT(arg < remainingArgcForCall); + --remainingArgcForCall; +#endif + + if (arg < ArgInRegCount) + move(TrustedImmPtr(ptr), registerForArg(arg)); + else + storePtr(TrustedImmPtr(ptr), argStackAddress(arg)); +} + void PlatformAssemblerCommon::callRuntime(const char *functionName, const void *funcPtr) { #ifndef QT_NO_DEBUG -- cgit v1.2.3