aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4serialize.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix various compiler warnings in order to remove warn_off in the near futureErik Verbruggen2013-11-041-1/+1
| | | | | Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a Reviewed-by: Simon Hausmann <[email protected]>
* Fix the remaining try/catch statements in C++Lars Knoll2013-10-291-5/+3
| | | | | Change-Id: I2421dc48fb271b66bd476fb16a32a88fcc4c5177 Reviewed-by: Simon Hausmann <[email protected]>
* Remove usage of String pointers where not requiredLars Knoll2013-10-111-1/+1
| | | | | Change-Id: Ia533308a1641fab263d8faa8316455e8ade1c859 Reviewed-by: Simon Hausmann <[email protected]>
* Change exception handling APISimon Hausmann2013-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* Use SafeValue instead of Value in ScopedValue methodsLars Knoll2013-10-021-1/+1
| | | | | Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78 Reviewed-by: Simon Hausmann <[email protected]>
* Remove some more QV4::Value usagesLars Knoll2013-09-301-23/+28
| | | | | Change-Id: Ic146a964f2ff6b90eeceda90bf1834d7212386a5 Reviewed-by: Simon Hausmann <[email protected]>
* Remove more direct QV4::Value usageLars Knoll2013-09-281-1/+1
| | | | | | | | Remove Value::fromString(String *), and make Encode safe against encoding raw Managed * pointers. Change-Id: Ibca4668e1cbeaf85c78169d14386281659d33ef6 Reviewed-by: Simon Hausmann <[email protected]>
* Move Value::fromBool, ... to a new Primitive classLars Knoll2013-09-281-2/+2
| | | | | | | | This will simplify finding the remaining direct usages of QV4::Value that need fixing. Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed Reviewed-by: Simon Hausmann <[email protected]>
* Move more API over to use ValueRefLars Knoll2013-09-261-1/+1
| | | | | Change-Id: I372f1f3e3e78d45912a913f437e622e0acfc9646 Reviewed-by: Simon Hausmann <[email protected]>
* Make qv4objectproto GC cleanLars Knoll2013-09-221-2/+2
| | | | | | | Fix the remaining usages of raw pointers into the GC heap. Change-Id: I3654a6f74fe6b59e25ed65a79ff02c29cc2cdecc Reviewed-by: Simon Hausmann <[email protected]>
* Fix cases where mark() would access uninitialized memoryLars Knoll2013-09-221-1/+1
| | | | | Change-Id: I4e07e20d30ba57759a0ece1c298a02b098718b33 Reviewed-by: Simon Hausmann <[email protected]>
* convert Managed::put() API to be GC safeLars Knoll2013-09-221-1/+3
| | | | | Change-Id: I09198ce372fa545372db389fac26828d21ad5731 Reviewed-by: Simon Hausmann <[email protected]>
* Use a StringRef for Managed::get()Lars Knoll2013-09-221-1/+3
| | | | | | | | | also store "toString" and "valueOf" as identifiers in the engine and fix two places where we compared strings the wrong way. Change-Id: I70612221e72d43ed0e3c496e4209681bf254cded Reviewed-by: Simon Hausmann <[email protected]>
* Cleanup Object::define*Property APILars Knoll2013-09-221-1/+2
| | | | | Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832 Reviewed-by: Simon Hausmann <[email protected]>
* Don't use Value::emptyValue() anymore.Lars Knoll2013-09-221-0/+1
| | | | | | | | | | emptyValue is special and reserved for usage inside the engine to mark missing values. The main to use cases are when converting property descriptors, and to mark holes in array data. Change-Id: I0ed357e65102b1041bf9a878e6e9a4ae0657523b Reviewed-by: Simon Hausmann <[email protected]>
* Further work towards an exact GCLars Knoll2013-09-221-2/+2
| | | | | | | | | | | Add some more convenience in the helper classes in qscopedvalue_p.h Make accesses to CallData safer, and change ExecutionEngine::newObject() to return a safe pointer. Change-Id: I980909754ce9681cf6faa1355bab3a1e5d6dd186 Reviewed-by: Simon Hausmann <[email protected]>
* Convert more methods to return a Returned<>Lars Knoll2013-09-181-4/+4
| | | | | Change-Id: If294c9c4f574824c308b63a11da1337226180105 Reviewed-by: Simon Hausmann <[email protected]>
* Convert a few more methods in ExecutionEngine to use protected pointersLars Knoll2013-09-181-2/+2
| | | | | Change-Id: I2e6b1b9dff52bbd16f35a00152c9ac557f8346eb Reviewed-by: Simon Hausmann <[email protected]>
* Convert most remaining return values from Value to ReturnedValueLars Knoll2013-09-181-25/+35
| | | | | Change-Id: If8b0c3b91be50678693868c10fefc3678008834d Reviewed-by: Simon Hausmann <[email protected]>
* Use a ReturnedValue for Managed::getIndexed()Lars Knoll2013-09-181-6/+6
| | | | | Change-Id: I0371ed21c4ef99564d3ffa1082dd109e890a78bf Reviewed-by: Simon Hausmann <[email protected]>
* Use ReturnedValue for Managed::get().Lars Knoll2013-09-181-3/+4
| | | | | Change-Id: Ia8f35d227b69d32e1f6a041283abbbd083aa34ca Reviewed-by: Simon Hausmann <[email protected]>
* Restructure source codeLars Knoll2013-08-081-0/+399
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 <[email protected]>