summaryrefslogtreecommitdiffstats
path: root/src/script
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into ↵Michael Brasser2009-10-194-3/+19
|\ | | | | | | | | | | | | kinetic-declarativeui Conflicts: tools/qdoc3/cppcodemarker.cpp
| * Regression fix. Fix the hasUncaughtException() flag in debugger's event.Jedrzej Nowacki2009-10-194-3/+19
| | | | | | | | | | | | | | | | | | | | | | The QScriptEngine::hasUncaughtException() flag should be set to true if returning from a JS function was caused by an exception. According to documentation, the flag had to be accessible from the QScriptEngineAgent::functionExit event. New autotest was added. Reviewed-by: Kent Hansen
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into ↵Michael Brasser2009-10-196-27/+38
|\ \ | |/ | | | | | | | | | | | | | | | | kinetic-declarativeui Conflicts: configure.exe src/corelib/animation/qabstractanimation.cpp src/s60installs/qt.iby util/qlalr/cppgenerator.cpp
| * Fix "Warning: #381-D: extra ";" ignored" reported by RVCTJanne Anttila2009-10-081-1/+1
| | | | | | | | Reviewed-by: TrustMe
| * Use JSC::asObject() when we know that the value is an objectKent Hansen2009-10-071-2/+2
| | | | | | | | | | It's faster than calling getObject(), since getObject() will do type checking of the value.
| * Inline QScriptValuePrivate operator new and deleteKent Hansen2009-10-073-18/+18
| | | | | | | | Make allocation faster.
| * Get rid of some superfluous checks in QScriptString::operator==()Kent Hansen2009-10-071-6/+0
| | | | | | | | Reviewed-by: Olivier Goffart
| * implement qHash function for QScriptStringKent Hansen2009-10-073-0/+17
| | | | | | | | Reviewed-by: Olivier Goffart
* | Add toArrayIndex methodAaron Kennedy2009-10-142-0/+8
| |
* | Tweak QScriptDeclarativeClass API to not be so sillyAaron Kennedy2009-10-084-28/+45
| |
* | Merge branch 'kinetic-declarativeui' of ↵Aaron Kennedy2009-10-072-9/+10
|\ \ | |/ | | | | | | | | | | | | git@scm.dev.nokia.troll.no:qt/kinetic into test Conflicts: demos/declarative/samegame/content/samegame.js tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
| * QScriptContext::parentContext: don't skip unessecary framesOlivier Goffart2009-10-061-1/+1
| | | | | | | | | | | | | | | | Calling QScriptValue::call doesn't create a fake frame. We can detect a real fake frame as it does not have a callee. Task-number: QT-2270 Reviewed-by: Kent Hansen
| * implement property getters&setters for setProperty(quint32) overloadKent Hansen2009-10-061-2/+4
| | | | | | | | | | | | It's better that this works rather than asserts. Reviewed-by: Olivier Goffart
| * QtScript: Another crash fix on PowerPCOlivier Goffart2009-10-061-2/+1
| | | | | | | | | | | | | | | | | | | | on 32bit PowerPC, the integer value and the pointer value are not in the same word leading to crash. So blindly casting between them lead to crashes. Use the new Register::withInt instead Reviewed-by: Kent Hansen
| * QScript: do not crash on PowerPCOlivier Goffart2009-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no 'this' register in the global context. The computation of the this register for the global context gives the 'codeBlock' register in the frame header. On Intel processor, a JSValue() is 0x0 when converted to a pointer, but this is not the case on PowerPC (it is 0xfffffff9) so it just crash later when acessing the code block. Solution: special condition for the global context when getting the 'this' object Reviewed-by: Kent Hansen
| * Updated JavaScriptCore from /home/khansen/dev/qtwebkit to ↵Kent Hansen2009-10-051-1/+1
| | | | | | | | | | | | jsc-for-qtscript-4.6-staging-05102009 ( 38c2b17366f24220d9ae0456a7cfe2ac78a9f91c ) Adapt src/script to src/3rdparty/javascriptcore changes
* | Export the active QScriptContext during a callbackAaron Kennedy2009-10-063-2/+59
| | | | | | | | Clearly the API needs work :)
* | Add a QScriptEngine::pushCleanContext() methodAaron Kennedy2009-10-063-3/+41
| |
* | Compile against updated JSCAaron Kennedy2009-10-054-17/+28
| |
* | Tweak api to improve ownership issuesAaron Kennedy2009-10-054-33/+25
| |
* | API changesAaron Kennedy2009-10-052-53/+87
| |
* | Improve script lookup cachingAaron Kennedy2009-10-053-0/+20
| |
* | Use placement new correctlyAaron Kennedy2009-10-051-3/+3
| |
* | Add two step compile/evaluate support to QScriptAaron Kennedy2009-10-052-0/+199
| |
* | Prototype a QScriptDeclarativeClass that fits better with qmlAaron Kennedy2009-10-056-3/+652
| |
* | No longer need to disable JITing.Michael Brasser2009-10-041-2/+0
| |
* | Merge commit 'qt-mainline/4.6' into kinetic-declarativeuiAndreas Aardal Hanssen2009-10-025-72/+98
|\ \ | |/ | | | | | | Conflicts: configure.exe
| * Reset timeout-checker before evaluating when processEventsInterval is usedKent Hansen2009-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the timeout-checker was not reset, it could take a while (e.g. 1-2 seconds) before the next timeout occurred, depending on what the tick counter happened to be after the previous evaluate(). When a processEventsInterval of e.g. 100 milliseconds has been specified, we want the timeout to happen much sooner, thus we need to reset the checker. This will cause the first timeout to happen quickly, and then at steady intervals (processEventsInterval ms) after that. The tst_QScriptEngine::processEventsWhileRunning() test was sporadically failing due to this issue. Reviewed-by: Olivier Goffart
| * Fix column number provided to QScriptEngineAgentKent Hansen2009-10-013-65/+81
| | | | | | | | | | | | | | | | Introduced a helper function in our custom source provider, columnNumberFromOffset(), that maps an absolute offset in the source input to a relative column number. Reviewed-by: Jedrzej Nowacki
| * Prospective solaris-g++-sparc build fixSimon Hausmann2009-09-301-0/+5
| | | | | | | | | | | | | | | | | | | | g++ on sparc appears to have problems inlining functions when Qt is compiled in debug. ("sorry: unimplemented blah blah") We're not entirely sure, but we suspect that removing -g might help avoid this compiler bug. Reviewed-by: Kent Hansen
| * avoid JavaScriptCore C API functions being exported from QtScript libraryKent Hansen2009-09-301-0/+3
| | | | | | | | Reviewed-by: Simon Hausmann
| * Fix linking on windows, building qt in namespaceJarek Kobus2009-09-301-1/+3
| | | | | | | | RevBy: Thiago Macieira <thiago.macieira@trolltech.com>
| * Remove "inline" keyword from unused constructorsHarald Fernengel2009-09-291-2/+2
| | | | | | | | | | | | | | Found during API review, make the private safety constructors follow the pattern of our Q_DISABLE_COPY macro. Reviewed-by: Robert Griebl
| * QScript: fix the way the js stack is advanced.Olivier Goffart2009-09-291-4/+2
| | | | | | | | | | | | | | | | | | It is possible to call QScriptEngine::pushContext before we start any evaluation. We need to change JSC so it doesn't always start at the beginning of the stack. Also fix QScriptContext::pushContext not to waste space between callframes. Reviewed-by: Kent Hansen
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into ↵Michael Brasser2009-09-2920-281/+399
|\ \ | |/ | | | | | | | | | | | | kinetic-declarativeui Conflicts: configure.exe mkspecs/features/qt.prf
| * QScript: Fix strange bugs and crashes.Olivier Goffart2009-09-282-8/+12
| | | | | | | | | | | | | | | | | | | | I was assuming that the default return value register was always set to 0 for native calls. But this is not the case. So we must ensure this. Also be consistend in the way the stackframe grow and shrink. This expose another bug in the way the call frame is created in JSC Reviewed-by: Kent Hansen
| * compile fix with namespaced qthjk2009-09-283-5/+5
| | | | | | | | Reviewed-by: Simon Hausmann
| * Update src/3rdparty/javascriptcore and adapt src/script to the changes.Kent Hansen2009-09-2418-217/+265
| | | | | | | | Reviewed-by: Simon Hausmann
| * don't crash in property access after script class has been set to 0Kent Hansen2009-09-222-5/+10
| | | | | | | | | | | | | | | | When the script class is set to 0, we need to remove the script object's delegate entirely, because the delegate requires a non-0 script class in order to be useful. Reviewed-by: Olivier Goffart
| * make sure the engine's currentFrame is in sync when calling out to public APIKent Hansen2009-09-223-1/+32
| | | | | | | | | | | | | | The currentFrame pointer is used e.g. by QScriptValue::toString(). It needs to be in sync, otherwise we will crash. Reviewed-by: Olivier Goffart
| * work around another set of duplicated symbols between webkit and scriptLars Knoll2009-09-221-1/+1
| | | | | | | | | | | | jscyyerror/parse/lex where exported on some platforms. Reviewed-By: Simon Hausmann
| * Fix QScriptValue::strictlyEqualsSimon Hausmann2009-09-221-1/+8
| | | | | | | | | | | | | | | | strictlyEquals has to continue to work if one of the values has an engine and the other one doesn't. Use the other value's engine to construct a JSValue if possible and use JSC::JSValue::strictEqual. Reviewed-by: Kent Hansen
| * Fix QScriptValue constructors without a QScriptEngineSimon Hausmann2009-09-221-36/+9
| | | | | | | | | | | | | | Don't create JSC types as the conversion back to a string now requires an ExecState. Reviewed-by: Kent Hansen
| * QtScript: Fix comparing QVariant and QObject.Olivier Goffart2009-09-216-0/+42
| | | | | | | | | | | | | | This add a hook inside JSC to be able to implement our own comparison function when comparing objects. Reviewed-by: Kent Hansen
| * use JSObject::inherits() instead of JSObject::isObject()Kent Hansen2009-09-216-15/+15
| | | | | | | | | | | | The functions are identical, but in recent WebKit trunk isObject() doesn't exist anymore. So this renaming is done to prepare for the import of a more recent JavaScriptCore.
| * initialize the this-register of the global contextKent Hansen2009-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | QScriptEnginePrivate::thisForContext() relies on the this-register of the global context to contain an invalid JSValue. The default Register constructor (used to initialize the registers of the global context) only invalidates its value when NDEBUG is not defined (but we define it). Therefore, we must explicitly set the this-register to an invalid value. Reviewed-by: Olivier Goffart
| * put the this-register calculation into a functionKent Hansen2009-09-183-3/+10
| | | | | | | | | | | | Avoid copy and paste. Reviewed-by: Olivier Goffart
* | Merge commit 'origin/4.6' into kinetic-declarativeuiLars Knoll2009-09-182-3/+6
|\ \ | |/ | | | | | | Conflicts: configure.exe
| * Fix symbol clashes between QtWebKit and QtScriptSimon Hausmann2009-09-181-0/+1
| | | | | | | | | | | | Rename the JSC namespace to QTJSC. Reviewed-by: Lars Knoll
| * make qscriptvalue_cast<QVariant>() compile again on WindowsKent Hansen2009-09-181-2/+4
| | | | | | | | | | This change was lost when the new qtscript-jsc backend was introduced (the change is already in 4.5).