| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Task-number: QTBUG-48594
Change-Id: Ifc207938de7f0c8995fc712df92665f222612647
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qml Connection objects where using an awkward way to
make the parameter names of signals available to the
signal handler. This now uses an approach that is
equivalent to what we do with other functions.
The main difference is that we can't know the parameter names
at type compile time, so we have to rewrite the internal class
of the QV4::Function at connect time.
Change-Id: I5e538ac840b5a46ccb14ff71684404d947948324
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed runtimeStrings to be an array of Heap::String pointers instead of
indirect String pointers. Later that member along with other GC related members
will go into a managed subclass. Meanwhile the generated code no more loads
String pointers directly but just passes the index into the run-time strings to
the run-time functions, which in turn will load the heap string into a scoped
string.
Also replaced the template<T> Value::operator=(T *m) with a non-template
overload that takes a Managed *, in order to help the compiler choose the
non-template operator=(Heap::Base *) overload. This allows removing a bunch
of Value::fromHeapObject calls.
Change-Id: I20415c0549d33cca6813441a2495976b66d4c00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
This makes a lot more sense in the long term and is the
more maintainable solution, once the GC starts moving
objects around in memory
Change-Id: I8f327c0f5b5b0af38c5fe1a217852ee8c4a5c2fc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ibb4658576a98b53de2eac2474ce4d5b9eb83b6ae
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
This is a step towards storing direct heap object pointers for the values
on the JS stack, to avoid the costly indirection for data access.
Change-Id: Ibb57ed6cf52a7088bbc95ee04ae3a4cb25b8c045
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
|
|
|
| |
Remove the Ref classes, as they won't be required
anymore once Managed and Managed::Data are separated.
Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Add some missing exports
Change-Id: I0c250231e902b6efeda257951ee5653ea363e288
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
This unifies the way we handle line numbers in the
JIT and Interpreter.
Remove the now unused lineNumberMapping code and data.
Change-Id: I1d60b1fbb77e70b531fa73d93410683e84dd1e3c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I13c7d9dda7cd1e771079f6fdaa175008b3a3e0e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Saves 12 bytes per Function
Change-Id: I9a495805f9201eb6162a520ff5c2defeb73dc37a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
| |
Remove SafeValue, it was used to port over to an exact GC. Since
we now have that, we can now safely merge it with QV4::Value
again. Also rename SafeString to StringValue for better naming
consistency.
Change-Id: I8553d1bec5134c53996f6b0d758738a0ec8a2e4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename qv4value_def_p.h -> qv4value_p.h and qv4value_p.h to
qv4value_inl_p.h.
It makes more sense to have the class definition in the file
that is named after the class and move the inline methods into
a _inl file. Doing this now, as I expect we'll be needing a few
more _inl files soon.
Change-Id: Ib59e9380e9e976254c6b4369574157f39b1b5f51
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
formals and locals in a CallContext where so far accessed through a
linear search in ExecutionContext::getProperty. Fix this by
introducing an internalClass for the Function used by the call
context.
Change-Id: I1141efa12b19d6de4a354bfd6e769c5ffcb8898b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
The wrapper method for Function::code() was still there
from the times we used C++ exceptions. It's not needed
any more, so get rid of it.
Change-Id: I2ec25fbca71eeef9d7a94a38b5adfa42e4de3a84
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- step-out: only stop if we’re leaving the context for the function we
previously stopped at, so intermediate calls between the current
position and the end do not stop the engine
- step-over: set breakpoints on all lines in current function and
continue to run. When hitting a breakpoint, see if we are in the same
context, because recursive calls might happen. Breakpoints on all
lines are needed, because the (pure) next line might be jumped over
(like when doing step-over a single-line then clause, where the next
line might be in the else clause).
Change-Id: Idf35dc740ca64fae5079162162906490a96af2a7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
|
|
|
|
|
|
|
|
|
| |
Currently missing, but coming in subsequent patches:
- evaluating expressions
- evaluating breakpoint conditions
Change-Id: Ib43f2a3aaa252741ea7ce857a274480feb8741aa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
The StackSaver class is not required anymore, as we don't
throw C++ exceptions anymore, and masm/moth generated code
always cleans up the JS stack.
Change-Id: If49d952230f8bd074f3b9353f56c07c8c5134752
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use recursive function calls anymore. Instead, push marked
objects onto the JS stack, and then pop them off when their children
are being marked.
Should reduce stack memory usage, and improves performance by ~5%.
Change-Id: I2d37d97579144fcba87ec8e9fd545dd220c01fbb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Avoid catch (...) with re-throw as it turns that this is very slow because it
throws a new exception and the unwinder starts from scratch. Instead use stack
allocated objects and cleaning destructors to restore state before continuing
with the propagation of exceptions.
Change-Id: I6d95026bcd60b58cb6258a9dae28623a46739532
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the exception handling API in the engine slightly, encapsulating
any use of direct throw statements and catch blocks with concrete types. In the future
we need to be able to change the way these are implemented, in order to ensure that
the correct stack unwinding code is triggered for throw and re-throw.
This patch separates the C++ exception object thrown from the V4 exception
(that includes value, throwing context pointer) and stores the latter inside
the engine.
In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to
move into the QV4 namespace directly.
In addition the syntax for catching exceptions changes from
try {
...
} catch (QV4::Exception &ex) {
ex.accept(context);
QV4::ScopedValue exceptionValue(scope, ex.value());
}
to
try {
...
} catch (...) {
QV4::ScopedValue exception(scope, context->catchException());
}
Context::catchException() checks if there's a "current" exception in the engine,
and if not assumes that we caught an unrelated exception and consequently re-throws.
partiallyUnwind() is also gone and replaced with rethrowException(), in order to
encapsulate the re-throw.
Lastly, in the future nesting try/catch blocks isn't going to be possible due to
limitations in the common C++ ABI with regards to foreign exceptions.
Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ic15c1419c74f22bd7639ce8746ff11b15240b718
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While objects are being constructed, we don't have a reference to them
on the JS stack yet. So the constructor needs to protect itself against
being collected by putting the this object onto the JS stack.
Added an environment switch MM_EXACT_GC to test exact garbage
collection.
Change-Id: Ie37665a954de800359c272ffbebbe1488e7a8ace
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qv4isel_masm.cpp
src/qml/jsruntime/qv4script.cpp
src/qml/qml/qml.pri
src/qml/qml/qqmltypeloader_p.h
Change-Id: Ia784d855a2131e3289454f12d841ca2c65be15c1
|
| |
| |
| |
| |
| |
| |
| | |
This simplifies the masm backend as well and should be faster.
Change-Id: I64ad5d9ee1b6caca950471e3aec4ef19d7503e62
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4script.cpp
Change-Id: I20136cab29d86862b5bd9208003200bc24bcdacf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Surround all calls into generated code with a
try {} catch {} statement that resets the jstack
to the correct position.
Like this we properly unwind the js stack in all cases, and
can also use stricter assertions in our ScopedCallData, etc.
classes to check that the stack is healthy.
Change-Id: I7ca03e06ea55007be683305d9c2a6898cf5fc689
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal is to parse QML and JavaScript binding expressions/functions in one
go and generate data structures that allow for the parsing to happen in a thread
and the instantiation of the object tree in another thread, just reading from
the generated data structures. This will replace qqmlcompiler and the VME.
This new way of loading QML is currently hidden behind the QML_NEW_COMPILER=1
environment variable. There's lots of work left to fill in the gaps in object
construction, Component support, Component.onComplete, error messages, etc. etc.
Change-Id: I5e40643cff169f469f0b6ce151584ffee5ca5e90
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Id227139bf385aa92e539cdb0d0012e1360679c81
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I557f8a80aa2c74398b94e87ed0f29fe8d2297150
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Iaa2f96a6814f1b39589ffcfe3c84e3c229e25f1f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ib79489ac4c6c93042143be1f512d29c13d4cd3c6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
runtime expressions
Change-Id: Iaae3c4855016948952159596d2528fca73341b72
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I09f04994a2ebe631b12fa76b77a622711de31926
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ide70ca5a3f3dcc793fb96fd64f8b8df6b07d1168
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Idf75cd51087ea825f22aabda59661be461fd3b86
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
the isel
Change-Id: I9db976df310a5986ceca66d21efeeae536dbede4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Id699897b241a9ff6495689e5685092d311acb8c2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I65700b9cc4907aaa28623a95204e88f87fccfd49
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Iacf907c475070bab4a5a1583280f110c089141c4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Iffe72ff6dd0311d7548d1ea41164a400fd3a7600
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
compiled function in the runtime function
Change-Id: I9aed9f394fedc4a4ea334f6ab1b72fe749c64c72
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Idbf278a96624bf101df35de40577b38e593f22be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
This reduces memory pressure, keep engine->functions small and thus makes back
trace lookup faster. It became visible for example in the QtQuickControls
auto-tests that use plenty of loaders and we ended up with 30k+ functions.
Change-Id: Iaa5981f44e1e49ad9417a50c1e6a74946090dd28
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I3ea88d3c259447081d1ac5f85d7da95fed8f02f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
Move the v4 engine classes from a subdir of qml/qml into
two subdirs (compiler and jsruntime) of the qml module
Remove an unsued qv4syntaxchecker class, and move
the moth code directly into compiler.
Change-Id: I6929bede1f25098e6cb2e68087e779fac16b0c68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|