Category:Developing Qt::Qt Script
There is a mailing list for QtScript development. You can subscribe to it at "http://lists.qt.nokia.com/mailman/listinfo/qt-script":http://lists.qt.nokia.com/mailman/listinfo/qt-script
We have an IRC channel on FreeNode: #qt-script (For a full list of IRC channels of interest to Qt developers, see OnlineCommunities.)
For contributing to QtScript, see the "Qt Contribution Guidelines":http://qt.gitorious.org/qt/pages/QtContributionGuidelines.
Making Applications Scriptable
What's NOT in Scope
QtScript was preceded by QSA — "Qt Script for Applications":http://doc.qt.nokia.com/qsa-1.2.2/index.html. QSA implements a subset of a draft of the (never-completed) ECMAScript 4 language. It also contained API for embedding script editing and "user script execution" into your application (QSA Workbench).
The QtScript module introduced in Qt 4.3 was inspired by QSA, but doesn't share any API or implementation.
The QtScript runtime was built on an in-house-developed, bytecode-based interpreter that performed well for its time.
Qt 4.4 added the "QScriptEngineAgent":http://doc.qt.nokia.com/4.7/qscriptengineagent.html class, which provides an API for hooking into low-level events in the script engine. This class could be used to implement debugging- and profiling-related tools for QtScript.
Qt 4.4 also introduced "QScriptClass":http://doc.qt.nokia.com/4.7/qscriptclass.html, an interface for implementing "catch-all" (interceptor-based) access to script objects; and "QScriptString":http://doc.qt.nokia.com/4.7/qscriptstring.html, a class that represents interned property names (for faster comparison and property access).
Qt 4.5 introduced the "QtScriptTools":http://doc.qt.nokia.com/4.5/qtscripttools.html module, which provides a graphical debugger for QtScript.
Tests and Benchmarks
The QtScript autotests are located in the
directory in the Qt repository (all subdirectories with prefix "qscript" — see script.pro).
There will be differences in the back-ends that are difficult to mask (e.g. different wording in error messages), but we try to keep the tests as back-end-agnostic as possible, so that the same tests can be run against different versions of Qt/QtScript.
Imported Test Suites
(from the Mozilla project), and qscriptv8testsuite (from the V8 project), that have been integrated into Qt's automated test system. These are useful for testing ECMA compliance and compatibility with other JS engines. A handful of the tests are failing on various Qt platforms. The failures are marked as expected, since they are due to the back-end, which is now maintained outside of Qt. However, not all failures have been reported upstream yet, which is something we should try to fix (http://bugreports.qt.nokia.com/browse/QTBUG-16606).
The QtScript benchmarks are located in the
directory in the Qt repository.
In addition to benchmarks for the C++ API, the SunSpider and V8 benchmarks have been imported.
These benchmarks can be used to compare the performance of different versions of Qt/QtScript, in particular to ensure that there are no performance regressions between versions.
The main challenge with this project is that the C API is limited compared to QtScript's API, so a lot of functionality will have to be added to the C API before the QtScript API can be completed on top.
This project is currently paused while "V8":http://code.google.com/p/v8/ is being investigated as an alternative.
QtScript and V8
This category currently contains no pages or media.