summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* revert part of commit 2449e7fc567f8151736949032a001cf2aa2d5bb9Kent Hansen2009-08-121-2/+1
| | | | It reverted commit f2f338a922d20ad36c9849f5ea3208a8c4f1674a.
* Fix compilation on 64-bit machines.Simon Hausmann2009-08-121-1/+1
| | | | | | | | | On 64-bit machines the construction of QVariant from intptr_t is ambigious as it could be void* or ulonglong. The documentation for the debugger extension on the other hand is clear that it should be a qint64. An explicit construction of a qint64 fixes it. Reviewed-by: Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
* Merge branch 'qtscript-jsc-backend-configure' of ↵Simon Hausmann2009-08-122-5/+24
|\ | | | | | | scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * Add -script/-no-script option to configure.exe as wellMarius Storm-Olsen2009-08-112-5/+24
| | | | | | | | | | The options were added to the configure script (Unix/Mac) already, so bring Windows configure in sync.
* | Implement connection between JSC::Debugger and QScriptEngineAgent.Jedrzej Nowacki2009-08-113-26/+113
| | | | | | | | | | | | | | | | | | | | | | Complete reimplementation of QScriptEngineAgentPrivate. New QScriptEngineAgentPrivate implementation makes conversion from different JSC::Debuger types and events to corresponding QScriptEngineAgent. contextPush and contextPop events are created in QScriptEngine each time contextPush or contextPop is ordered from public API
* | QtScript building system changeJedrzej Nowacki2009-08-114-32/+35
|/ | | | | | | | Make new dependency: QScripttools on Webkit. This change is needed to implement QScriptEngineAgent as child of JSC::Debugger. Exclude common part from scripttool.pri and script.pri and move it to webkit.pri
* make it possible to pop all items in a scope chain and then push to itKent Hansen2009-08-112-14/+28
| | | | | | | | | | | | | A lot of the JSC::ExecState functions rely on scopeChain() not being 0. This means we shouldn't pop the scope chain if doing so would make it empty; otherwise when you call e.g. pushScope() or evaluate(), you will crash. So instead of popping the chain completely, we now set the sole scope chain item's object pointer to 0 and add appropriate checks elsewhere. A second issue, not solved in this commit, is that JSC expects the Global Object to always be the last item in every scope chain. If it's not, you will crash.
* compile qtscript with -DNDEBUGKent Hansen2009-08-111-1/+1
| | | | | | We don't need the JSC asserts anymore now, hopefully. More importantly, this changemakes programs that link against both QtScript and QtWebKit not crash.
* Call to JSC::Debugger's new events that where created inJedrzej Nowacki2009-08-111-0/+11
| | | | | | | | | | b62ab93d001d2f3238e24faa133720cb877e3023 commit. Workaround for multiple decorators problem. FunctionWrapper and NativeConstrWrapper needs access to original result value (from native function call). Solution was to move part of the NativeConstrWrapper's functionality (functionExit debugger's event) to FunctionWrapper::proxyConstruct.
* Calls to JSC::Debugger's new events that where created inJedrzej Nowacki2009-08-111-2/+34
| | | | | | | b62ab93d001d2f3238e24faa133720cb877e3023 commit. Calls to Debuggers's evaluateStart, evaluateStop, exceptionThrow methods where created.
* Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-115-13/+88
|\ | | | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * Fix line number and arguments in QScriptContext::toStringOlivier Goffart2009-08-114-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | For arguments, we always need to skip the implicit 'this' argument For line number, we walk thought the stack frames from the top to find the one above the requested one, which contains the returnPC we need. Also fixed a crash because QScriptContext::parentContext would have returned a pointer with flags inside. Reviewed-by: Kent Hansen
| * Test the activationObject for js functionsOlivier Goffart2009-08-101-0/+25
| |
| * more tests for the QScriptContext::argumentsObjectOlivier Goffart2009-08-101-4/+11
| |
| * Test the same code as in the documentation for closuresOlivier Goffart2009-08-101-0/+32
| |
* | Calls to JSC::Debugger's new events that where created inJedrzej Nowacki2009-08-115-4/+129
|/ | | | | | | | | | | b62ab93d001d2f3238e24faa133720cb877e3023 commit. In CallData and ConstructData native function call were replaced by class with operator() that decorate every call with debugger->functionEntry and debugger->functionExit events. In Interpreter new debugger calls for functionExit, functionEntry, exceptionThrow and exceptionCatch events where created
* Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-102-8/+21
|\ | | | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * make QScriptContext::setScope() fail for object created in other engineKent Hansen2009-08-102-8/+21
| | | | | | | | | | Also fix some autotest failures, improve the descriptions of failures, and make the tests run to completion.
* | JSGlobalObject debugger's setterJedrzej Nowacki2009-08-101-1/+11
|/ | | | | | | Setting Debugger for JSGlobalObject automatically set it to ScriptPool object. Should be part of f5af011ede569bb88ec9b27ff7a65fe99f7d17fd commit
* implement QScriptContext::setActivationObject()Kent Hansen2009-08-102-5/+25
|
* Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-102-4/+12
|\ | | | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * get rid of dynamic castsKent Hansen2009-08-102-4/+12
| |
* | Move some debug hooksJedrzej Nowacki2009-08-101-1/+13
|/ | | | | | | Generation point of debug opcode for different statements were changed to simulate old - backend QtScript's debugger. Code is Qt specific and secured by QT_BUILD_SCRIPT_LIB define.
* Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-101-0/+4
|\ | | | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * mark expected failures for QObject GC-related testsKent Hansen2009-08-101-0/+4
| | | | | | | | | | | | | | In the JSC-based back-end, script-owned QObjects are not always deleted immediately by the GC. I don't know what precisely determines the deletion time yet. (Inserting a qDebug() before evaluate("gc()") seems to fix it, though...)
* | New class and new JSC::JSGlobalData attribute.Jedrzej Nowacki2009-08-107-1/+193
| | | | | | | | | | | | | | SourcePool's objects should be responsible for calling debugger each time scriptLoad or scriptUnload event occurs. This code is specific to Qt only.
* | Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-105-49/+62
|\ \ | |/ | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * cleanup (hide the use of reinterpret_cast)Kent Hansen2009-08-104-24/+36
| | | | | | | | | | Introduce a frameForContext() function so we don't have to cast all over the place.
| * finish implementation of QScriptEngine::importExtension()Kent Hansen2009-08-102-26/+27
| | | | | | | | | | Added the properties to the activation object: __extension__, __setupPackage__ and __postInit__.
| * Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-101-0/+1
| |\ | | | | | | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
* | \ Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-101-0/+1
|\ \ \ | |/ / |/| / | |/ git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * skip QScriptEngine::newActivationObject() testKent Hansen2009-08-101-0/+1
| | | | | | | | | | It's an internal function, and currently not implemented in the JSC-based back-end.
* | Debugger API develop. New events corresponding to QtScript old-backendJedrzej Nowacki2009-08-101-0/+47
|/ | | | | | | | | | | | where created: scriptUnload, scriptLoad, contextPush, contextPop, evaluateStart, evaluateStop, exceptionThrow, exceptionCatch, functionExit Some of them are really similar to standard JSC events but not enough to implement correct old QtScript debugger behavior. Default empty implementation where created (the new events are not pure virtual methods as the others)
* Merge branch 'qtscript-jsc-backend' of ↵Jedrzej Nowacki2009-08-103-15/+57
|\ | | | | | | git@scm.dev.nokia.troll.no:qt/qt-webkit into qtscript-jsc-backend
| * remove two expected failures for backtrace()Kent Hansen2009-08-101-2/+0
| | | | | | | | | | QScriptContext::backtrace() is implemented now (since commit 34511e1001471ed4041794640aefe508f50ad01c), so the tests work.
| * implement QScriptContextInfo streaming from datastreamKent Hansen2009-08-102-4/+32
| |
| * implement QScriptContextInfo::parameterNames() for Qt methodsKent Hansen2009-08-102-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't work for overloaded methods yet (unless you just happened to call the overload that's defined last in the source file). In the old back-end we stored the actual overload that was being called in the QScriptContextPrivate. Since QScriptContext is a JSC::ExecState now, we either have to add the information to JSC::ExecState, or add some mapping scheme so we can go determine the meta-index for a particular (ExecState, QtFunction) pair. Also in this commit: Marked expected failures, so the autotests will run to completion.
* | Debugger modification. Debugger receive column number from op_debugJedrzej Nowacki2009-08-106-12/+17
|/ | | | | | | opcode and pass it for DidReachBreakpoint and WillExecuteStatement events as an argument. Compilation fix for JIT.
* implement QScriptClass property query semantics of old back-endKent Hansen2009-08-102-2/+9
| | | | | Look up the property as a normal JS property before falling back to the dynamic query mechanism. This is the documented behavior.
* implement QScriptContext::backtrace()Kent Hansen2009-08-102-35/+3
| | | | | Doesn't pass the test yet, but at least it returns something that might be useful on occasion.
* extract the function name from the calleeKent Hansen2009-08-101-0/+2
|
* skip the QScriptContext::returnValue() testKent Hansen2009-08-101-2/+1
| | | | | returnValue() and setReturnValue() are internal functions not implemented in the JSC-based back-end.
* mark function scopes test as expected failureKent Hansen2009-08-101-0/+1
| | | | | QScriptValue::scope() and QScriptValue::setScope() are internal function that we don't implement fully in the JSC-based back-end.
* make native function scopes test passKent Hansen2009-08-101-1/+1
| | | | Missing parentheses in function expression (JSC requires them).
* make the global object properties test passKent Hansen2009-08-101-1/+2
| | | | Accept the presence of a JSON object.
* don't add the jscprint function when building QtScriptKent Hansen2009-08-101-0/+2
| | | | QtScript defines its own print function.
* make property flags lookup work for properties in prototype chainKent Hansen2009-08-102-3/+15
| | | | | JSObject::getPropertyAttributes() does not follow the prototype chain, so we have to do it.
* make ResolveScope property lookup work (kind of)Kent Hansen2009-08-101-2/+9
| | | | | Look in the __qt_scope__ property that is set by QScriptValue::setScope().
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into ↵Kent Hansen2009-08-10119-898/+2179
|\ | | | | | | | | | | | | | | | | qtscript-jsc-backend Conflicts: src/script/api/qscriptable.cpp src/script/api/qscriptable_p.h src/script/qscriptclassdata.cpp
| * Add QBENCMARK_ONCE to QTestLib.Morten Sorvig2009-08-106-5/+54
| | | | | | | | | | | | | | | | | | | | The code block associated with QBENCHMARK_ONCE macro will only be executed once, whether the backend returns a valid result or not. The "-iterations" command line argument is also ignored. This is useful for benchmarking code that has side effects. Revby: jasplin