summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-05-28 00:48:50 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-05-28 00:57:26 (GMT)
commitb865ab6508963cbad0a12319b40db17f9925bbde (patch)
tree2f9dd738ee06a12248af43591225942d45f17faa /src/declarative/qml
parentc8f180e7023308b8a051b53943b9a088a7f0c427 (diff)
downloadQt-b865ab6508963cbad0a12319b40db17f9925bbde.zip
Qt-b865ab6508963cbad0a12319b40db17f9925bbde.tar.gz
Qt-b865ab6508963cbad0a12319b40db17f9925bbde.tar.bz2
QmlBasicScript should work on the actual JS AST tree
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/parser/javascriptast_p.h6
-rw-r--r--src/declarative/qml/qml.pri6
-rw-r--r--src/declarative/qml/qmlbasicscript.cpp (renamed from src/declarative/qml/script/qmlbasicscript.cpp)370
-rw-r--r--src/declarative/qml/qmlbasicscript_p.h (renamed from src/declarative/qml/script/qmlbasicscript.h)46
-rw-r--r--src/declarative/qml/qmlbindablevalue.cpp4
-rw-r--r--src/declarative/qml/qmlbindablevalue.h2
-rw-r--r--src/declarative/qml/qmlcompiler.cpp45
-rw-r--r--src/declarative/qml/qmlengine.cpp36
-rw-r--r--src/declarative/qml/qmlengine_p.h4
-rw-r--r--src/declarative/qml/qmlexpression.h2
-rw-r--r--src/declarative/qml/qmlparser.cpp1
-rw-r--r--src/declarative/qml/script/generator/generator.pro11
-rw-r--r--src/declarative/qml/script/generator/main.cpp135
-rw-r--r--src/declarative/qml/script/instructions.h32
-rw-r--r--src/declarative/qml/script/keywords.cpp89
-rw-r--r--src/declarative/qml/script/lexer.cpp139
-rw-r--r--src/declarative/qml/script/lexer.h54
-rw-r--r--src/declarative/qml/script/qmlbasicscript_p.h53
-rw-r--r--src/declarative/qml/script/script.pri11
-rw-r--r--src/declarative/qml/script/tokens.cpp43
-rw-r--r--src/declarative/qml/script/tokens.h36
21 files changed, 247 insertions, 878 deletions
diff --git a/src/declarative/qml/parser/javascriptast_p.h b/src/declarative/qml/parser/javascriptast_p.h
index b5fd922..23d59e5 100644
--- a/src/declarative/qml/parser/javascriptast_p.h
+++ b/src/declarative/qml/parser/javascriptast_p.h
@@ -61,8 +61,6 @@ QT_BEGIN_NAMESPACE
#define JAVASCRIPT_DECLARE_AST_NODE(name) \
enum { K = Kind_##name };
-class NameId;
-
namespace QSOperator // ### rename
{
@@ -106,7 +104,9 @@ enum Op {
} // namespace QSOperator
-namespace JavaScript { namespace AST {
+namespace JavaScript {
+class NameId;
+namespace AST {
template <typename _T1, typename _T2>
_T1 cast(_T2 *ast)
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index b6ac30e..c61200e 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -23,7 +23,8 @@ SOURCES += qml/qmlparser.cpp \
qml/qmlcompositetypemanager.cpp \
qml/qmlinfo.cpp \
qml/qmlerror.cpp \
- qml/qmlscriptparser.cpp
+ qml/qmlscriptparser.cpp \
+ qml/qmlbasicscript.cpp
HEADERS += qml/qmlparser_p.h \
qml/qmlinstruction_p.h \
@@ -61,7 +62,8 @@ HEADERS += qml/qmlparser_p.h \
qml/qmllist.h \
qml/qmldeclarativedata_p.h \
qml/qmlerror.h \
- qml/qmlscriptparser_p.h
+ qml/qmlscriptparser_p.h \
+ qml/qmlbasicscript_p.h
# for qtscript debugger
QT += scripttools
diff --git a/src/declarative/qml/script/qmlbasicscript.cpp b/src/declarative/qml/qmlbasicscript.cpp
index 37a6678..3d74b37 100644
--- a/src/declarative/qml/script/qmlbasicscript.cpp
+++ b/src/declarative/qml/qmlbasicscript.cpp
@@ -9,9 +9,7 @@
**
****************************************************************************/
-#include "qmlbasicscript.h"
#include "qmlbasicscript_p.h"
-#include "lexer.h"
#include <QColor>
#include <QDebug>
#include <private/qmlengine_p.h>
@@ -19,9 +17,39 @@
#include <QStack>
#include <qfxperf.h>
#include <private/qmlrefcount_p.h>
-
+#include <private/javascriptast_p.h>
+#include <private/javascriptengine_p.h>
QT_BEGIN_NAMESPACE
+
+struct ScriptInstruction {
+ enum {
+ Load, // fetch
+ Fetch, // fetch
+
+ Add, // NA
+ Subtract, // NA
+ Multiply, // NA
+ Equals, // NA
+ And, // NA
+
+ Int, // integer
+ Bool, // boolean
+ } type;
+
+ union {
+ struct {
+ int idx;
+ } fetch;
+ struct {
+ int value;
+ } integer;
+ struct {
+ bool value;
+ } boolean;
+ };
+};
+
DEFINE_BOOL_CONFIG_OPTION(scriptWarnings, QML_SCRIPT_WARNINGS);
class QmlBasicScriptPrivate
@@ -193,7 +221,7 @@ static QVariant fetch_value(QObject *o, int idx, int type)
};
}
-QVariant QmlBasicScriptNodeCache::value(const char *name) const
+QVariant QmlBasicScriptNodeCache::value(const char *) const
{
//QFxPerfTimer<QFxPerf::BasicScriptValue> pt;
switch(type) {
@@ -220,29 +248,23 @@ QVariant QmlBasicScriptNodeCache::value(const char *name) const
struct QmlBasicScriptCompiler
{
QmlBasicScriptCompiler()
- : script(0), stateSize(0), src(0), idx(0) {}
+ : script(0), stateSize(0) {}
QmlBasicScript *script;
- QList<LexerToken> tokens;
int stateSize;
- const char *src;
- int idx;
- bool compile();
- bool compileExpr();
+ bool compile(JavaScript::AST::Node *);
+
+ bool compileExpression(JavaScript::AST::Node *);
- bool parseFetch();
- bool parseName();
- bool parseConstant();
- void skipWhitespace();
+ bool tryConstant(JavaScript::AST::Node *);
+ bool parseConstant(JavaScript::AST::Node *);
+ bool tryName(JavaScript::AST::Node *);
+ bool parseName(JavaScript::AST::Node *);
+ bool tryBinaryExpression(JavaScript::AST::Node *);
+ bool compileBinaryExpression(JavaScript::AST::Node *);
QByteArray data;
QList<ScriptInstruction> bytecode;
-
- QByteArray string(int, int);
- Token token() const;
- bool atEnd() const;
- void adv();
- int index() const;
};
/*!
@@ -416,30 +438,18 @@ bool QmlBasicScript::isValid() const
}
/*!
- Compile \a src and return true if the compilation is successful, otherwise
+ Compile \a v and return true if the compilation is successful, otherwise
returns false.
*/
-bool QmlBasicScript::compile(const QByteArray &src)
+bool QmlBasicScript::compile(const QmlParser::Variant &v)
{
- bool rv = compile(src.constData());
- return rv;
-}
+ if (!v.asAST()) return false;
-/*!
- \overload
-
- Compile \a src and return true if the compilation is successful, otherwise
- returns false.
- */
-bool QmlBasicScript::compile(const char *src)
-{
- if (!src) return false;
+ QByteArray expr = v.asScript().toLatin1();
+ const char *src = expr.constData();
QmlBasicScriptCompiler bsc;
bsc.script = this;
- bsc.tokens = tokenize(src);
- bsc.src = src;
- // dumpTokens(src, bsc.tokens);
if (d) {
if (flags & QmlBasicScriptPrivate::OwnData)
@@ -448,7 +458,7 @@ bool QmlBasicScript::compile(const char *src)
flags = 0;
}
- if (bsc.compile()) {
+ if (bsc.compile(v.asAST())) {
int len = ::strlen(src);
flags = QmlBasicScriptPrivate::OwnData;
int size = sizeof(QmlBasicScriptPrivate) +
@@ -468,226 +478,148 @@ bool QmlBasicScript::compile(const char *src)
return d != 0;
}
-void QmlBasicScriptCompiler::skipWhitespace()
+bool QmlBasicScriptCompiler::compile(JavaScript::AST::Node *node)
{
- while(idx < tokens.count() && tokens.at(idx).token == WHITESPACE)
- ++idx;
+ return compileExpression(node);
}
-bool QmlBasicScriptCompiler::compile()
+using namespace JavaScript;
+bool QmlBasicScriptCompiler::tryConstant(JavaScript::AST::Node *node)
{
- if (!compileExpr())
- return false;
-
- skipWhitespace();
-
- if (atEnd())
+ if (node->kind == AST::Node::Kind_TrueLiteral ||
+ node->kind == AST::Node::Kind_FalseLiteral)
return true;
- int t = token();
- if (t != AND)
- return false;
-
- adv();
- skipWhitespace();
- if (!compileExpr())
- return false;
-
- ScriptInstruction instr;
- instr.type = ScriptInstruction::And;
- bytecode.append(instr);
+ if (node->kind == AST::Node::Kind_NumericLiteral) {
+ AST::NumericLiteral *lit = static_cast<AST::NumericLiteral *>(node);
- skipWhitespace();
+ return lit->suffix == AST::NumericLiteral::noSuffix &&
+ double(int(lit->value)) == lit->value;
+ }
- return atEnd();
+ return false;
}
-bool QmlBasicScriptCompiler::compileExpr()
+bool QmlBasicScriptCompiler::parseConstant(JavaScript::AST::Node *node)
{
- /*
- EXPRESSION := <NAME><OPERATOR>[<CONSTANT>|<NAME>]
- */
-
- if (!parseName())
- return false;
-
- skipWhitespace();
-
- if (atEnd())
- return true;
+ ScriptInstruction instr;
- int t = token();
- switch(t) {
- case PLUS:
- case MINUS:
- /*
- case LANGLE:
- case RANGLE:
- */
- case STAR:
- case EQUALS:
- break;
- default:
- return true;
+ if (node->kind == AST::Node::Kind_NumericLiteral) {
+ AST::NumericLiteral *lit = static_cast<AST::NumericLiteral *>(node);
+ instr.type = ScriptInstruction::Int;
+ instr.integer.value = int(lit->value);
+ } else {
+ instr.type = ScriptInstruction::Bool;
+ instr.boolean.value = node->kind == AST::Node::Kind_TrueLiteral;
}
- adv();
-
- skipWhitespace();
-
- if (!parseConstant() &&
- !parseName())
- return false;
- ScriptInstruction instr;
- switch(t) {
- case PLUS:
- instr.type = ScriptInstruction::Add;
- break;
- case MINUS:
- instr.type = ScriptInstruction::Subtract;
- break;
- case STAR:
- instr.type = ScriptInstruction::Multiply;
- break;
- case EQUALS:
- instr.type = ScriptInstruction::Equals;
- break;
- default:
- break;
- }
bytecode.append(instr);
- skipWhitespace();
-
return true;
}
-bool QmlBasicScriptCompiler::parseName()
+bool QmlBasicScriptCompiler::tryName(JavaScript::AST::Node *node)
{
- skipWhitespace();
-
- bool named = false;
- bool seenchar = false;
- bool seendot = false;
- int namestart = -1;
- bool pushed = false;
- while(!atEnd()) {
- int t = token();
- if (t == CHARACTER) {
- named = true;
- seendot = false;
- seenchar = true;
- namestart = index();
- adv();
- } else if (t == DIGIT) {
- if (!seenchar) break;
- adv();
- } else if (t == DOT) {
- seendot = true;
- if (namestart == -1)
- break;
-
- seenchar = false;
- QByteArray name = string(namestart, index() - 1);
- int nref = data.count();
- data.append(name);
- data.append('\0');
- ScriptInstruction instr;
- if (pushed)
- instr.type = ScriptInstruction::Fetch;
- else
- instr.type = ScriptInstruction::Load;
- pushed = true;
- instr.fetch.idx = nref;
- bytecode.append(instr);
- ++stateSize;
- namestart = -1;
- adv();
- } else {
- break;
- }
- }
-
- if (namestart != -1) {
- QByteArray name = string(namestart, index() - 1);
- int nref = data.count();
- data.append(name);
- data.append('\0');
- ScriptInstruction instr;
- if (pushed)
- instr.type = ScriptInstruction::Fetch;
- else
- instr.type = ScriptInstruction::Load;
- pushed = true;
- instr.fetch.idx = nref;
- bytecode.append(instr);
- ++stateSize;
- }
-
- if (seendot)
- return false;
- else
- return named;
+ return node->kind == AST::Node::Kind_IdentifierExpression ||
+ node->kind == AST::Node::Kind_FieldMemberExpression;
}
-bool QmlBasicScriptCompiler::parseConstant()
+bool QmlBasicScriptCompiler::parseName(AST::Node *node)
{
- switch(token()) {
- case DIGIT:
- {
- ScriptInstruction instr;
- instr.type = ScriptInstruction::Int;
- instr.integer.value = string(index(), index()).toUInt();
- bytecode.append(instr);
- adv();
- }
- break;
- case TOKEN_TRUE:
- case TOKEN_FALSE:
- {
- ScriptInstruction instr;
- instr.type = ScriptInstruction::Bool;
- instr.boolean.value = (token() == TOKEN_TRUE);
- bytecode.append(instr);
- adv();
- }
- break;
+ bool load = false;
+
+ QString name;
+ if (node->kind == AST::Node::Kind_IdentifierExpression) {
+ name = static_cast<AST::IdentifierExpression *>(node)->name->asString();
+ load = true;
+ } else if (node->kind == AST::Node::Kind_FieldMemberExpression) {
+ AST::FieldMemberExpression *expr = static_cast<AST::FieldMemberExpression *>(node);
- default:
+ if (!parseName(expr->base))
+ return false;
+
+ name = expr->name->asString();
+ } else {
return false;
}
+ int nref = data.count();
+ data.append(name.toUtf8());
+ data.append('\0');
+ ScriptInstruction instr;
+ if (load)
+ instr.type = ScriptInstruction::Load;
+ else
+ instr.type = ScriptInstruction::Fetch;
+ instr.fetch.idx = nref;
+ bytecode.append(instr);
+ ++stateSize;
+
return true;
}
-bool QmlBasicScriptCompiler::atEnd() const
+bool QmlBasicScriptCompiler::compileExpression(JavaScript::AST::Node *node)
{
- return idx >= tokens.count();
+ if (tryBinaryExpression(node))
+ return compileBinaryExpression(node);
+ else if (tryConstant(node))
+ return parseConstant(node);
+ else if (tryName(node))
+ return parseName(node);
+ else
+ return false;
}
-Token QmlBasicScriptCompiler::token() const
+bool QmlBasicScriptCompiler::tryBinaryExpression(AST::Node *node)
{
- return tokens.at(idx).token;
-}
+ if (node->kind == AST::Node::Kind_BinaryExpression) {
+ AST::BinaryExpression *expr =
+ static_cast<AST::BinaryExpression *>(node);
-void QmlBasicScriptCompiler::adv()
-{
- ++idx;
+ if (expr->op == QSOperator::Add ||
+ expr->op == QSOperator::Sub ||
+ expr->op == QSOperator::Equal ||
+ expr->op == QSOperator::And ||
+ expr->op == QSOperator::Mul)
+ return true;
+ }
+ return false;
}
-int QmlBasicScriptCompiler::index() const
+bool QmlBasicScriptCompiler::compileBinaryExpression(AST::Node *node)
{
- return idx;
-}
+ if (node->kind == AST::Node::Kind_BinaryExpression) {
+ AST::BinaryExpression *expr =
+ static_cast<AST::BinaryExpression *>(node);
-QByteArray QmlBasicScriptCompiler::string(int from, int to)
-{
- QByteArray rv;
- for (int ii = from; ii <= to; ++ii) {
- const LexerToken &token = tokens.at(ii);
- rv.append(QByteArray(src + token.start, token.end - token.start + 1));
- }
- return rv;
+ if (!compileExpression(expr->left)) return false;
+ if (!compileExpression(expr->right)) return false;
+
+ ScriptInstruction instr;
+ switch (expr->op) {
+ case QSOperator::Add:
+ instr.type = ScriptInstruction::Add;
+ break;
+ case QSOperator::Sub:
+ instr.type = ScriptInstruction::Subtract;
+ break;
+ case QSOperator::Equal:
+ instr.type = ScriptInstruction::Equals;
+ break;
+ case QSOperator::And:
+ instr.type = ScriptInstruction::And;
+ break;
+ case QSOperator::Mul:
+ instr.type = ScriptInstruction::Multiply;
+ break;
+ default:
+ return false;
+ }
+
+ bytecode.append(instr);
+ return true;
+ }
+ return false;
}
/*!
diff --git a/src/declarative/qml/script/qmlbasicscript.h b/src/declarative/qml/qmlbasicscript_p.h
index 5ef2148..1117e11 100644
--- a/src/declarative/qml/script/qmlbasicscript.h
+++ b/src/declarative/qml/qmlbasicscript_p.h
@@ -9,21 +9,18 @@
**
****************************************************************************/
-#ifndef QMLBASICSCRIPT_H
-#define QMLBASICSCRIPT_H
+#ifndef QMLBASICSCRIPT_P_H
+#define QMLBASICSCRIPT_P_H
-#include "instructions.h"
#include <QtCore/QList>
#include <QtCore/QByteArray>
-#include "lexer.h"
#include <QtCore/QVariant>
-
+#include <private/qmlparser_p.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QmlRefCount;
class QmlContext;
class QmlBasicScriptPrivate;
@@ -41,8 +38,7 @@ public:
QByteArray expression() const;
- bool compile(const QByteArray &);
- bool compile(const char *);
+ bool compile(const QmlParser::Variant &);
bool isValid() const;
void clear();
@@ -68,9 +64,41 @@ private:
bool valid(QmlBasicScriptNodeCache &, QObject *);
};
-#endif // QMLBASICSCRIPT_H
+class QmlContextPrivate;
+class QDebug;
+class QmlBasicScriptNodeCache
+{
+public:
+ QObject *object;
+ const QMetaObject *metaObject;
+ enum { Invalid,
+ Core,
+ Attached,
+ Signal,
+ SignalProperty,
+ Variant
+ } type;
+ union {
+ int core;
+ QObject *attached;
+ QmlContextPrivate *context;
+ };
+ int coreType;
+ int contextIndex;
+
+ bool isValid() const { return type != Invalid; }
+ bool isCore() const { return type == Core; }
+ bool isVariant() const { return type == Variant; }
+ void clear();
+ QVariant value(const char *) const;
+};
+QDebug operator<<(QDebug, const QmlBasicScriptNodeCache &);
QT_END_NAMESPACE
QT_END_HEADER
+
+#endif // QMLBASICSCRIPT_P_H
+
+
diff --git a/src/declarative/qml/qmlbindablevalue.cpp b/src/declarative/qml/qmlbindablevalue.cpp
index d5157b6..351e0bd 100644
--- a/src/declarative/qml/qmlbindablevalue.cpp
+++ b/src/declarative/qml/qmlbindablevalue.cpp
@@ -69,8 +69,8 @@ QmlBindableValue::QmlBindableValue(void *data, QmlRefCount *rc, QObject *obj, QO
{
}
-QmlBindableValue::QmlBindableValue(const QString &str, QObject *obj, bool sse, QObject *parent)
-: QmlPropertyValueSource(*new QmlBindableValuePrivate, parent), QmlExpression(QmlContext::activeContext(), str, obj, sse)
+QmlBindableValue::QmlBindableValue(const QString &str, QObject *obj, QObject *parent)
+: QmlPropertyValueSource(*new QmlBindableValuePrivate, parent), QmlExpression(QmlContext::activeContext(), str, obj)
{
}
diff --git a/src/declarative/qml/qmlbindablevalue.h b/src/declarative/qml/qmlbindablevalue.h
index c5bb97b..71a7051 100644
--- a/src/declarative/qml/qmlbindablevalue.h
+++ b/src/declarative/qml/qmlbindablevalue.h
@@ -63,7 +63,7 @@ class Q_DECLARATIVE_EXPORT QmlBindableValue : public QmlPropertyValueSource,
Q_OBJECT
public:
QmlBindableValue(QObject *parent);
- QmlBindableValue(const QString &, QObject *, bool = true, QObject *parent=0);
+ QmlBindableValue(const QString &, QObject *, QObject *parent=0);
QmlBindableValue(void *, QmlRefCount *, QObject *, QObject *parent);
~QmlBindableValue();
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index b9a848a..75d01c2 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -46,7 +46,7 @@
#include <qmlpropertyvaluesource.h>
#include <qmlcomponent.h>
#include "private/qmetaobjectbuilder_p.h"
-#include <qmlbasicscript.h>
+#include "qmlbasicscript_p.h"
#include <QColor>
#include <QDebug>
#include <QPointF>
@@ -1415,7 +1415,7 @@ bool QmlCompiler::compileBinding(const QmlParser::Variant &bind,
COMPILE_EXCEPTION2(prop, "Cannot assign binding to read-only property");
QmlBasicScript bs;
- bs.compile(bind.asScript().toLatin1());
+ bs.compile(bind);
int bref;
if (bs.isValid()) {
@@ -1447,6 +1447,47 @@ bool QmlCompiler::compileBinding(const QmlParser::Variant &bind,
return true;
}
+#if 0
+
+#include <iostream>
+#ifdef Q_CC_GNU
+#include <cxxabi.h>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// AST Dump
+////////////////////////////////////////////////////////////////////////////////
+class Dump: protected JavaScript::AST::Visitor
+{
+ std::ostream &out;
+ int depth;
+
+public:
+ Dump(std::ostream &out)
+ : out(out), depth(-1)
+ { }
+
+ void operator()(JavaScript::AST::Node *node)
+ { JavaScript::AST::Node::acceptChild(node, this); }
+
+protected:
+ virtual bool preVisit(JavaScript::AST::Node *node)
+ {
+ const char *name = typeid(*node).name();
+#ifdef Q_CC_GNU
+ name = abi::__cxa_demangle(name, 0, 0, 0) + 17;
+#endif
+ std::cout << std::string(++depth, ' ') << name << std::endl;
+ return true;
+ }
+
+ virtual void postVisit(JavaScript::AST::Node *)
+ {
+ --depth;
+ }
+};
+#endif
+
// Update the init instruction with final data, and optimize some simple
// bindings
int QmlCompiler::finalizeComponent(int patch)
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 3db8d92..c67c220 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -820,15 +820,9 @@ QmlExpressionPrivate::QmlExpressionPrivate(QmlExpression *b, void *expr, QmlRefC
{
}
-QmlExpressionPrivate::QmlExpressionPrivate(QmlExpression *b, const QString &expr, bool ssecompile)
+QmlExpressionPrivate::QmlExpressionPrivate(QmlExpression *b, const QString &expr)
: q(b), ctxt(0), expression(expr), sseData(0), proxy(0), me(0), trackChange(true), line(-1), id(0), log(0)
{
- if (ssecompile) {
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::BindCompile> pt;
-#endif
- sse.compile(expr.toLatin1());
- }
}
QmlExpressionPrivate::~QmlExpressionPrivate()
@@ -863,19 +857,6 @@ QmlExpression::QmlExpression(QmlContext *ctxt, void *expr,
d->me = me;
}
-/*! \internal */
-QmlExpression::QmlExpression(QmlContext *ctxt, const QString &expr,
- QObject *me, bool ssecompile)
-: d(new QmlExpressionPrivate(this, expr, ssecompile))
-{
- d->ctxt = ctxt;
- if(ctxt && ctxt->engine())
- d->id = ctxt->engine()->d_func()->getUniqueId();
- if(ctxt)
- ctxt->d_func()->childExpressions.insert(this);
- d->me = me;
-}
-
/*!
Create a QmlExpression object.
@@ -885,7 +866,7 @@ QmlExpression::QmlExpression(QmlContext *ctxt, const QString &expr,
*/
QmlExpression::QmlExpression(QmlContext *ctxt, const QString &expression,
QObject *scope)
-: d(new QmlExpressionPrivate(this, expression, true))
+: d(new QmlExpressionPrivate(this, expression))
{
d->ctxt = ctxt;
if(ctxt && ctxt->engine())
@@ -956,10 +937,7 @@ void QmlExpression::setExpression(const QString &expression)
d->expression = expression;
- if (d->expression.isEmpty())
- d->sse.clear();
- else
- d->sse.compile(expression.toLatin1());
+ d->sse.clear();
}
/*!
@@ -1245,13 +1223,7 @@ QmlExpressionObject::QmlExpressionObject(QObject *parent)
the expression's execution.
*/
QmlExpressionObject::QmlExpressionObject(QmlContext *ctxt, const QString &expression, QObject *scope, QObject *parent)
-: QObject(parent), QmlExpression(ctxt, expression, scope, true)
-{
-}
-
-/*! \internal */
-QmlExpressionObject::QmlExpressionObject(QmlContext *ctxt, const QString &expr, QObject *scope, bool sse)
-: QmlExpression(ctxt, expr, scope, sse)
+: QObject(parent), QmlExpression(ctxt, expression, scope)
{
}
diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h
index 0dc4736..89b0a4a 100644
--- a/src/declarative/qml/qmlengine_p.h
+++ b/src/declarative/qml/qmlengine_p.h
@@ -53,7 +53,7 @@
#include <private/qmlclassfactory_p.h>
#include <private/qmlcompositetypemanager_p.h>
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlbasicscript.h>
+#include <private/qmlbasicscript_p.h>
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qmlengine.h>
#include <QtDeclarative/qmlexpression.h>
@@ -265,7 +265,7 @@ class QmlExpressionPrivate
{
public:
QmlExpressionPrivate(QmlExpression *);
- QmlExpressionPrivate(QmlExpression *, const QString &expr, bool);
+ QmlExpressionPrivate(QmlExpression *, const QString &expr);
QmlExpressionPrivate(QmlExpression *, void *expr, QmlRefCount *rc);
~QmlExpressionPrivate();
diff --git a/src/declarative/qml/qmlexpression.h b/src/declarative/qml/qmlexpression.h
index ea3b093..651fd9c 100644
--- a/src/declarative/qml/qmlexpression.h
+++ b/src/declarative/qml/qmlexpression.h
@@ -62,7 +62,6 @@ class Q_DECLARATIVE_EXPORT QmlExpression
public:
QmlExpression();
QmlExpression(QmlContext *, const QString &, QObject *);
- QmlExpression(QmlContext *, const QString &, QObject *, bool);
QmlExpression(QmlContext *, void *, QmlRefCount *rc, QObject *me);
virtual ~QmlExpression();
@@ -101,7 +100,6 @@ class Q_DECLARATIVE_EXPORT QmlExpressionObject : public QObject,
public:
QmlExpressionObject(QObject *parent = 0);
QmlExpressionObject(QmlContext *, const QString &, QObject *scope, QObject *parent = 0);
- QmlExpressionObject(QmlContext *, const QString &, QObject *scope, bool);
QmlExpressionObject(QmlContext *, void *, QmlRefCount *, QObject *);
public Q_SLOTS:
diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp
index 5c2a69f..f262b5d 100644
--- a/src/declarative/qml/qmlparser.cpp
+++ b/src/declarative/qml/qmlparser.cpp
@@ -52,7 +52,6 @@
#include <qml.h>
#include "private/qmlcomponent_p.h"
#include <qmlcomponent.h>
-#include <qmlbasicscript.h>
#include "private/qmetaobjectbuilder_p.h"
#include <private/qmlvmemetaobject_p.h>
#include <private/qmlcompiler_p.h>
diff --git a/src/declarative/qml/script/generator/generator.pro b/src/declarative/qml/script/generator/generator.pro
deleted file mode 100644
index 1b2a4c7..0000000
--- a/src/declarative/qml/script/generator/generator.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Mon Apr 2 20:15:52 2007
-######################################################################
-
-TEMPLATE = app
-TARGET =
-DEPENDPATH += .
-INCLUDEPATH += .
-
-# Input
-SOURCES += main.cpp
diff --git a/src/declarative/qml/script/generator/main.cpp b/src/declarative/qml/script/generator/main.cpp
deleted file mode 100644
index a841cbc..0000000
--- a/src/declarative/qml/script/generator/main.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** This file is part of the $PACKAGE_NAME$.
-**
-** Copyright (C) $THISYEAR$ $COMPANY_NAME$.
-**
-** $QT_EXTENDED_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#include <QList>
-#include <QByteArray>
-
-
-QT_BEGIN_NAMESPACE
-struct Keyword {
- const char *lexem;
- const char *token;
-};
-
-struct State
-{
- State(const char* token) : token(token)
- {
- ::memset(next, 0, sizeof(next));
- }
- State(const State &other) : token(other.token)
- {
- ::memcpy(next, other.next, sizeof(next));
- }
- State &operator=(const State &other)
- {
- token = other.token;
- ::memcpy(next, other.next, sizeof(next));
- return *this;
- }
-
- QByteArray token;
- int next[128];
-};
-
-Keyword keywords[] =
-{
- {"<", "LANGLE" },
- {">", "RANGLE" },
- {"+", "PLUS" },
- {"-", "MINUS" },
- {"*", "STAR" },
- {"==", "EQUALS" },
- {"&&", "AND" },
- {".", "DOT"},
- {"true", "TOKEN_TRUE"},
- {"false", "TOKEN_FALSE"},
- {" ", "WHITESPACE"},
- {"\t", "WHITESPACE"},
- {0, 0}
-};
-
-bool is_character(char s)
-{
- return (s >= 'a' && s <= 'z') ||
- (s >= 'A' && s <= 'Z') ||
- (s >= '0' && s <= '9') ||
- s == '_';
-}
-
-void newState(QList<State> &states, const char *token, const char *lexem)
-{
- int state = 0;
- bool character = is_character(*lexem);
-
- while(*lexem) {
- int next = states[state].next[(int)*lexem];
-
- if (!next) {
- next = states.size();
- states += State(character?"CHARACTER":"INCOMPLETE");
- states[state].next[(int)*lexem] = next;
- }
-
- state = next;
- ++lexem;
- character = character && is_character(*lexem);
- }
-
- states[state].token = token;
-}
-
-void newState(QList<State> &states, const char *token, char lexem)
-{
- int next = states[0].next[(int)lexem];
- if (!next) {
- next = states.size();
- states += State(token);
- states[0].next[(int)lexem] = next;
- } else {
- states[next].token = token;
- }
-}
-
-int main()
-{
- QList<State> states;
- states += State("NOTOKEN");
-
- // identifiers
- for (int cc = 'a'; cc <= 'z'; ++cc)
- newState(states, "CHARACTER", cc);
- for (int cc = 'A'; cc <= 'Z'; ++cc)
- newState(states, "CHARACTER", cc);
- newState(states, "CHARACTER", '_');
-
- // add digits
- for (int cc = '0'; cc <= '9'; ++cc)
- newState(states, "DIGIT", cc);
-
- // keywords
- for (int ii = 0; keywords[ii].lexem; ++ii)
- newState(states, keywords[ii].token, keywords[ii].lexem);
-
- ::printf("static const struct\n{\n"
- " Token token;\n"
- " char next[128];\n"
- "} keywords[] = {\n");
-
- for (int ii = 0; ii < states.size(); ++ii) {
- printf("%s { %s, { ", ii?",\n":"", states[ii].token.data());
- for (int jj = 0; jj < 128; jj++)
- printf("%s%d", jj?",":"", states[ii].next[jj]);
- printf(" } }");
- }
-
- printf("\n};\n");
-}
-QT_END_NAMESPACE
diff --git a/src/declarative/qml/script/instructions.h b/src/declarative/qml/script/instructions.h
deleted file mode 100644
index a21cbce..0000000
--- a/src/declarative/qml/script/instructions.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _INSTRUCTIONS_H_
-#define _INSTRUCTIONS_H_
-
-struct ScriptInstruction {
- enum {
- Load, // fetch
- Fetch, // fetch
-
- Add, // NA
- Subtract, // NA
- Multiply, // NA
- Equals, // NA
- And, // NA
-
- Int, // integer
- Bool, // boolean
- } type;
-
- union {
- struct {
- int idx;
- } fetch;
- struct {
- int value;
- } integer;
- struct {
- bool value;
- } boolean;
- };
-};
-
-#endif // _INSTRUCTIONS_H_
diff --git a/src/declarative/qml/script/keywords.cpp b/src/declarative/qml/script/keywords.cpp
deleted file mode 100644
index 4cde65b..0000000
--- a/src/declarative/qml/script/keywords.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-static const struct
-{
- Token token;
- char next[128];
-} keywords[] = {
- { NOTOKEN, { 0,0,0,0,0,0,0,0,0,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,81,0,0,0,0,0,71,0,0,0,68,66,0,67,73,0,54,55,56,57,58,59,60,61,62,63,0,0,64,69,65,0,0,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,0,0,0,0,53,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,0,0,0,0,0 } },
- { CHARACTER, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
- { CHARACTER, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
- { CHARACTER, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
- { TOKEN_FALSE, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
- { WHITESPACE, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } },
- { WHITESPACE, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } }
-};
diff --git a/src/declarative/qml/script/lexer.cpp b/src/declarative/qml/script/lexer.cpp
deleted file mode 100644
index d3ef935..0000000
--- a/src/declarative/qml/script/lexer.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
-**
-** This file is part of the $PACKAGE_NAME$.
-**
-** Copyright (C) $THISYEAR$ $COMPANY_NAME$.
-**
-** $QT_EXTENDED_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#include <QByteArray>
-#include "lexer.h"
-#include "keywords.cpp"
-#include <QDebug>
-
-
-QT_BEGIN_NAMESPACE
-QList<LexerToken> tokenize(const char *text)
-{
- QList<LexerToken> rv;
-
- int lineNo = 0;
- int charNo = 0;
- int state = 0;
- int tokenStart = 0;
- bool other = false;
-
- const char *textprog = text;
-
- bool done = false;
- while (!done) {
- char textchar = *textprog;
- done = !textchar;
-
- if (other) {
- if (keywords[state].next[(int)textchar]) {
-
- // Do other token
- LexerToken token;
- token.token = OTHER;
- token.start = tokenStart;
- token.end = textprog - text - 1;
- token.line = lineNo + 1;
- token.offset = charNo - (token.end - token.start);
- tokenStart = token.end + 1;
- rv.append(token);
- other = false;
-
- } else {
- goto continue_loop;
- }
- }
-
- if (keywords[state].next[(int)textchar]) {
-
- state = keywords[state].next[(int)textchar];
-
- } else if (0 == state ||
- keywords[state].token == INCOMPLETE) {
-
- other = true;
- if (keywords[state].token == INCOMPLETE) {
- state = 0;
- continue;
- }
-
- } else {
-
- // Token completed
- Token tokenType = keywords[state].token;
- bool tokenCollapsed = false;
- if (tokenType == CHARACTER ||
- tokenType == DIGIT ||
- tokenType == WHITESPACE) {
-
- Token lastTokenType =
- rv.isEmpty()?NOTOKEN:rv.last().token;
- if (tokenType == lastTokenType) {
-
- rv.last().end = textprog - text - 1;
- tokenStart = rv.last().end + 1;
-
- tokenCollapsed = true;
- }
- }
-
- if (!tokenCollapsed) {
- LexerToken token;
- token.token = keywords[state].token;
- token.start = tokenStart;
- token.end = textprog - text - 1;
- token.line = lineNo + 1;
- token.offset = charNo - (token.end - token.start);
- tokenStart = token.end + 1;
- rv.append(token);
- }
-
- state = keywords[0].next[(int)textchar];
- if (0 == state)
- other = true;
- }
-
-continue_loop:
- // Reset error reporting variables
- if (textchar == '\n') {
- ++lineNo;
- charNo = 0;
- } else {
- charNo++;
- }
-
- // Increment ptrs
- ++textprog;
- }
-
- if (other && ((textprog - text - 1) != tokenStart)) {
- // Do other token
- LexerToken token;
- token.token = OTHER;
- token.start = tokenStart;
- token.end = textprog - text - 1;
- token.line = lineNo + 1;
- token.offset = charNo - (token.end - token.start);
- tokenStart = token.end + 1;
- rv.append(token);
- other = false;
- }
- return rv;
-}
-
-void dumpTokens(const char *text, const QList<LexerToken> &tokens)
-{
- for (int ii = 0; ii < tokens.count(); ++ii) {
- QByteArray ba(text + tokens.at(ii).start, tokens.at(ii).end - tokens.at(ii).start + 1);
- qWarning() << tokens.at(ii).line << ":" << tokens.at(ii).offset << tokenToString(tokens.at(ii).token) << "(" << tokens.at(ii).start << "-" << tokens.at(ii).end << ")" << ba;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/declarative/qml/script/lexer.h b/src/declarative/qml/script/lexer.h
deleted file mode 100644
index 9de4afd..0000000
--- a/src/declarative/qml/script/lexer.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** This file is part of the $PACKAGE_NAME$.
-**
-** Copyright (C) $THISYEAR$ $COMPANY_NAME$.
-**
-** $QT_EXTENDED_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#ifndef LEXER_H
-#define LEXER_H
-
-#include <QtCore/QList>
-#include "tokens.h"
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-struct LexerToken
-{
- LexerToken() : token(NOTOKEN), start(-1), end(-1), line(-1), offset(-1) {}
- LexerToken(const LexerToken &other) : token(other.token),
- start(other.start),
- end(other.end),
- line(other.line),
- offset(other.offset) {}
- LexerToken &operator=(const LexerToken &other) {
- token = other.token;
- start = other.start;
- end = other.end;
- line = other.line;
- offset = other.offset;
- return *this;
- }
-
- Token token;
- int start;
- int end;
- int line;
- int offset;
-};
-
-QList<LexerToken> tokenize(const char *text);
-void dumpTokens(const char *text, const QList<LexerToken> &tokens);
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-#endif
diff --git a/src/declarative/qml/script/qmlbasicscript_p.h b/src/declarative/qml/script/qmlbasicscript_p.h
deleted file mode 100644
index 3b7e966..0000000
--- a/src/declarative/qml/script/qmlbasicscript_p.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the $MODULE$ of the Qt Toolkit.
-**
-** $TROLLTECH_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLBASICSCRIPT_P_H
-#define QMLBASICSCRIPT_P_H
-
-QT_BEGIN_NAMESPACE
-
-class QObject;
-class QmlContextPrivate;
-class QDebug;
-class QByteArray;
-
-class QmlBasicScriptNodeCache
-{
-public:
- QObject *object;
- const QMetaObject *metaObject;
- enum { Invalid,
- Core,
- Attached,
- Signal,
- SignalProperty,
- Variant
- } type;
- union {
- int core;
- QObject *attached;
- QmlContextPrivate *context;
- };
- int coreType;
- int contextIndex;
-
- bool isValid() const { return type != Invalid; }
- bool isCore() const { return type == Core; }
- bool isVariant() const { return type == Variant; }
- void clear();
- QVariant value(const char *) const;
-};
-
-QDebug operator<<(QDebug, const QmlBasicScriptNodeCache &);
-
-#endif // QMLBASICSCRIPT_P_H
-
-QT_END_NAMESPACE
diff --git a/src/declarative/qml/script/script.pri b/src/declarative/qml/script/script.pri
deleted file mode 100644
index 6c43efe..0000000
--- a/src/declarative/qml/script/script.pri
+++ /dev/null
@@ -1,11 +0,0 @@
-SOURCES += \
- qml/script/tokens.cpp \
- qml/script/lexer.cpp \
- qml/script/qmlbasicscript.cpp
-
-HEADERS += \
- qml/script/tokens.h \
- qml/script/lexer.h \
- qml/script/instructions.h \
- qml/script/qmlbasicscript.h \
- qml/script/qmlbasicscript_p.h
diff --git a/src/declarative/qml/script/tokens.cpp b/src/declarative/qml/script/tokens.cpp
deleted file mode 100644
index a2fb100..0000000
--- a/src/declarative/qml/script/tokens.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
-**
-** This file is part of the $PACKAGE_NAME$.
-**
-** Copyright (C) $THISYEAR$ $COMPANY_NAME$.
-**
-** $QT_EXTENDED_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#include "tokens.h"
-
-
-/*!
- Returns a string representation of token \a tok.
-*/
-const char *tokenToString(Token tok)
-{
- switch(tok) {
-#define CASE(X) case X: return #X;
- CASE(NOTOKEN)
- CASE(INCOMPLETE)
- CASE(WHITESPACE)
- CASE(LANGLE)
- CASE(RANGLE)
- CASE(PLUS)
- CASE(MINUS)
- CASE(STAR)
- CASE(EQUALS)
- CASE(DOT)
- CASE(CHARACTER)
- CASE(DIGIT)
- CASE(OTHER)
- CASE(AND)
- case TOKEN_TRUE:
- return "TRUE";
- case TOKEN_FALSE:
- return "FALSE";
-#undef CASE
- }
- return 0;
-}
-
diff --git a/src/declarative/qml/script/tokens.h b/src/declarative/qml/script/tokens.h
deleted file mode 100644
index 753e40c..0000000
--- a/src/declarative/qml/script/tokens.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** This file is part of the $PACKAGE_NAME$.
-**
-** Copyright (C) $THISYEAR$ $COMPANY_NAME$.
-**
-** $QT_EXTENDED_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TOKENS_H
-#define TOKENS_H
-
-enum Token {
- // Lexer tokens
- NOTOKEN,
- INCOMPLETE,
- WHITESPACE,
- LANGLE,
- RANGLE,
- PLUS,
- MINUS,
- STAR,
- EQUALS,
- AND,
- DOT,
- CHARACTER,
- DIGIT,
- TOKEN_TRUE,
- TOKEN_FALSE,
- OTHER
-};
-
-const char *tokenToString(Token);
-
-#endif