diff options
30 files changed, 1161 insertions, 875 deletions
diff --git a/src/declarative/3rdparty/qlistmodelinterface.cpp b/src/declarative/3rdparty/qlistmodelinterface.cpp index d327b58..75960a1 100644 --- a/src/declarative/3rdparty/qlistmodelinterface.cpp +++ b/src/declarative/3rdparty/qlistmodelinterface.cpp @@ -69,13 +69,13 @@ QT_BEGIN_NAMESPACE Returns the number of data entries in the model. */ -/*! \fn QHash_int QListModelInterface::data(int index, const QList<int> &roles) const +/*! \fn QHash<int,QVariant> QListModelInterface::data(int index, const QList<int>& roles) const Returns the data at the given \a index for the specifed \a roles. */ -/*! \fn bool QListModelInterface::setData(int index, const QHash<int> &values) +/*! \fn bool QListModelInterface::setData(int index, const QHash<int,QVariant>& values) Sets the data at the given \a index. \a values is a mapping of - QVariant values to roles. + QVariant values to roles. Returns false. */ /*! \fn QList<int> QListModelInterface::roles() const @@ -87,13 +87,22 @@ QT_BEGIN_NAMESPACE Returns a string description of the specified \a role. */ -/*! \enum QListModelInterface::Roles +/*! \fn void QListModelInterface::itemsInserted(int index, int count) + Emit this signal when \a count items are inserted at \a index. + */ - Values for representing roles. +/*! \fn void QListModelInterface::itemsRemoved(int index, int count) + Emit this signal when \a count items are removed at \a index. + */ - \value TextRole +/*! \fn void QListModelInterface::itemsMoved(int from, int to, int count) + Emit this signal when \a count items are moved from index \a from + to index \a to. + */ - \value IconRole -*/ +/*! \fn void QListModelInterface::itemsChanged(int index, int count, const QList<int> &roles) + Emit this signal when \a count items at \a index have had their + \a roles changed. + */ QT_END_NAMESPACE diff --git a/src/declarative/3rdparty/qlistmodelinterface.h b/src/declarative/3rdparty/qlistmodelinterface.h index 191a95b..19284ca 100644 --- a/src/declarative/3rdparty/qlistmodelinterface.h +++ b/src/declarative/3rdparty/qlistmodelinterface.h @@ -61,8 +61,8 @@ class Q_DECLARATIVE_EXPORT QListModelInterface : public QObject virtual ~QListModelInterface() {} virtual int count() const = 0; - virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const = 0; - virtual bool setData(int index, const QHash<int,QVariant> &values) + virtual QHash<int,QVariant> data(int index, const QList<int>& roles = QList<int>()) const = 0; + virtual bool setData(int index, const QHash<int,QVariant>& values) { Q_UNUSED(index); Q_UNUSED(values); return false; } virtual QList<int> roles() const = 0; diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp index 9645e77..472b98b 100644 --- a/src/declarative/fx/qfxcomponentinstance.cpp +++ b/src/declarative/fx/qfxcomponentinstance.cpp @@ -58,7 +58,7 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance); /*! \qmlclass ComponentInstance QFxComponentInstance - \brief The ComponentInstance item allows you to instantiate a \l{qml-component.html} {Component}. + \brief The ComponentInstance item allows you to instantiate a \l{Component}. \qml Item { diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index 9e6f2c9..5156d06 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -689,10 +689,10 @@ QFxGridView::~QFxGridView() \qmlproperty model GridView::model This property holds the model providing data for the grid. - The model provides a set of data that is used to create the items for the view. - For large or dynamic datasets the model is usually provided by a C++ model object. - The C++ model object must be a \l QAbstractItemModel subclass, a \l VisualModel, - or a simple list. + The model provides a set of data that is used to create the items + for the view. For large or dynamic datasets the model is usually + provided by a C++ model object. The C++ model object must be a \l + {QAbstractItemModel} subclass, a VisualModel, or a simple list. */ QVariant QFxGridView::model() const { diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index e1ac2c7..dfd6915 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -185,7 +185,7 @@ void QFxImage::setPixmap(const QPixmap &pix) Each scale grid property (left, right, top, and bottom) specifies an offset from the respective side. For example, \c scaleGrid.bottom="10" sets the bottom scale grid line 10 pixels up from the bottom of the image. A scale grid can also be specified using a - \l {Image::src}{.sci file}. + \l {Image::source}{.sci file}. */ QFxScaleGrid *QFxImage::scaleGrid() { diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index bb71a91..fcd6e1f 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -858,12 +858,12 @@ QFxListView::~QFxListView() \qmlproperty model ListView::model This property holds the model providing data for the list. - The model provides a set of data that is used to create the items for the view. - For large or dynamic datasets the model is usually provided by a C++ model object. - The C++ model object must be a \l QAbstractItemModel subclass, a \l VisualModel, - or a simple list. + The model provides a set of data that is used to create the items + for the view. For large or dynamic datasets the model is usually + provided by a C++ model object. The C++ model object must be a \l + {QAbstractItemModel} subclass, a VisualModel, or a simple list. - Models can also be created directly in QML, using a \l ListModel. + Models can also be created directly in QML, using a \l{ListModel}. */ QVariant QFxListView::model() const { diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index d66266f..48e8244 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -544,14 +544,14 @@ case $rule_number: { } break; ./ -UiArrayMemberList: UiArrayObjectMember ; +UiArrayMemberList: UiObjectDefinition ; /. case $rule_number: { sym(1).Node = makeAstNode<AST::UiObjectMemberList> (driver->nodePool(), sym(1).UiObjectMember); } break; ./ -UiArrayMemberList: UiArrayMemberList T_COMMA UiArrayObjectMember ; +UiArrayMemberList: UiArrayMemberList T_COMMA UiObjectDefinition ; /. case $rule_number: { AST::UiObjectMemberList *node = makeAstNode<AST:: UiObjectMemberList> (driver->nodePool(), @@ -580,8 +580,6 @@ case $rule_number: { } break; ./ -UiArrayObjectMember: UiQualifiedId T_COLON T_IDENTIFIER UiObjectInitializer ; -/. case $rule_number: ./ UiObjectMember: UiQualifiedId T_COLON T_IDENTIFIER UiObjectInitializer ; /. case $rule_number: { @@ -603,11 +601,8 @@ case $rule_number: { } break; ./ -UiArrayObjectMember: UiObjectDefinition ; UiObjectMember: UiObjectDefinition ; -UiArrayObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ; -/. case $rule_number: ./ UiObjectMember: UiQualifiedId T_COLON T_LBRACKET UiArrayMemberList T_RBRACKET ; /. case $rule_number: { @@ -641,8 +636,6 @@ case $rule_number: { UiObjectMember: UiQualifiedId T_COLON UiMultilineStringStatement ; /. case $rule_number: ./ -UiArrayObjectMember: UiQualifiedId T_COLON Statement ; -/. case $rule_number: ./ UiObjectMember: UiQualifiedId T_COLON Statement ; /. case $rule_number: { @@ -679,18 +672,21 @@ case $rule_number: { } break; ./ -UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER ; +UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_AUTOMATIC_SEMICOLON ; +UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_SEMICOLON ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval); node->propertyToken = loc(1); node->typeToken = loc(2); node->identifierToken = loc(3); + node->semicolonToken = loc(4); sym(1).Node = node; } break; ./ -UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER ; +UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER T_AUTOMATIC_SEMICOLON ; +UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER T_SEMICOLON ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval); @@ -699,11 +695,13 @@ case $rule_number: { node->propertyToken = loc(2); node->typeToken = loc(3); node->identifierToken = loc(4); + node->semicolonToken = loc(5); sym(1).Node = node; } break; ./ -UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression ; +UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression T_AUTOMATIC_SEMICOLON ; +UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression T_SEMICOLON ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval, @@ -712,11 +710,13 @@ case $rule_number: { node->typeToken = loc(2); node->identifierToken = loc(3); node->colonToken = loc(4); + node->semicolonToken = loc(6); sym(1).Node = node; } break; ./ -UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression ; +UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression T_AUTOMATIC_SEMICOLON ; +UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression T_SEMICOLON ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval, @@ -727,6 +727,7 @@ case $rule_number: { node->typeToken = loc(3); node->identifierToken = loc(4); node->colonToken = loc(5); + node->semicolonToken = loc(7); sym(1).Node = node; } break; ./ diff --git a/src/declarative/qml/parser/javascriptast_p.h b/src/declarative/qml/parser/javascriptast_p.h index ad317e8..cd47e42 100644 --- a/src/declarative/qml/parser/javascriptast_p.h +++ b/src/declarative/qml/parser/javascriptast_p.h @@ -2345,15 +2345,7 @@ public: virtual SourceLocation lastSourceLocation() const { - if (expression) - return expression->lastSourceLocation(); - else if (colonToken.isValid()) - return colonToken; - else if (identifierToken.isValid()) - return identifierToken; - else if (typeToken.isValid()) - return typeToken; - return propertyToken; + return semicolonToken; } virtual void accept0(Visitor *visitor); @@ -2369,6 +2361,7 @@ public: SourceLocation typeToken; SourceLocation identifierToken; SourceLocation colonToken; + SourceLocation semicolonToken; }; class UiObjectDefinition: public UiObjectMember diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index cb98c36..abe3f1c 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -56,43 +56,43 @@ const char *const JavaScriptGrammar::spell [] = { const int JavaScriptGrammar::lhs [] = { 91, 92, 92, 95, 95, 96, 96, 94, 93, 98, - 98, 100, 100, 102, 102, 101, 99, 97, 101, 99, - 101, 99, 104, 105, 105, 99, 101, 99, 107, 107, - 107, 99, 99, 99, 99, 99, 99, 99, 103, 103, - 111, 111, 111, 103, 103, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, - 114, 114, 118, 118, 113, 113, 116, 116, 119, 119, - 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 121, 121, 122, 122, 122, - 122, 122, 125, 125, 126, 126, 126, 126, 124, 124, - 127, 127, 128, 128, 129, 129, 129, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 131, 131, 131, - 131, 132, 132, 132, 133, 133, 133, 133, 134, 134, - 134, 134, 134, 134, 134, 135, 135, 135, 135, 135, - 135, 136, 136, 136, 136, 136, 137, 137, 137, 137, - 137, 138, 138, 139, 139, 140, 140, 141, 141, 142, - 142, 143, 143, 144, 144, 145, 145, 146, 146, 147, - 147, 148, 148, 149, 149, 117, 117, 150, 150, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 108, 108, 152, 152, 153, 153, 154, 154, 106, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 106, 155, 170, 170, 169, 169, 110, - 110, 171, 171, 172, 172, 174, 174, 173, 175, 178, - 176, 176, 179, 177, 177, 156, 157, 157, 158, 158, - 159, 159, 159, 159, 159, 159, 159, 160, 160, 160, - 160, 161, 161, 161, 161, 162, 162, 163, 165, 180, - 180, 183, 183, 181, 181, 184, 182, 164, 164, 164, - 166, 166, 167, 167, 167, 185, 186, 168, 168, 109, - 123, 190, 190, 187, 187, 188, 188, 191, 192, 192, - 193, 193, 189, 189, 115, 115, 194}; + 98, 100, 100, 101, 101, 99, 97, 99, 99, 103, + 104, 104, 99, 99, 106, 106, 106, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 102, 102, + 110, 110, 110, 102, 102, 111, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 113, 113, 117, 117, 112, 112, 115, 115, 118, 118, + 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, + 119, 119, 119, 119, 119, 120, 120, 121, 121, 121, + 121, 121, 124, 124, 125, 125, 125, 125, 123, 123, + 126, 126, 127, 127, 128, 128, 128, 129, 129, 129, + 129, 129, 129, 129, 129, 129, 129, 130, 130, 130, + 130, 131, 131, 131, 132, 132, 132, 132, 133, 133, + 133, 133, 133, 133, 133, 134, 134, 134, 134, 134, + 134, 135, 135, 135, 135, 135, 136, 136, 136, 136, + 136, 137, 137, 138, 138, 139, 139, 140, 140, 141, + 141, 142, 142, 143, 143, 144, 144, 145, 145, 146, + 146, 147, 147, 148, 148, 116, 116, 149, 149, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 107, 107, 151, 151, 152, 152, 153, 153, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 154, 169, 169, 168, 168, 109, + 109, 170, 170, 171, 171, 173, 173, 172, 174, 177, + 175, 175, 178, 176, 176, 155, 156, 156, 157, 157, + 158, 158, 158, 158, 158, 158, 158, 159, 159, 159, + 159, 160, 160, 160, 160, 161, 161, 162, 164, 179, + 179, 182, 182, 180, 180, 183, 181, 163, 163, 163, + 165, 165, 166, 166, 166, 184, 185, 167, 167, 108, + 122, 189, 189, 186, 186, 187, 187, 190, 191, 191, + 192, 192, 188, 188, 114, 114, 193}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 1, - 2, 1, 3, 2, 3, 4, 4, 2, 1, 1, - 5, 5, 1, 2, 2, 3, 3, 3, 1, 1, - 1, 2, 3, 4, 5, 6, 1, 1, 1, 1, + 2, 1, 3, 2, 3, 4, 2, 1, 5, 1, + 2, 2, 3, 3, 1, 1, 1, 2, 4, 4, + 5, 5, 6, 6, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 3, 4, 3, 2, 4, 1, 2, 0, 1, 3, 5, 1, 1, @@ -124,637 +124,609 @@ const int JavaScriptGrammar:: rhs[] = { const int JavaScriptGrammar::action_default [] = { 8, 2, 0, 4, 3, 0, 0, 0, 6, 7, - 5, 0, 9, 1, 0, 18, 37, 44, 242, 0, - 0, 41, 42, 14, 39, 40, 43, 243, 20, 10, - 0, 0, 0, 38, 0, 31, 30, 29, 0, 34, - 0, 145, 212, 176, 184, 180, 124, 196, 172, 36, - 109, 47, 125, 188, 192, 113, 142, 123, 128, 108, - 162, 149, 0, 53, 54, 50, 313, 41, 315, 65, - 0, 0, 0, 0, 0, 48, 51, 0, 0, 42, - 43, 52, 46, 0, 49, 0, 0, 138, 0, 0, - 125, 144, 127, 126, 0, 0, 0, 140, 141, 139, - 143, 0, 173, 0, 0, 0, 0, 163, 0, 0, - 0, 0, 0, 0, 153, 0, 0, 0, 147, 148, - 146, 151, 155, 154, 152, 150, 165, 164, 166, 0, - 181, 0, 177, 0, 0, 119, 106, 118, 107, 75, - 76, 77, 102, 78, 103, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 104, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 105, - 0, 0, 117, 213, 120, 0, 121, 0, 122, 116, - 0, 209, 202, 200, 207, 208, 206, 205, 211, 204, - 203, 201, 210, 197, 0, 185, 0, 0, 189, 0, - 0, 193, 0, 0, 119, 111, 0, 110, 0, 115, - 129, 0, 314, 304, 305, 0, 302, 0, 303, 0, - 306, 220, 227, 226, 234, 222, 0, 223, 307, 0, - 312, 224, 225, 230, 228, 309, 308, 311, 231, 0, - 0, 0, 0, 0, 313, 41, 0, 315, 42, 214, - 256, 43, 0, 0, 0, 0, 0, 232, 233, 221, - 229, 257, 258, 301, 310, 0, 272, 273, 274, 275, - 0, 268, 269, 270, 271, 298, 299, 0, 0, 0, - 0, 0, 261, 262, 218, 216, 178, 186, 182, 198, - 174, 219, 0, 125, 190, 194, 167, 156, 0, 0, - 175, 0, 0, 0, 0, 168, 0, 0, 0, 0, - 0, 160, 158, 161, 159, 157, 170, 169, 171, 0, - 183, 0, 179, 0, 217, 125, 0, 199, 214, 215, - 0, 214, 0, 0, 264, 0, 0, 0, 266, 0, - 187, 0, 0, 191, 0, 0, 195, 254, 0, 246, - 255, 249, 0, 253, 0, 214, 247, 0, 214, 0, - 0, 265, 0, 0, 0, 267, 314, 304, 0, 0, - 306, 0, 300, 0, 290, 0, 0, 0, 260, 0, - 259, 0, 316, 0, 74, 236, 239, 0, 75, 242, - 78, 103, 80, 81, 50, 85, 86, 41, 87, 90, - 48, 51, 42, 214, 43, 52, 93, 46, 95, 49, - 97, 98, 243, 100, 101, 105, 0, 67, 0, 0, - 69, 73, 71, 59, 70, 72, 0, 68, 58, 237, - 235, 113, 114, 119, 0, 112, 0, 289, 0, 276, - 277, 0, 288, 0, 0, 0, 279, 284, 282, 285, - 0, 0, 283, 284, 0, 280, 0, 281, 238, 287, - 0, 238, 286, 0, 291, 292, 0, 238, 293, 294, - 0, 0, 295, 0, 0, 0, 296, 297, 131, 130, - 0, 0, 0, 263, 0, 0, 0, 278, 0, 66, - 0, 63, 65, 56, 0, 62, 57, 64, 61, 55, - 0, 60, 135, 133, 137, 134, 132, 136, 0, 0, - 33, 0, 35, 32, 15, 11, 0, 0, 28, 41, - 65, 23, 0, 26, 17, 0, 12, 19, 0, 0, - 22, 13, 0, 27, 41, 65, 16, 0, 21, 24, - 25, 45, 251, 244, 0, 252, 248, 0, 250, 240, - 0, 241, 245, 317}; + 5, 0, 9, 1, 0, 17, 37, 44, 242, 0, + 0, 41, 42, 14, 39, 40, 43, 243, 18, 10, + 0, 0, 0, 38, 0, 27, 26, 25, 0, 0, + 31, 0, 32, 145, 212, 176, 184, 180, 124, 196, + 172, 0, 109, 47, 125, 188, 192, 113, 142, 123, + 128, 108, 162, 149, 0, 53, 54, 50, 313, 41, + 315, 65, 0, 0, 0, 0, 0, 48, 51, 0, + 0, 42, 43, 52, 46, 0, 49, 0, 0, 138, + 0, 0, 125, 144, 127, 126, 0, 0, 0, 140, + 141, 139, 143, 0, 173, 0, 0, 0, 0, 163, + 0, 0, 0, 0, 0, 0, 153, 0, 0, 0, + 147, 148, 146, 151, 155, 154, 152, 150, 165, 164, + 166, 0, 181, 0, 177, 0, 0, 119, 106, 118, + 107, 75, 76, 77, 102, 78, 103, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 104, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 105, 0, 0, 117, 213, 120, 0, 121, 0, + 122, 116, 35, 36, 0, 209, 202, 200, 207, 208, + 206, 205, 211, 204, 203, 201, 210, 197, 0, 185, + 0, 0, 189, 0, 0, 193, 0, 0, 119, 111, + 0, 110, 0, 115, 129, 0, 314, 304, 305, 0, + 302, 0, 303, 0, 306, 220, 227, 226, 234, 222, + 0, 223, 307, 0, 312, 224, 225, 230, 228, 309, + 308, 311, 231, 0, 0, 0, 0, 0, 313, 41, + 0, 315, 42, 214, 256, 43, 0, 0, 0, 0, + 0, 232, 233, 221, 229, 257, 258, 301, 310, 0, + 272, 273, 274, 275, 0, 268, 269, 270, 271, 298, + 299, 0, 0, 0, 0, 0, 261, 262, 218, 216, + 178, 186, 182, 198, 174, 219, 0, 125, 190, 194, + 167, 156, 0, 0, 175, 0, 0, 0, 0, 168, + 0, 0, 0, 0, 0, 160, 158, 161, 159, 157, + 170, 169, 171, 0, 183, 0, 179, 0, 217, 125, + 0, 199, 214, 215, 0, 214, 0, 0, 264, 0, + 0, 0, 266, 0, 187, 0, 0, 191, 0, 0, + 195, 254, 0, 246, 255, 249, 0, 253, 0, 214, + 247, 0, 214, 0, 0, 265, 0, 0, 0, 267, + 314, 304, 0, 0, 306, 0, 300, 0, 290, 0, + 0, 0, 260, 0, 259, 0, 316, 0, 74, 236, + 239, 0, 75, 242, 78, 103, 80, 81, 50, 85, + 86, 41, 87, 90, 48, 51, 42, 214, 43, 52, + 93, 46, 95, 49, 97, 98, 243, 100, 101, 105, + 0, 67, 0, 0, 69, 73, 71, 59, 70, 72, + 0, 68, 58, 237, 235, 113, 114, 119, 0, 112, + 0, 289, 0, 276, 277, 0, 288, 0, 0, 0, + 279, 284, 282, 285, 0, 0, 283, 284, 0, 280, + 0, 281, 238, 287, 0, 238, 286, 0, 291, 292, + 0, 238, 293, 294, 0, 0, 295, 0, 0, 0, + 296, 297, 131, 130, 0, 0, 0, 263, 0, 0, + 0, 278, 0, 66, 0, 63, 65, 56, 0, 62, + 57, 64, 61, 55, 0, 60, 135, 133, 137, 134, + 132, 136, 0, 0, 0, 29, 0, 30, 0, 33, + 34, 28, 15, 11, 0, 0, 24, 41, 65, 20, + 0, 23, 16, 0, 12, 0, 19, 13, 21, 22, + 45, 251, 244, 0, 252, 248, 0, 250, 240, 0, + 241, 245, 317}; const int JavaScriptGrammar::goto_default [] = { - 6, 5, 13, 1, 4, 3, 527, 30, 29, 525, - 526, 15, 528, 522, 523, 385, 509, 226, 230, 259, - 51, 59, 490, 488, 383, 382, 42, 489, 381, 384, - 137, 55, 50, 175, 57, 46, 174, 52, 58, 87, - 56, 41, 61, 60, 296, 48, 290, 43, 286, 45, - 288, 44, 287, 53, 294, 54, 295, 47, 289, 285, - 326, 438, 291, 292, 221, 225, 227, 231, 232, 223, - 222, 234, 260, 233, 238, 257, 258, 224, 387, 386, - 32, 544, 543, 348, 349, 546, 351, 545, 350, 446, - 450, 453, 449, 448, 468, 469, 215, 229, 211, 214, - 228, 236, 235, 0}; + 6, 5, 13, 1, 4, 3, 28, 30, 29, 533, + 15, 31, 530, 531, 389, 513, 230, 234, 263, 53, + 61, 494, 492, 387, 386, 44, 493, 385, 388, 139, + 57, 52, 177, 59, 48, 176, 54, 60, 89, 58, + 43, 63, 62, 300, 50, 294, 45, 290, 47, 292, + 46, 291, 55, 298, 56, 299, 49, 293, 289, 330, + 442, 295, 296, 225, 229, 231, 235, 236, 227, 226, + 238, 264, 237, 242, 261, 262, 228, 391, 390, 32, + 543, 542, 352, 353, 545, 355, 544, 354, 450, 454, + 457, 453, 452, 472, 473, 219, 233, 215, 218, 232, + 240, 239, 0}; const int JavaScriptGrammar::action_index [] = { - -27, -91, 56, -91, -22, 60, 62, 109, -91, -91, - -91, 54, -91, -91, 438, -91, -91, -91, -91, 49, - 220, 53, 172, -91, -91, -91, 50, -91, -91, -91, - 415, 84, 207, -91, 226, -91, -91, -91, 61, 63, - 725, 80, -91, 68, 69, 59, 217, -91, 342, 74, - -91, -91, 566, 66, 72, 144, 140, -91, -91, -91, - 395, 160, 725, -91, -91, -91, 176, -91, 1223, 64, - 725, 725, 725, 645, 725, -91, -91, 725, 725, -91, - -91, -91, -91, 725, -91, 725, 725, -91, 725, 725, - 107, 178, -91, -91, 725, 725, 725, -91, -91, -91, - 187, 725, 342, 725, 725, 725, 725, 385, 725, 725, - 725, 725, 725, 725, 269, 725, 725, 725, 132, 113, - 79, 193, 269, 196, 199, 200, 370, 478, 478, 725, - 59, 725, 73, 1136, 725, 725, -91, -91, -91, -91, + -23, -91, 10, -91, -19, 50, 77, 56, -91, -91, + -91, 67, -91, -91, 383, -91, -91, -91, -91, -4, + 213, 20, 186, -91, -91, -91, -18, -91, -91, -91, + 370, 129, 203, -91, 204, -91, -91, -91, -17, 192, + -91, 693, -91, 87, -91, 42, 9, -20, 191, -91, + 310, 140, -91, -91, 534, 17, 114, 160, 125, -91, + -91, -91, 344, 162, 693, -91, -91, -91, 157, -91, + 1191, 34, 693, 693, 693, 613, 693, -91, -91, 693, + 693, -91, -91, -91, -91, 693, -91, 693, 693, -91, + 693, 693, 119, 227, -91, -91, 693, 693, 693, -91, + -91, -91, 193, 693, 310, 693, 693, 693, 693, 446, + 693, 693, 693, 693, 693, 693, 237, 693, 693, 693, + 88, 106, 107, 237, 237, 166, 237, 237, 354, 372, + 334, 693, -11, 693, 19, 1104, 693, 693, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - 94, 725, -91, -91, 65, 47, -91, 725, -91, -91, - 725, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, 725, 46, 725, 725, 55, 51, - 725, -91, 1136, 725, 725, -91, 95, -91, 38, -91, - -91, 35, -91, 210, 48, 32, -91, 223, -91, 34, - 1484, -91, -91, -91, -91, -91, 240, -91, -91, 33, - -91, -91, -91, -91, -91, -91, 1484, -91, -91, 281, - 266, 71, 1397, 39, 216, 52, 45, 1745, 58, 725, - -91, 57, 44, 725, 43, 41, 42, -91, -91, -91, - -91, -91, -91, -91, -91, 104, -91, -91, -91, -91, - 106, -91, -91, -91, -91, -91, -91, -28, 27, 725, - 117, 100, -91, -91, 805, -91, 83, 70, 67, -91, - 260, 77, -56, 503, 12, 119, 289, 231, 204, 725, - 285, 725, 725, 725, 725, 333, 725, 725, 725, 725, - 725, 181, 157, 169, 177, 269, 410, 339, 317, 725, - -65, 725, 15, 725, -91, 566, 725, -91, 725, 9, - -42, 725, -38, 1397, -91, 725, 116, 1397, -91, 725, - -48, 725, 725, 5, 120, 725, -91, 25, 203, 13, - -91, -91, 725, -91, 218, 725, -91, -1, 725, -8, - 1397, -91, 725, 103, 1397, -91, 19, 225, -19, 4, - 1484, -25, -91, 1397, -91, 725, 97, 1397, 24, 1397, - -91, 26, 31, -23, -91, -91, 1397, -24, 337, 22, - 324, 81, 725, 1397, 40, 10, 252, -3, -33, 645, - 2, 1, -91, 889, -91, 11, -13, 3, 725, 8, - 18, 725, 21, 725, -2, -10, 725, -91, 1310, 29, - -91, -91, -91, -91, -91, -91, 725, -91, -91, -91, - -91, 194, -91, 725, -6, -91, 1397, -91, 78, -91, - -91, 1397, -91, 725, 128, -12, -91, 6, -91, 7, - 91, 725, -91, -4, 36, -91, -53, -91, 1397, -91, - 105, 1397, -91, 130, -91, -91, 108, 1397, 0, -91, - 14, 16, -91, 150, 23, 20, -91, -91, -91, -91, - 725, 121, 1397, -91, 725, 126, 1397, -91, 85, 30, - 1049, -91, 37, -91, 969, -91, -91, -91, -91, -91, - 96, -91, -91, -91, -91, -91, -91, -91, -9, -5, - 28, 725, 17, -91, -91, -91, 1658, 146, -91, 102, - 406, -91, 86, -91, -91, 98, -91, -91, 93, 279, - -91, -91, 1571, -91, 90, 384, -91, 88, -91, -91, - -91, -91, -11, -91, 206, -91, -91, 725, -91, -91, - 232, -91, -91, -91, + -91, -91, 98, 693, -91, -91, 0, -43, -91, 693, + -91, -91, -91, -91, 693, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, -91, -91, 693, 6, + 693, 693, -2, 82, 693, -91, 1104, 693, 693, -91, + 96, -91, 8, -91, -91, 61, -91, 147, 80, 33, + -91, 154, -91, 63, 1452, -91, -91, -91, -91, -91, + 169, -91, -91, 23, -91, -91, -91, -91, -91, -91, + 1452, -91, -91, 285, 287, 68, 1365, 55, 112, 79, + 46, 1626, 66, 693, -91, 65, 47, 693, 52, 58, + 59, -91, -91, -91, -91, -91, -91, -91, -91, 64, + -91, -91, -91, -91, 73, -91, -91, -91, -91, -91, + -91, -5, 45, 693, 137, 81, -91, -91, 1017, -91, + 69, 28, 14, -91, 240, 76, 53, 476, 171, 120, + 308, 237, 180, 693, 264, 693, 693, 693, 693, 298, + 693, 693, 693, 693, 693, 230, 237, 237, 237, 237, + 288, 268, 378, 693, -68, 693, 12, 693, -91, 445, + 693, -91, 693, 7, -47, 693, -44, 1365, -91, 693, + 100, 1365, -91, 693, -25, 693, 693, 22, 15, 693, + -91, -8, 108, -13, -91, -91, 693, -91, 178, 693, + -91, -60, 693, -58, 1365, -91, 693, 99, 1365, -91, + -33, 199, -53, -27, 1452, -26, -91, 1365, -91, 693, + 95, 1365, 32, 1365, -91, 43, 41, 4, -91, -91, + 1365, 5, 232, 54, 275, 70, 693, 1365, 49, 27, + 252, 48, 30, 613, 40, 39, -91, 777, -91, 25, + -1, 26, 693, 24, -3, 693, 21, 693, 1, 2, + 693, -91, 1278, 37, -91, -91, -91, -91, -91, -91, + 693, -91, -91, -91, -91, 156, -91, 693, -21, -91, + 1365, -91, 60, -91, -91, 1365, -91, 693, 102, 3, + -91, 29, -91, 35, 101, 693, -91, 36, 38, -91, + -30, -91, 1365, -91, 94, 1365, -91, 176, -91, -91, + 143, 1365, 44, -91, 16, -6, -91, 207, -9, -29, + -91, -91, -91, -91, 693, 90, 1365, -91, 693, 91, + 1365, -91, 111, 13, 857, -91, 18, -91, 937, -91, + -91, -91, -91, -91, 105, -91, -91, -91, -91, -91, + -91, -91, -33, -24, 215, -91, 693, -91, 187, -91, + -91, -91, -91, -91, 1539, 174, -91, 133, 104, -91, + 62, -91, -91, 97, -91, 51, -91, -91, -91, -91, + -91, 57, -91, 173, -91, -91, 693, -91, -91, 151, + -91, -91, -91, - -104, -104, -104, -104, -3, 5, -104, -104, -104, -104, - -104, -104, -104, -104, 241, -104, -104, -104, -104, -104, - 4, -104, -104, -104, -104, -104, -104, -104, -104, -104, - 246, -104, 2, -104, 3, -104, -104, -104, -104, -104, - 15, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -45, -104, -104, -104, -104, -104, -104, -104, - -104, -104, 104, -104, -104, -104, -6, -104, -104, -104, - -14, 124, 119, 97, 113, -104, -104, 108, 112, -104, - -104, -104, -104, 127, -104, 120, 116, -104, 96, 85, - -104, -104, -104, -104, 128, 109, 105, -104, -104, -104, - -104, 89, -104, 146, 158, 143, 84, -104, 142, 136, - 135, 154, 145, 76, -104, 71, 134, 42, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, 70, - -104, 73, -104, 80, 37, 31, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, 34, -104, -104, -104, -104, -104, 27, -104, -104, - -18, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, 123, -104, 132, 22, -104, -104, - 24, -104, 180, 23, 90, -104, -104, -104, -104, -104, - -104, -104, -104, 7, -104, -104, -104, -2, -104, -104, - 26, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, 74, -104, -104, -8, - 19, -104, 28, -104, 1, -104, -104, -104, -104, 8, - -104, -104, -104, 17, -41, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, 67, - -104, -104, -104, -104, 93, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, 32, 202, - -104, 198, 188, 192, 189, -104, 151, 201, 45, 60, - 69, -104, -104, -104, -104, -104, -104, -104, -104, 169, - -104, 176, -104, 204, -104, -104, 268, -104, 77, -104, - -104, 68, -104, 55, -104, 57, -104, 56, -104, 170, - -104, 160, 161, -104, -104, 162, -104, -104, -104, -104, - -104, -104, 186, -104, 53, 78, -104, -104, 79, -104, - 62, -104, 51, -104, 50, -104, -104, 94, -104, -104, - 65, -104, -104, 48, -104, 49, -104, 47, -104, 44, - -104, -104, -104, -104, -104, -104, 43, -104, 36, -104, - 41, -104, 66, 63, -104, -104, 52, -104, -104, 59, - -104, -104, -104, 64, -104, -104, -104, -104, 30, -104, - -29, 131, -104, 155, -104, -104, 38, -104, 39, -104, - -104, -104, -104, -104, -104, -104, 29, -104, -104, -104, - -104, -104, -104, 91, -104, -104, 61, -104, -104, -104, - -104, 54, -104, 58, -104, -104, -104, -104, -104, -57, - -104, -11, -104, -83, -104, -104, -104, -104, -73, -104, - -104, -68, -104, -104, -104, -104, -104, -104, -86, -104, - -104, -60, -104, -20, -104, -63, -104, -104, -104, -104, - 0, -104, 18, -104, 21, -104, 16, -104, -104, -104, - 11, -104, 20, -104, 25, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -1, -104, -104, -104, -104, 13, 10, -104, 9, - 6, -104, -104, -104, -104, -104, -104, -104, -104, 81, - -104, -104, 14, -104, 33, 95, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -13, -104, -104, - 72, -104, -104, -104}; + -103, -103, -103, -103, 15, 16, -103, -103, -103, -103, + -103, -103, -103, -103, 208, -103, -103, -103, -103, -103, + -1, -103, -103, -103, -103, -103, -103, -103, -103, -103, + 237, -103, 26, -103, 31, -103, -103, -103, -103, -103, + -103, 28, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -46, -103, -103, -103, -103, -103, + -103, -103, -103, -103, 98, -103, -103, -103, 7, -103, + -103, -103, -10, 118, 111, 67, 112, -103, -103, 119, + 123, -103, -103, -103, -103, 124, -103, 115, 97, -103, + 32, 106, -103, -103, -103, -103, 128, 171, 101, -103, + -103, -103, -103, 156, -103, 157, 159, 81, 131, -103, + 127, 136, 145, 139, 102, 91, -103, 59, 50, 72, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, 70, -103, 80, -103, 85, 61, 51, -103, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, 54, -103, -103, -103, -103, -103, -24, + -103, -103, -103, -103, -23, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, -103, -103, 134, -103, + 138, 17, -103, -103, 23, -103, 255, -4, 73, -103, + -103, -103, -103, -103, -103, -103, -103, 11, -103, -103, + -103, 8, -103, -103, 9, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + 77, -103, -103, 10, 2, -103, 5, -103, -3, -103, + -103, -103, -103, 19, -103, -103, -103, 27, -31, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -5, -103, -103, -103, -103, 105, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, 34, 205, -103, 193, 169, 181, 201, -103, + 147, 66, 78, 79, 89, -103, -103, -103, -103, -103, + -103, -103, -103, 202, -103, 192, -103, 212, -103, -103, + 182, -103, 68, -103, -103, 62, -103, 56, -103, 33, + -103, 55, -103, 170, -103, 161, 162, -103, -103, 172, + -103, -103, -103, -103, -103, -103, 211, -103, 69, 71, + -103, -103, 64, -103, 60, -103, 41, -103, 42, -103, + -103, 74, -103, -103, 75, -103, -103, 38, -103, 35, + -103, 36, -103, 44, -103, -103, -103, -103, -103, -103, + 52, -103, 45, -103, 43, -103, 65, 46, -103, -103, + 40, -103, -103, 146, -103, -103, -103, 49, -103, -103, + -103, -103, 47, -103, -22, 149, -103, 153, -103, -103, + 30, -103, 48, -103, -103, -103, -103, -103, -103, -103, + 29, -103, -103, -103, -103, -103, -103, 133, -103, -103, + 53, -103, -103, -103, -103, 58, -103, 57, -103, -103, + -103, -103, -103, -56, -103, -6, -103, -82, -103, -103, + -103, -103, -77, -103, -103, -68, -103, -103, -103, -103, + -103, -103, -90, -103, -103, -58, -103, -11, -103, -60, + -103, -103, -103, -103, 21, -103, 25, -103, 22, -103, + 20, -103, -103, -103, 6, -103, 12, -103, 3, -103, + -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, 24, -103, -103, -103, + -103, -103, -103, -103, 1, -2, -103, 4, 104, -103, + -103, -103, -103, -103, -103, 18, -103, -103, -103, -103, + -103, -103, -103, -103, -103, -103, 0, -103, -103, 63, + -103, -103, -103}; const int JavaScriptGrammar::action_info [] = { - 319, 451, 457, 375, -69, 328, 547, 339, -73, -91, - -94, 451, 451, 321, 339, -96, 299, 171, -72, 331, - 471, 447, 333, 443, 510, 171, 484, 367, -99, -102, - 372, 430, 428, 416, 480, 511, 426, 370, 497, 418, - 379, 369, 352, 458, 362, 491, 284, -83, 278, 467, - 473, 467, 360, 467, 435, 367, 217, 194, 200, 373, - 358, 2, 553, 279, 441, 436, 2, 220, 194, 101, - 40, 213, 491, 177, 101, 284, 467, 480, 484, 513, - 443, 375, 171, 475, 299, 323, 14, 14, 263, 11, - 39, 516, 219, 492, 129, 0, 529, 373, 209, 517, - 532, 454, 171, 171, 171, 171, 529, 179, 517, 373, - 0, 171, 461, 171, 470, 34, 0, 129, 319, 88, - 88, 7, 196, 14, 171, 171, 197, 345, 471, 171, - 89, 89, 276, 275, 171, 14, 171, 131, 171, 440, - 439, 493, 276, 275, 538, 321, 455, 540, 539, 92, - 172, 207, 94, 88, 530, 0, 501, 377, 0, 202, - 93, 283, 282, 364, 89, 269, 268, 274, 273, 341, - 9, 8, 88, 342, 0, 67, 337, 281, 203, 67, - 204, 482, 115, 89, 116, 115, 486, 116, 445, 0, - 94, 465, 464, 0, 115, 117, 116, 95, 117, 94, - 0, 35, 115, 96, 116, 67, 115, 117, 116, 202, - 0, 354, 79, 80, 550, 117, 79, 80, 115, 117, - 116, 115, 0, 116, 115, 115, 116, 116, 203, 0, - 433, 117, 133, 67, 117, 95, 67, 117, 117, 67, - 0, 96, 79, 80, 95, 67, 37, 67, 171, 67, - 96, 134, 67, 135, 67, 35, 115, 36, 116, 0, - 0, 67, 0, 0, 355, 0, 0, 551, 549, 117, - 79, 80, 0, 79, 80, 0, 79, 80, 301, 302, - 0, 67, 79, 80, 79, 80, 79, 80, -313, 79, - 80, 79, 80, 0, 115, 67, 116, 0, 79, 80, - 37, 262, 261, 301, 302, 303, 304, 117, 21, 0, - 67, 36, 306, 307, 0, 0, 0, 0, 79, 80, - 0, 308, 0, 0, 309, 0, 310, 272, 271, 0, - 303, 304, 79, 80, 0, 0, 0, 0, 25, 0, - 306, 307, 267, 266, 0, 79, 80, 79, 80, 308, - 0, 0, 309, 67, 310, 0, 306, 307, 0, 0, - 103, 104, 306, 307, 24, 308, 67, 0, 309, 0, - 310, 308, 0, 0, 309, 0, 310, 0, 0, 0, - 0, 0, 0, 0, 0, 272, 271, 105, 106, 0, - 79, 80, 491, 108, 109, 0, 0, 0, 267, 266, - 0, 110, 111, 79, 80, 112, 0, 113, 108, 109, - 0, 0, 0, 21, 491, 0, 110, 111, 108, 109, - 112, 0, 113, 0, 0, 19, 110, 111, 0, 0, - 112, 0, 113, 306, 307, 21, 0, 20, 0, 0, - 0, 0, 308, 25, 21, 309, 0, 310, 19, 0, - 79, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 20, 0, 0, 0, 0, 25, 0, 21, 0, 24, - 514, 0, 79, 80, 25, 0, 0, 0, 0, 0, - 0, 22, 26, 0, 0, 0, 0, 0, 0, 27, - 0, 24, 0, 23, 0, 0, 0, 25, 18, 0, - 24, 108, 109, 0, 22, 26, 181, 0, 0, 110, - 111, 0, 27, 112, 0, 113, 182, 0, 0, 0, - 183, 18, 0, 24, 0, 0, 0, 0, 0, 184, - 0, 185, 0, 0, 335, 0, 0, 0, 0, 0, - 0, 0, 186, 0, 187, 92, 0, 0, 0, 0, - 0, 0, 188, 0, 0, 189, 93, 0, 0, 0, - 0, 190, 0, 0, 0, 0, 0, 191, 0, 181, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, - 0, 0, 192, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 186, 0, 187, 92, 0, - 0, 0, 0, 0, 0, 188, 0, 0, 189, 93, - 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, - 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, - 0, 0, 0, 0, 67, 0, 0, 0, 68, 69, - 0, 70, 0, 0, 0, 0, 0, 0, 73, 0, - 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, + 198, 362, 364, 371, 471, 514, 374, 373, 179, 356, + 325, 521, 39, 303, 335, 173, 337, 181, 366, 198, + 103, 501, 349, 323, 343, 461, 495, 471, -99, 376, + 471, -96, -72, -94, 455, 447, 451, 484, 488, 439, + 455, 455, 495, 103, 430, 462, -73, -91, 383, 422, + 420, 479, 477, 14, 131, -69, -83, 131, 133, 432, + 434, -102, 34, 288, 475, 2, 379, 133, 213, 2, + 303, 282, 445, 440, 546, 7, 323, 552, 267, 11, + 11, 283, 379, 447, 327, 471, 377, 0, 221, 204, + 0, 288, 325, 223, 484, 488, 224, 217, 173, 173, + 14, 465, 173, 173, 173, 535, 173, 173, 173, 0, + 173, 458, 495, 173, 332, 0, 358, 9, 8, 496, + 0, 444, 443, 539, 538, 273, 272, 90, 90, 280, + 279, 280, 279, 11, 278, 277, 524, 96, 91, 91, + 377, 69, 287, 286, 525, 173, 90, 90, 173, 474, + 486, 490, 211, 536, 174, 381, 459, 91, 91, 368, + 341, 94, 449, 475, 200, 505, 14, 497, 201, 359, + 345, 206, 95, 343, 346, 206, 69, 173, 81, 82, + 69, 549, 97, 69, 173, 0, 69, 117, 98, 118, + 207, 117, 437, 118, 207, 173, 208, 285, 0, 41, + 119, 183, 182, 69, 119, 96, 135, 69, 0, 69, + 0, 0, 0, 81, 82, 35, 0, 81, 82, 0, + 81, 82, 516, 81, 82, 136, 0, 137, 69, 0, + 266, 265, 69, 35, 550, 548, 69, 469, 468, 96, + 81, 82, 69, 0, 81, 82, 81, 82, 520, 519, + 97, 0, 0, 42, 40, 117, 98, 118, 305, 306, + 37, 69, 117, 0, 118, 81, 82, 0, 119, 81, + 82, 36, 0, 81, 82, 119, 517, 515, 37, 81, + 82, 69, 305, 306, 97, 307, 308, 0, -313, 36, + 98, 310, 311, 271, 270, 0, 0, 0, 81, 82, + 312, 0, 0, 313, 69, 314, 0, 0, 0, 307, + 308, 310, 311, 0, 69, 0, 69, 0, 81, 82, + 312, 310, 311, 313, 0, 314, 0, 0, 105, 106, + 312, 310, 311, 313, 0, 314, 276, 275, 0, 0, + 312, 81, 82, 313, 0, 314, 271, 270, 276, 275, + 0, 81, 82, 81, 82, 107, 108, 110, 111, 0, + 0, 0, 0, 0, 0, 112, 113, 110, 111, 114, + 0, 115, 0, 0, 0, 112, 113, 110, 111, 114, + 19, 115, 0, 0, 0, 112, 113, 0, 0, 114, + 0, 115, 20, 19, 0, 110, 111, 0, 0, 21, + 0, 310, 311, 112, 113, 20, 0, 114, 0, 115, + 312, 0, 21, 313, 0, 314, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 522, 0, 0, 0, 25, + 0, 0, 0, 0, 0, 0, 22, 26, 23, 0, + 0, 0, 25, 0, 27, 0, 0, 0, 185, 22, + 26, 0, 0, 18, 0, 24, 0, 27, 186, 0, + 0, 0, 187, 0, 0, 0, 18, 0, 24, 110, + 111, 188, 0, 189, 0, 0, 0, 112, 113, 185, + 0, 114, 0, 115, 190, 0, 191, 94, 0, 186, + 0, 0, 0, 187, 192, 0, 0, 193, 95, 0, + 0, 0, 188, 194, 189, 0, 0, 339, 0, 195, + 0, 0, 0, 0, 0, 190, 0, 191, 94, 0, + 0, 0, 0, 0, 196, 192, 0, 0, 193, 95, + 0, 0, 0, 0, 194, 0, 0, 185, 0, 0, + 195, 0, 0, 0, 0, 0, 0, 186, 0, 0, + 0, 187, 0, 0, 0, 196, 0, 0, 0, 0, + 188, 0, 189, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 190, 0, 191, 94, 0, 0, 0, + 0, 0, 0, 192, 0, 0, 193, 95, 0, 0, + 0, 0, 194, 0, 0, 0, 0, 0, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 81, 79, 80, 0, 82, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 75, 84, 65, 0, 0, - 0, 0, 0, 0, 0, 0, 62, 63, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, - 0, 0, 0, 0, 67, 0, 0, 0, 68, 69, - 0, 70, 0, 0, 0, 71, 0, 72, 73, 74, - 0, 0, 76, 0, 0, 0, 77, 0, 78, 0, + 0, 0, 0, 196, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 65, 66, 0, 0, 0, + 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, + 0, 0, 69, 0, 0, 0, 70, 71, 0, 72, + 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, + 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 81, + 82, 0, 84, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 77, 86, 67, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 65, 66, 0, 0, 0, + 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, + 0, 0, 69, 0, 0, 0, 70, 71, 0, 72, + 0, 0, 0, 73, 0, 74, 75, 76, 0, 0, + 78, 0, 0, 0, 79, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 81, + 82, 0, 84, 0, 85, 0, 87, 0, 88, 0, + 0, 0, 0, 77, 86, 67, 0, 0, 0, 0, + 0, 0, 0, 0, -92, 0, 0, 0, 64, 65, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, + 70, 71, 0, 72, 0, 0, 0, 73, 0, 74, + 75, 76, 0, 0, 78, 0, 0, 0, 79, 0, + 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 83, 81, 82, 0, 84, 0, 85, 0, + 87, 0, 88, 0, 0, 0, 0, 77, 86, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, + 70, 71, 0, 72, 0, 0, 0, 73, 0, 74, + 75, 76, 0, 0, 78, 0, 0, 0, 79, 0, + 80, 0, 0, 503, 0, 0, 0, 0, 0, 0, + 0, 0, 83, 81, 82, 0, 84, 0, 85, 0, + 87, 0, 88, 0, 0, 0, 0, 77, 86, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, + 70, 71, 0, 72, 0, 0, 0, 73, 0, 74, + 75, 76, 0, 0, 78, 0, 0, 0, 79, 0, + 80, 0, 0, 500, 0, 0, 0, 0, 0, 0, + 0, 0, 83, 81, 82, 0, 84, 0, 85, 0, + 87, 0, 88, 0, 0, 0, 0, 77, 86, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, + 70, 71, 0, 72, 0, 0, 0, 73, 0, 74, + 75, 76, 0, 0, 78, 0, 0, 0, 79, 0, + 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 83, 81, 82, 0, 84, 0, 85, 0, + 87, 302, 88, 0, 0, 0, 0, 77, 86, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 0, 0, 145, 147, 148, 0, 0, 149, 0, + 150, 0, 0, 0, 152, 153, 154, 0, 0, 0, + 0, 0, 0, 69, 155, 156, 157, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 81, 79, 80, 0, 82, 0, 83, 0, 85, 0, - 86, 0, 0, 0, 0, 75, 84, 65, 0, 0, - 0, 0, 0, 0, 0, 0, 62, 63, 64, 0, - 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, - 0, 0, 0, 0, 67, 0, 0, 0, 68, 69, - 0, 70, 0, 0, 0, 71, 0, 72, 73, 74, - 0, 0, 76, 0, 0, 0, 77, 0, 78, 0, + 0, 0, 0, 161, 0, 0, 0, 0, 0, 0, + 81, 82, 162, 163, 164, 0, 166, 167, 168, 169, + 170, 171, 0, 0, 159, 165, 151, 144, 146, 160, + 0, 0, 0, 0, 0, 141, 142, 143, 0, 0, + 145, 147, 148, 0, 0, 149, 0, 150, 0, 0, + 0, 152, 153, 154, 0, 0, 0, 0, 0, 0, + 424, 155, 156, 157, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 158, 0, 0, 0, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 81, 79, 80, 0, 82, 0, 83, 0, 85, 298, - 86, 0, 0, 0, 0, 75, 84, 65, 0, 0, - 0, 0, 0, 0, 0, 0, -92, 0, 0, 0, - 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, - 0, 66, 0, 0, 0, 0, 0, 0, 67, 0, - 0, 0, 68, 69, 0, 70, 0, 0, 0, 71, - 0, 72, 73, 74, 0, 0, 76, 0, 0, 0, - 77, 0, 78, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 81, 79, 80, 0, 82, 0, - 83, 0, 85, 0, 86, 0, 0, 0, 0, 75, - 84, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, - 0, 66, 0, 0, 0, 0, 0, 0, 67, 0, - 0, 0, 68, 69, 0, 70, 0, 0, 0, 71, - 0, 72, 73, 74, 0, 0, 76, 0, 0, 0, - 77, 0, 78, 0, 0, 496, 0, 0, 0, 0, - 0, 0, 0, 0, 81, 79, 80, 0, 82, 0, - 83, 0, 85, 0, 86, 0, 0, 0, 0, 75, - 84, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, - 0, 66, 0, 0, 0, 0, 0, 0, 67, 0, - 0, 0, 68, 69, 0, 70, 0, 0, 0, 71, - 0, 72, 73, 74, 0, 0, 76, 0, 0, 0, - 77, 0, 78, 0, 0, 499, 0, 0, 0, 0, - 0, 0, 0, 0, 81, 79, 80, 0, 82, 0, - 83, 0, 85, 0, 86, 0, 0, 0, 0, 75, - 84, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 139, 140, 141, 0, 0, 143, 145, 146, 0, 0, - 147, 0, 148, 0, 0, 0, 150, 151, 152, 0, - 0, 0, 0, 0, 0, 67, 153, 154, 155, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 156, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, - 0, 0, 79, 80, 160, 161, 162, 0, 164, 165, - 166, 167, 168, 169, 0, 0, 157, 163, 149, 142, - 144, 158, 0, 0, 0, 0, 0, 139, 140, 141, - 0, 0, 143, 145, 146, 0, 0, 147, 0, 148, - 0, 0, 0, 150, 151, 152, 0, 0, 0, 0, - 0, 0, 420, 153, 154, 155, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 156, 0, 0, 0, - 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 159, 0, 0, 0, 0, 0, 425, 422, - 424, 160, 161, 162, 0, 164, 165, 166, 167, 168, - 169, 0, 0, 157, 163, 149, 142, 144, 158, 0, - 0, 0, 0, 0, 139, 140, 141, 0, 0, 143, - 145, 146, 0, 0, 147, 0, 148, 0, 0, 0, - 150, 151, 152, 0, 0, 0, 0, 0, 0, 420, - 153, 154, 155, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 156, 0, 0, 0, 421, 0, 0, - 0, 0, 0, 0, 0, 423, 0, 0, 0, 159, - 0, 0, 0, 0, 0, 425, 422, 424, 160, 161, - 162, 0, 164, 165, 166, 167, 168, 169, 0, 0, - 157, 163, 149, 142, 144, 158, 0, 0, 0, 0, - 0, 239, 0, 0, 0, 0, 240, 0, 62, 63, - 64, 242, 0, 0, 0, 0, 0, 0, 243, 66, - 0, 0, 0, 0, 0, 0, 245, 246, 0, 0, - 247, 69, 0, 70, 0, 0, 0, 71, 0, 72, - 73, 74, 0, 0, 76, 0, 0, 0, 77, 0, - 78, 0, 0, 0, 0, 0, 249, 0, 250, 0, - 0, 0, 81, 248, 251, 252, 82, 253, 83, 254, - 85, 27, 86, 255, 256, 0, 0, 75, 84, 65, - 18, 241, 0, 0, 0, 0, 0, 0, 239, 0, - 0, 0, 0, 240, 0, 62, 63, 64, 242, 0, - 0, 0, 0, 0, 0, 243, 244, 0, 0, 0, - 0, 0, 0, 245, 246, 0, 0, 247, 69, 0, - 70, 0, 0, 0, 71, 0, 72, 73, 74, 0, - 0, 76, 0, 0, 0, 77, 0, 78, 0, 0, - 0, 0, 0, 249, 0, 250, 0, 0, 0, 81, - 248, 251, 252, 82, 253, 83, 254, 85, 27, 86, - 255, 256, 0, 0, 75, 84, 65, 18, 241, 0, - 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, - 240, 0, 62, 63, 64, 242, 0, 0, 0, 0, - 0, 0, 243, 66, 0, 0, 0, 0, 0, 0, - 534, 246, 0, 0, 247, 535, 0, 70, 0, 0, - 0, 71, 0, 72, 73, 74, 0, 0, 76, 0, - 0, 0, 77, 0, 78, 0, 0, 0, 0, 0, - 249, 0, 250, 0, 0, 0, 81, 248, 251, 252, - 82, 253, 83, 254, 85, 27, 86, 255, 256, 0, - 0, 75, 84, 65, 18, 241, 0, 0, 0, 0, - 0, 0, 239, 0, 0, 0, 0, 240, 0, 62, - 63, 64, 242, 0, 0, 0, 0, 0, 0, 243, - 66, 0, 0, 0, 0, 0, 0, 519, 246, 0, - 0, 247, 520, 0, 70, 0, 0, 0, 71, 0, - 72, 73, 74, 0, 0, 76, 0, 0, 0, 77, - 0, 78, 0, 0, 0, 0, 0, 249, 0, 250, - 0, 0, 0, 81, 248, 251, 252, 82, 253, 83, - 254, 85, 27, 86, 255, 256, 0, 0, 75, 84, - 65, 18, 241, 0, 521, 0, 0, 0, 0, 388, - 140, 141, 0, 0, 390, 145, 392, 63, 64, 393, - 0, 148, 0, 0, 0, 150, 395, 396, 0, 0, - 0, 0, 0, 0, 397, 398, 154, 155, 247, 69, - 0, 70, 0, 0, 0, 71, 0, 72, 399, 74, - 0, 0, 401, 0, 0, 0, 77, 0, 78, 0, - -238, 0, 0, 0, 403, 0, 250, 0, 0, 0, - 405, 402, 404, 406, 407, 408, 83, 410, 411, 412, - 413, 414, 415, 0, 0, 400, 409, 394, 389, 391, - 158, 0, 0, 0, 0, 0, + 161, 0, 0, 0, 0, 0, 429, 426, 428, 162, + 163, 164, 0, 166, 167, 168, 169, 170, 171, 0, + 0, 159, 165, 151, 144, 146, 160, 0, 0, 0, + 0, 0, 141, 142, 143, 0, 0, 145, 147, 148, + 0, 0, 149, 0, 150, 0, 0, 0, 152, 153, + 154, 0, 0, 0, 0, 0, 0, 424, 155, 156, + 157, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 158, 0, 0, 0, 425, 0, 0, 0, 0, + 0, 0, 0, 427, 0, 0, 0, 161, 0, 0, + 0, 0, 0, 429, 426, 428, 162, 163, 164, 0, + 166, 167, 168, 169, 170, 171, 0, 0, 159, 165, + 151, 144, 146, 160, 0, 0, 0, 0, 0, 243, + 0, 0, 0, 0, 244, 0, 64, 65, 66, 246, + 0, 0, 0, 0, 0, 0, 247, 68, 0, 0, + 0, 0, 0, 0, 249, 250, 0, 0, 251, 71, + 0, 72, 0, 0, 0, 73, 0, 74, 75, 76, + 0, 0, 78, 0, 0, 0, 79, 0, 80, 0, + 0, 0, 0, 0, 253, 0, 254, 0, 0, 0, + 83, 252, 255, 256, 84, 257, 85, 258, 87, 27, + 88, 259, 260, 0, 0, 77, 86, 67, 18, 245, + 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, + 0, 244, 0, 64, 65, 66, 246, 0, 0, 0, + 0, 0, 0, 247, 248, 0, 0, 0, 0, 0, + 0, 249, 250, 0, 0, 251, 71, 0, 72, 0, + 0, 0, 73, 0, 74, 75, 76, 0, 0, 78, + 0, 0, 0, 79, 0, 80, 0, 0, 0, 0, + 0, 253, 0, 254, 0, 0, 0, 83, 252, 255, + 256, 84, 257, 85, 258, 87, 27, 88, 259, 260, + 0, 0, 77, 86, 67, 18, 245, 0, 0, 0, + 0, 0, 0, 243, 0, 0, 0, 0, 244, 0, + 64, 65, 66, 246, 0, 0, 0, 0, 0, 0, + 247, 68, 0, 0, 0, 0, 0, 0, 527, 250, + 0, 0, 251, 528, 0, 72, 0, 0, 0, 73, + 0, 74, 75, 76, 0, 0, 78, 0, 0, 0, + 79, 0, 80, 0, 0, 0, 0, 0, 253, 0, + 254, 0, 0, 0, 83, 252, 255, 256, 84, 257, + 85, 258, 87, 27, 88, 259, 260, 0, 0, 77, + 86, 67, 18, 245, 0, 529, 0, 0, 0, 0, + 392, 142, 143, 0, 0, 394, 147, 396, 65, 66, + 397, 0, 150, 0, 0, 0, 152, 399, 400, 0, + 0, 0, 0, 0, 0, 401, 402, 156, 157, 251, + 71, 0, 72, 0, 0, 0, 73, 0, 74, 403, + 76, 0, 0, 405, 0, 0, 0, 79, 0, 80, + 0, -238, 0, 0, 0, 407, 0, 254, 0, 0, + 0, 409, 406, 408, 410, 411, 412, 85, 414, 415, + 416, 417, 418, 419, 0, 0, 404, 413, 398, 393, + 395, 160, 0, 0, 0, 0, 0, - 474, 476, 10, 500, 477, 459, 460, 456, 193, 472, - 462, 12, 265, 548, 212, 180, 512, 481, 218, 38, - 524, 366, 542, 466, 508, 329, 17, 216, 518, 533, - 541, 487, 49, 483, 463, 466, 452, 498, 485, 270, - 206, 237, 494, 277, 536, 0, 0, 463, 199, 0, - 201, 495, 347, 178, 170, 427, 265, 176, 429, 380, - 173, 270, 378, 374, 417, 365, 376, 419, 363, 442, - 334, 338, 212, 347, 336, 444, 437, 361, 277, 90, - 237, 329, 90, 120, 280, 329, 0, 313, 0, 237, - 431, 531, 542, 432, 329, 329, 329, 90, 0, 0, - 136, 17, 314, 90, 537, 210, 90, 90, 90, 138, - 90, 315, 118, 90, 216, 17, 176, 176, 125, 130, - 132, 90, 90, 208, 434, 100, 90, 128, 431, 332, - 293, 432, 0, 90, 102, 297, 91, 356, 330, 357, - 359, 90, 90, 210, 99, 90, 90, 505, 98, 90, - 90, 506, 504, 90, 552, 479, 90, 90, 503, 478, - 90, 90, 371, 502, 90, 90, 507, 97, 90, 90, - 478, 90, 90, 90, 195, 119, 264, 122, 121, 90, - 90, 0, 90, 90, 114, 198, 127, 124, 90, 107, - 368, 90, 90, 311, 479, 90, 123, 90, 325, 325, - 136, 126, 297, 297, 297, 0, 90, 90, 0, 138, - 205, 297, 297, 90, 343, 0, 0, 0, 297, 320, - 344, 346, 340, 325, 322, 90, 90, 0, 297, 90, - 297, 297, 316, 318, 297, 90, 317, 0, 90, 90, - 297, 325, 305, 312, 297, 353, 297, 28, 300, 0, - 0, 0, 28, 31, 515, 0, 0, 0, 31, 16, - 33, 17, 0, 324, 16, 33, 17, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 463, 180, 197, 480, 476, 481, 504, 460, 478, 466, + 464, 284, 210, 184, 532, 526, 370, 540, 512, 281, + 10, 274, 12, 241, 537, 547, 216, 222, 499, 269, + 220, 502, 470, 498, 491, 333, 456, 485, 489, 487, + 518, 470, 203, 467, 51, 541, 38, 0, 205, 340, + 382, 380, 378, 351, 431, 421, 369, 367, 384, 216, + 281, 0, 274, 467, 269, 333, 433, 441, 92, 342, + 338, 93, 446, 448, 365, 423, 178, 172, 333, 175, + 333, 0, 541, 0, 333, 0, 92, 333, 351, 241, + 121, 241, 0, 220, 0, 92, 0, 435, 178, 120, + 436, 92, 92, 214, 138, 212, 92, 316, 92, 0, + 534, 0, 122, 140, 92, 92, 92, 92, 132, 317, + 318, 0, 336, 129, 363, 92, 134, 92, 334, 0, + 319, 361, 127, 92, 92, 483, 214, 92, 92, 101, + 0, 297, 92, 126, 551, 102, 301, 92, 92, 507, + 508, 92, 360, 482, 92, 92, 506, 509, 178, 92, + 92, 510, 511, 92, 92, 438, 99, 92, 116, 372, + 92, 375, 92, 130, 92, 92, 435, 123, 268, 436, + 125, 92, 0, 92, 199, 92, 124, 482, 315, 92, + 202, 483, 92, 92, 0, 92, 0, 92, 329, 109, + 104, 128, 301, 301, 0, 92, 92, 92, 329, 100, + 301, 301, 320, 301, 347, 0, 0, 92, 329, 0, + 348, 344, 301, 301, 321, 16, 33, 17, 92, 92, + 350, 0, 0, 301, 301, 0, 309, 92, 92, 326, + 331, 92, 301, 301, 322, 523, 301, 329, 329, 0, + 304, 324, 301, 301, 16, 33, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, + 328, 0, 0, 0, 138, 0, 0, 0, 0, 0, + 0, 0, 0, 140, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 325, 0, 0, 0, 0, - 297, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0}; + 0, 0, 0, 0, 0, 0, 0, 0}; const int JavaScriptGrammar::action_check [] = { - 48, 5, 55, 36, 7, 61, 17, 2, 7, 7, - 7, 5, 5, 78, 2, 7, 1, 8, 7, 61, - 20, 33, 60, 36, 29, 8, 36, 36, 7, 7, - 55, 55, 55, 7, 36, 7, 7, 33, 8, 8, - 16, 60, 17, 7, 31, 8, 36, 7, 76, 33, - 36, 33, 60, 33, 60, 36, 8, 2, 7, 7, - 61, 88, 0, 36, 7, 7, 88, 33, 2, 1, - 7, 36, 8, 8, 1, 36, 33, 36, 36, 29, - 36, 36, 8, 60, 1, 8, 33, 33, 55, 29, - 29, 7, 60, 8, 48, -1, 8, 7, 60, 15, - 7, 10, 8, 8, 8, 8, 8, 60, 15, 7, - -1, 8, 7, 8, 6, 66, -1, 48, 48, 40, - 40, 65, 50, 33, 8, 8, 54, 7, 20, 8, - 51, 51, 61, 62, 8, 33, 8, 78, 8, 61, - 62, 56, 61, 62, 56, 78, 55, 61, 62, 42, - 56, 56, 12, 40, 56, -1, 60, 60, -1, 15, - 53, 61, 62, 60, 51, 61, 62, 61, 62, 50, - 61, 62, 40, 54, -1, 29, 60, 60, 34, 29, - 36, 60, 25, 51, 27, 25, 60, 27, 60, -1, - 12, 61, 62, -1, 25, 38, 27, 57, 38, 12, - -1, 29, 25, 63, 27, 29, 25, 38, 27, 15, - -1, 8, 66, 67, 8, 38, 66, 67, 25, 38, - 27, 25, -1, 27, 25, 25, 27, 27, 34, -1, - 36, 38, 15, 29, 38, 57, 29, 38, 38, 29, - -1, 63, 66, 67, 57, 29, 74, 29, 8, 29, - 63, 34, 29, 36, 29, 29, 25, 85, 27, -1, - -1, 29, -1, -1, 61, -1, -1, 61, 62, 38, - 66, 67, -1, 66, 67, -1, 66, 67, 18, 19, - -1, 29, 66, 67, 66, 67, 66, 67, 36, 66, - 67, 66, 67, -1, 25, 29, 27, -1, 66, 67, - 74, 61, 62, 18, 19, 45, 46, 38, 29, -1, - 29, 85, 23, 24, -1, -1, -1, -1, 66, 67, - -1, 32, -1, -1, 35, -1, 37, 61, 62, -1, - 45, 46, 66, 67, -1, -1, -1, -1, 59, -1, - 23, 24, 61, 62, -1, 66, 67, 66, 67, 32, - -1, -1, 35, 29, 37, -1, 23, 24, -1, -1, - 18, 19, 23, 24, 85, 32, 29, -1, 35, -1, - 37, 32, -1, -1, 35, -1, 37, -1, -1, -1, - -1, -1, -1, -1, -1, 61, 62, 45, 46, -1, - 66, 67, 8, 23, 24, -1, -1, -1, 61, 62, - -1, 31, 32, 66, 67, 35, -1, 37, 23, 24, - -1, -1, -1, 29, 8, -1, 31, 32, 23, 24, - 35, -1, 37, -1, -1, 10, 31, 32, -1, -1, - 35, -1, 37, 23, 24, 29, -1, 22, -1, -1, - -1, -1, 32, 59, 29, 35, -1, 37, 10, -1, - 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, - 22, -1, -1, -1, -1, 59, -1, 29, -1, 85, - 55, -1, 66, 67, 59, -1, -1, -1, -1, -1, - -1, 66, 67, -1, -1, -1, -1, -1, -1, 74, - -1, 85, -1, 55, -1, -1, -1, 59, 83, -1, - 85, 23, 24, -1, 66, 67, 3, -1, -1, 31, - 32, -1, 74, 35, -1, 37, 13, -1, -1, -1, - 17, 83, -1, 85, -1, -1, -1, -1, -1, 26, - -1, 28, -1, -1, 31, -1, -1, -1, -1, -1, - -1, -1, 39, -1, 41, 42, -1, -1, -1, -1, - -1, -1, 49, -1, -1, 52, 53, -1, -1, -1, - -1, 58, -1, -1, -1, -1, -1, 64, -1, 3, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, - -1, -1, 79, 17, -1, -1, -1, -1, -1, -1, - -1, -1, 26, -1, 28, -1, -1, -1, -1, -1, + 2, 61, 60, 36, 33, 29, 33, 60, 8, 17, + 78, 29, 29, 1, 61, 8, 60, 60, 31, 2, + 1, 8, 7, 48, 2, 55, 8, 33, 7, 55, + 33, 7, 7, 7, 5, 36, 33, 36, 36, 60, + 5, 5, 8, 1, 7, 7, 7, 7, 16, 8, + 7, 60, 36, 33, 48, 7, 7, 48, 78, 55, + 55, 7, 66, 36, 20, 88, 36, 78, 60, 88, + 1, 76, 7, 7, 17, 65, 48, 0, 55, 29, + 29, 36, 36, 36, 8, 33, 7, -1, 8, 7, + -1, 36, 78, 60, 36, 36, 33, 36, 8, 8, + 33, 7, 8, 8, 8, 8, 8, 8, 8, -1, + 8, 10, 8, 8, 61, -1, 8, 61, 62, 8, + -1, 61, 62, 61, 62, 61, 62, 40, 40, 61, + 62, 61, 62, 29, 61, 62, 7, 12, 51, 51, + 7, 29, 61, 62, 15, 8, 40, 40, 8, 6, + 60, 60, 56, 56, 56, 60, 55, 51, 51, 60, + 60, 42, 60, 20, 50, 60, 33, 56, 54, 61, + 50, 15, 53, 2, 54, 15, 29, 8, 66, 67, + 29, 8, 57, 29, 8, -1, 29, 25, 63, 27, + 34, 25, 36, 27, 34, 8, 36, 60, -1, 7, + 38, 61, 62, 29, 38, 12, 15, 29, -1, 29, + -1, -1, -1, 66, 67, 29, -1, 66, 67, -1, + 66, 67, 7, 66, 67, 34, -1, 36, 29, -1, + 61, 62, 29, 29, 61, 62, 29, 61, 62, 12, + 66, 67, 29, -1, 66, 67, 66, 67, 61, 62, + 57, -1, -1, 61, 62, 25, 63, 27, 18, 19, + 74, 29, 25, -1, 27, 66, 67, -1, 38, 66, + 67, 85, -1, 66, 67, 38, 61, 62, 74, 66, + 67, 29, 18, 19, 57, 45, 46, -1, 36, 85, + 63, 23, 24, 61, 62, -1, -1, -1, 66, 67, + 32, -1, -1, 35, 29, 37, -1, -1, -1, 45, + 46, 23, 24, -1, 29, -1, 29, -1, 66, 67, + 32, 23, 24, 35, -1, 37, -1, -1, 18, 19, + 32, 23, 24, 35, -1, 37, 61, 62, -1, -1, + 32, 66, 67, 35, -1, 37, 61, 62, 61, 62, + -1, 66, 67, 66, 67, 45, 46, 23, 24, -1, + -1, -1, -1, -1, -1, 31, 32, 23, 24, 35, + -1, 37, -1, -1, -1, 31, 32, 23, 24, 35, + 10, 37, -1, -1, -1, 31, 32, -1, -1, 35, + -1, 37, 22, 10, -1, 23, 24, -1, -1, 29, + -1, 23, 24, 31, 32, 22, -1, 35, -1, 37, + 32, -1, 29, 35, -1, 37, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 55, -1, -1, -1, 59, + -1, -1, -1, -1, -1, -1, 66, 67, 55, -1, + -1, -1, 59, -1, 74, -1, -1, -1, 3, 66, + 67, -1, -1, 83, -1, 85, -1, 74, 13, -1, + -1, -1, 17, -1, -1, -1, 83, -1, 85, 23, + 24, 26, -1, 28, -1, -1, -1, 31, 32, 3, + -1, 35, -1, 37, 39, -1, 41, 42, -1, 13, + -1, -1, -1, 17, 49, -1, -1, 52, 53, -1, + -1, -1, 26, 58, 28, -1, -1, 31, -1, 64, -1, -1, -1, -1, -1, 39, -1, 41, 42, -1, - -1, -1, -1, -1, -1, 49, -1, -1, 52, 53, - -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, - 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 79, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, -1, -1, -1, 43, -1, - -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 65, 66, 67, -1, 69, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 80, 81, 82, -1, -1, - -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 65, 66, 67, -1, 69, -1, 71, -1, 73, -1, - 75, -1, -1, -1, -1, 80, 81, 82, -1, -1, - -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 65, 66, 67, -1, 69, -1, 71, -1, 73, 74, - 75, -1, -1, -1, -1, 80, 81, 82, -1, -1, - -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, - 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, - -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 65, 66, 67, -1, 69, -1, - 71, -1, 73, -1, 75, -1, -1, -1, -1, 80, - 81, 82, -1, -1, -1, -1, -1, -1, -1, -1, - 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, - -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, 56, -1, -1, -1, -1, - -1, -1, -1, -1, 65, 66, 67, -1, 69, -1, - 71, -1, 73, -1, 75, -1, -1, -1, -1, 80, - 81, 82, -1, -1, -1, -1, -1, -1, -1, -1, - 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, - -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, 56, -1, -1, -1, -1, - -1, -1, -1, -1, 65, 66, 67, -1, 69, -1, - 71, -1, 73, -1, 75, -1, -1, -1, -1, 80, - 81, 82, -1, -1, -1, -1, -1, -1, -1, -1, - 4, 5, 6, -1, -1, 9, 10, 11, -1, -1, - 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, - -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, + -1, -1, -1, -1, 79, 49, -1, -1, 52, 53, + -1, -1, -1, -1, 58, -1, -1, 3, -1, -1, + 64, -1, -1, -1, -1, -1, -1, 13, -1, -1, + -1, 17, -1, -1, -1, 79, -1, -1, -1, -1, + 26, -1, 28, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 39, -1, 41, 42, -1, -1, -1, + -1, -1, -1, 49, -1, -1, 52, 53, -1, -1, + -1, -1, 58, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, - -1, -1, 66, 67, 68, 69, 70, -1, 72, 73, - 74, 75, 76, 77, -1, -1, 80, 81, 82, 83, - 84, 85, -1, -1, -1, -1, -1, 4, 5, 6, - -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, - -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, - -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, + -1, -1, -1, 79, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, -1, 65, 66, - 67, 68, 69, 70, -1, 72, 73, 74, 75, 76, - 77, -1, -1, 80, 81, 82, 83, 84, 85, -1, - -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, - 10, 11, -1, -1, 14, -1, 16, -1, -1, -1, - 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, - 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, - -1, -1, -1, -1, -1, 55, -1, -1, -1, 59, - -1, -1, -1, -1, -1, 65, 66, 67, 68, 69, - 70, -1, 72, 73, 74, 75, 76, 77, -1, -1, - 80, 81, 82, 83, 84, 85, -1, -1, -1, -1, - -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, - 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, - -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, + 67, -1, 69, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 80, 81, 82, -1, -1, -1, -1, + -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, + -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 65, 66, + 67, -1, 69, -1, 71, -1, 73, -1, 75, -1, + -1, -1, -1, 80, 81, 82, -1, -1, -1, -1, + -1, -1, -1, -1, 7, -1, -1, -1, 11, 12, + 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, + -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, + 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, + 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, + 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 65, 66, 67, -1, 69, -1, 71, -1, + 73, -1, 75, -1, -1, -1, -1, 80, 81, 82, + -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, + 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, + -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, + 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, + 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, -1, 65, 66, 67, -1, 69, -1, 71, -1, + 73, -1, 75, -1, -1, -1, -1, 80, 81, 82, + -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, + 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, + -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, + 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, + 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, + 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, + -1, -1, 65, 66, 67, -1, 69, -1, 71, -1, + 73, -1, 75, -1, -1, -1, -1, 80, 81, 82, + -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, + 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, + -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, -1, -1, 80, 81, 82, - 83, 84, -1, -1, -1, -1, -1, -1, 4, -1, - -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, - -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, - -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, - 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, - -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, -1, -1, 80, 81, 82, 83, 84, -1, - -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, - 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, - -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, - 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, - -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, - -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, - 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, - -1, 80, 81, 82, 83, 84, -1, -1, -1, -1, - -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, - 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, - 22, -1, -1, -1, -1, -1, -1, 29, 30, -1, - -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, - 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, - -1, 53, -1, -1, -1, -1, -1, 59, -1, 61, - -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, + 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 65, 66, 67, -1, 69, -1, 71, -1, + 73, 74, 75, -1, -1, -1, -1, 80, 81, 82, + -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, + 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, + 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, + -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, + 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, + 76, 77, -1, -1, 80, 81, 82, 83, 84, 85, + -1, -1, -1, -1, -1, 4, 5, 6, -1, -1, + 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, + -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, + 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, + 69, 70, -1, 72, 73, 74, 75, 76, 77, -1, + -1, 80, 81, 82, 83, 84, 85, -1, -1, -1, + -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, + -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, + 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, + 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, + -1, -1, -1, 55, -1, -1, -1, 59, -1, -1, + -1, -1, -1, 65, 66, 67, 68, 69, 70, -1, 72, 73, 74, 75, 76, 77, -1, -1, 80, 81, - 82, 83, 84, -1, 86, -1, -1, -1, -1, 4, - 5, 6, -1, -1, 9, 10, 11, 12, 13, 14, - -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, - -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, + 82, 83, 84, 85, -1, -1, -1, -1, -1, 4, + -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, + -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, + -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - 55, -1, -1, -1, 59, -1, 61, -1, -1, -1, + -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, 80, 81, 82, 83, 84, - 85, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, + -1, 9, -1, 11, 12, 13, 14, -1, -1, -1, + -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, + -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, + -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, + -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, + -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + -1, -1, 80, 81, 82, 83, 84, -1, -1, -1, + -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, + 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, + 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, + -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, + 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, 80, + 81, 82, 83, 84, -1, 86, -1, -1, -1, -1, + 4, 5, 6, -1, -1, 9, 10, 11, 12, 13, + 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, + -1, -1, -1, -1, -1, 29, 30, 31, 32, 33, + 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, + 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, + -1, 55, -1, -1, -1, 59, -1, 61, -1, -1, + -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, -1, -1, 80, 81, 82, 83, + 84, 85, -1, -1, -1, -1, -1, - 20, 64, 5, 17, 64, 78, 17, 90, 26, 95, - 78, 6, 20, 26, 20, 60, 17, 17, 20, 16, - 11, 20, 20, 64, 20, 17, 20, 20, 15, 15, - 20, 15, 17, 15, 17, 64, 93, 26, 17, 20, - 17, 15, 22, 15, 11, -1, -1, 17, 26, -1, - 26, 26, 20, 26, 17, 26, 20, 26, 15, 15, - 26, 20, 15, 15, 26, 15, 17, 28, 17, 15, - 15, 15, 20, 20, 17, 17, 15, 15, 15, 37, - 15, 17, 37, 41, 17, 17, -1, 42, -1, 15, - 31, 10, 20, 34, 17, 17, 17, 37, -1, -1, - 20, 20, 42, 37, 9, 39, 37, 37, 37, 29, - 37, 42, 41, 37, 20, 20, 26, 26, 42, 49, - 47, 37, 37, 33, 33, 40, 37, 43, 31, 61, - 37, 34, -1, 37, 45, 42, 40, 84, 61, 61, - 61, 37, 37, 39, 39, 37, 37, 39, 39, 37, - 37, 39, 39, 37, 82, 39, 37, 37, 39, 39, - 37, 37, 97, 39, 37, 37, 39, 39, 37, 37, - 39, 37, 37, 37, 51, 41, 102, 42, 42, 37, - 37, -1, 37, 37, 42, 53, 43, 42, 37, 43, - 96, 37, 37, 42, 39, 37, 42, 37, 37, 37, - 20, 43, 42, 42, 42, -1, 37, 37, -1, 29, - 30, 42, 42, 37, 54, -1, -1, -1, 42, 50, - 59, 59, 52, 37, 48, 37, 37, -1, 42, 37, - 42, 42, 44, 44, 42, 37, 44, -1, 37, 37, - 42, 37, 44, 42, 42, 59, 42, 6, 46, -1, - -1, -1, 6, 12, 8, -1, -1, -1, 12, 18, - 19, 20, -1, 59, 18, 19, 20, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 77, 25, 25, 63, 94, 63, 16, 89, 19, 77, + 16, 16, 16, 59, 10, 14, 19, 19, 19, 14, + 5, 19, 6, 14, 6, 25, 19, 19, 25, 19, + 19, 25, 63, 21, 14, 16, 92, 16, 16, 14, + 16, 63, 25, 16, 16, 19, 15, -1, 25, 16, + 14, 16, 14, 19, 25, 25, 14, 16, 14, 19, + 14, -1, 19, 16, 19, 16, 14, 14, 36, 14, + 14, 39, 14, 16, 14, 27, 25, 16, 16, 25, + 16, -1, 19, -1, 16, -1, 36, 16, 19, 14, + 40, 14, -1, 19, -1, 36, -1, 30, 25, 40, + 33, 36, 36, 38, 19, 32, 36, 41, 36, -1, + 6, -1, 40, 28, 36, 36, 36, 36, 48, 41, + 41, -1, 60, 42, 60, 36, 46, 36, 60, -1, + 41, 60, 41, 36, 36, 38, 38, 36, 36, 38, + -1, 36, 36, 41, 81, 39, 41, 36, 36, 38, + 38, 36, 83, 38, 36, 36, 38, 38, 25, 36, + 36, 38, 38, 36, 36, 32, 38, 36, 41, 95, + 36, 96, 36, 42, 36, 36, 30, 41, 101, 33, + 41, 36, -1, 36, 50, 36, 41, 38, 41, 36, + 52, 38, 36, 36, -1, 36, -1, 36, 36, 42, + 44, 42, 41, 41, -1, 36, 36, 36, 36, 38, + 41, 41, 43, 41, 53, -1, -1, 36, 36, -1, + 58, 51, 41, 41, 43, 17, 18, 19, 36, 36, + 58, -1, -1, 41, 41, -1, 43, 36, 36, 47, + 58, 36, 41, 41, 43, 8, 41, 36, 36, -1, + 45, 49, 41, 41, 17, 18, 19, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, + 58, -1, -1, -1, 19, -1, -1, -1, -1, -1, + -1, -1, -1, 28, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 37, -1, -1, -1, -1, - 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1}; + -1, -1, -1, -1, -1, -1, -1, -1}; diff --git a/src/declarative/qml/parser/javascriptgrammar_p.h b/src/declarative/qml/parser/javascriptgrammar_p.h index 3b98238..70c9766 100644 --- a/src/declarative/qml/parser/javascriptgrammar_p.h +++ b/src/declarative/qml/parser/javascriptgrammar_p.h @@ -150,15 +150,15 @@ public: T_XOR = 78, T_XOR_EQ = 79, - ACCEPT_STATE = 553, + ACCEPT_STATE = 552, RULE_COUNT = 317, - STATE_COUNT = 554, + STATE_COUNT = 553, TERMINAL_COUNT = 91, - NON_TERMINAL_COUNT = 104, + NON_TERMINAL_COUNT = 103, - GOTO_INDEX_OFFSET = 554, - GOTO_INFO_OFFSET = 1836, - GOTO_CHECK_OFFSET = 1836 + GOTO_INDEX_OFFSET = 553, + GOTO_INFO_OFFSET = 1717, + GOTO_CHECK_OFFSET = 1717 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 0857eef..ed791c8 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -231,8 +231,8 @@ case 14: { node->rbraceToken = loc(3); sym(1).Node = node; } break; - case 15: -case 16: { + +case 15: { AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(), sym(3).sval, sym(4).UiObjectInitializer); node->colonToken = loc(2); @@ -240,14 +240,14 @@ case 16: { sym(1).Node = node; } break; -case 17: { +case 16: { AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).sval, sym(2).UiObjectInitializer); node->identifierToken = loc(1); sym(1).Node = node; } break; - case 20: -case 21: { + +case 18: { AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(), sym(4).UiObjectMemberList->finish()); node->colonToken = loc(2); @@ -256,33 +256,33 @@ case 21: { sym(1).Node = node; } break; -case 22: { +case 19: { AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 24: { +case 21: { AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; - case 25: case 26: -case 27: { + case 22: +case 23: { AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(), sym(3).Statement); node->colonToken = loc(2); sym(1).Node = node; } break; -case 28: +case 24: -case 29: { +case 25: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); break; } -case 31: { +case 27: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (JavaScriptNameIdImpl *)0, sym(2).sval); node->type = AST::UiPublicMember::Signal; node->propertyToken = loc(1); @@ -291,31 +291,34 @@ case 31: { sym(1).Node = node; } break; -case 32: { +case 29: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval); node->propertyToken = loc(1); node->typeToken = loc(2); node->identifierToken = loc(3); + node->semicolonToken = loc(4); sym(1).Node = node; } break; -case 33: { +case 31: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; node->defaultToken = loc(1); node->propertyToken = loc(2); node->typeToken = loc(3); node->identifierToken = loc(4); + node->semicolonToken = loc(5); sym(1).Node = node; } break; -case 34: { +case 33: { AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); node->propertyToken = loc(1); node->typeToken = loc(2); node->identifierToken = loc(3); node->colonToken = loc(4); + node->semicolonToken = loc(6); sym(1).Node = node; } break; @@ -328,6 +331,7 @@ case 35: { node->typeToken = loc(3); node->identifierToken = loc(4); node->colonToken = loc(5); + node->semicolonToken = loc(7); sym(1).Node = node; } break; @@ -1580,7 +1584,6 @@ case 314: { if (t_action(errorState, yytoken)) { const QString msg = QString::fromUtf8("Unexpected token `%1'").arg(QLatin1String(spell[token_buffer[0].token])); - diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); action = errorState; @@ -1609,7 +1612,6 @@ case 314: { int a = t_action(errorState, *tk); if (a > 0 && t_action(a, yytoken)) { const QString msg = QString::fromUtf8("Expected token `%1'").arg(QLatin1String(spell[*tk])); - diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = *tk; diff --git a/src/declarative/qml/qmlcompiledcomponent.cpp b/src/declarative/qml/qmlcompiledcomponent.cpp index c69af44..bea736a 100644 --- a/src/declarative/qml/qmlcompiledcomponent.cpp +++ b/src/declarative/qml/qmlcompiledcomponent.cpp @@ -56,8 +56,8 @@ QmlCompiledComponent::QmlCompiledComponent() QmlCompiledComponent::~QmlCompiledComponent() { - for (int ii = 0; ii < mos.count(); ++ii) - qFree(mos.at(ii)); + for (int ii = 0; ii < synthesizedMetaObjects.count(); ++ii) + qFree(synthesizedMetaObjects.at(ii)); } diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index a40b7c8..8e279a5 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -61,6 +61,7 @@ #include <QtCore/qdebug.h> #include "private/qmlcustomparser_p_p.h" #include <private/qmlcontext_p.h> +#include <private/qmlcomponent_p.h> #include "qmlscriptparser_p.h" @@ -192,16 +193,6 @@ bool QmlCompiler::isValidId(const QString &val) return true; } -/*! - Returns true if \a str is a valid binding string, false otherwise. - - Valid binding strings are those enclosed in braces ({}). -*/ -bool QmlCompiler::isBinding(const QString &str) -{ - return str.startsWith(QLatin1Char('{')) && str.endsWith(QLatin1Char('}')); -} - /*! Returns true if property name \a name refers to an attached property, false otherwise. @@ -441,10 +432,10 @@ void QmlCompiler::reset(QmlCompiledComponent *cc, bool deleteMemory) cc->customTypeData.clear(); cc->datas.clear(); if (deleteMemory) { - for (int ii = 0; ii < cc->mos.count(); ++ii) - qFree(cc->mos.at(ii)); + for (int ii = 0; ii < cc->synthesizedMetaObjects.count(); ++ii) + qFree(cc->synthesizedMetaObjects.at(ii)); } - cc->mos.clear(); + cc->synthesizedMetaObjects.clear(); cc->bytecode.clear(); } @@ -533,6 +524,11 @@ void QmlCompiler::compileTree(Object *tree) if (!compileObject(tree, 0)) // Compile failed return; + if (tree->metatype) + static_cast<QMetaObject &>(output->root) = *tree->metaObject(); + else + static_cast<QMetaObject &>(output->root) = *output->types.at(tree->type).metaObject(); + QmlInstruction def; init.line = 0; def.type = QmlInstruction::SetDefault; @@ -543,10 +539,8 @@ void QmlCompiler::compileTree(Object *tree) bool QmlCompiler::compileObject(Object *obj, int ctxt) { - if (obj->type != -1) { - obj->metatype = - QmlMetaType::metaObjectForType(output->types.at(obj->type).className); - } + if (obj->type != -1) + obj->metatype = output->types.at(obj->type).metaObject(); if (output->types.at(obj->type).className == "Component") { COMPILE_CHECK(compileComponent(obj, ctxt)); @@ -671,7 +665,7 @@ bool QmlCompiler::compileComponent(Object *obj, int ctxt) COMPILE_CHECK(compileComponentFromRoot(root, ctxt)); if (idProp && idProp->values.count()) { - QString val = idProp->values.at(0)->primitive; + QString val = idProp->values.at(0)->primitive(); if (!isValidId(val)) COMPILE_EXCEPTION("Invalid id property value"); @@ -766,13 +760,10 @@ bool QmlCompiler::compileSignal(Property *prop, Object *obj) return rv; } else { - QString script = prop->values.at(0)->primitive.trimmed(); + QString script = prop->values.at(0)->value.asScript().trimmed(); if (script.isEmpty()) return true; - if (isBinding(script)) - COMPILE_EXCEPTION("Cannot assign binding to signal property"); - int idx = output->indexForString(script); int pr = output->indexForByteArray(prop->name); @@ -887,7 +878,7 @@ bool QmlCompiler::compileIdProperty(QmlParser::Property *prop, if (prop->values.count() == 1) { if (prop->values.at(0)->object) COMPILE_EXCEPTION("Cannot assign an object as an id"); - QString val = prop->values.at(0)->primitive; + QString val = prop->values.at(0)->primitive(); if (!isValidId(val)) COMPILE_EXCEPTION(val << "is not a valid id"); if (ids.contains(val)) @@ -1031,11 +1022,12 @@ bool QmlCompiler::compileListProperty(QmlParser::Property *prop, assign.assignObject.property = output->indexForByteArray(prop->name); assign.assignObject.castValue = 0; output->bytecode << assign; - } else if (isBinding(v->primitive)) { + } else if (v->value.isScript()) { if (assignedBinding) COMPILE_EXCEPTION("Can only assign one binding to lists"); - compileBinding(v->primitive, prop, ctxt, obj->metaObject(), v->location.start.line); + compileBinding(v->value.asScript(), prop, ctxt, + obj->metaObject(), v->location.start.line); v->type = Value::PropertyBinding; } else { COMPILE_EXCEPTION("Cannot assign primitives to lists"); @@ -1076,7 +1068,7 @@ bool QmlCompiler::compilePropertyObjectAssignment(QmlParser::Property *prop, int ctxt) { if (v->object->type != -1) - v->object->metatype = QmlMetaType::metaObjectForType(output->types.at(v->object->type).className); + v->object->metatype = output->types.at(v->object->type).metaObject(); if (v->object->metaObject()) { @@ -1186,9 +1178,10 @@ bool QmlCompiler::compilePropertyLiteralAssignment(QmlParser::Property *prop, QmlParser::Value *v, int ctxt) { - if (isBinding(v->primitive)) { + if (v->value.isScript()) { - compileBinding(v->primitive, prop, ctxt, obj->metaObject(), v->location.start.line); + compileBinding(v->value.asScript(), prop, ctxt, obj->metaObject(), + v->location.start.line); v->type = Value::PropertyBinding; @@ -1199,8 +1192,9 @@ bool QmlCompiler::compilePropertyLiteralAssignment(QmlParser::Property *prop, bool doassign = true; if (prop->index != -1) { + QString value = v->primitive(); StoreInstructionResult r = - generateStoreInstruction(*output, assign, obj->metaObject()->property(prop->index), prop->index, -1, &v->primitive); + generateStoreInstruction(*output, assign, obj->metaObject()->property(prop->index), prop->index, -1, &value); if (r == Ok) { doassign = false; @@ -1208,10 +1202,10 @@ bool QmlCompiler::compilePropertyLiteralAssignment(QmlParser::Property *prop, //### we are restricted to a rather generic message here. If we can find a way to move // the exception into generateStoreInstruction we could potentially have better messages. // (the problem is that both compile and run exceptions can be generated, though) - COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive << "to property" << obj->metaObject()->property(prop->index).name()); + COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive() << "to property" << obj->metaObject()->property(prop->index).name()); doassign = false; } else if (r == ReadOnly) { - COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive << "to the read-only property" << obj->metaObject()->property(prop->index).name()); + COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive() << "to the read-only property" << obj->metaObject()->property(prop->index).name()); } else { doassign = true; } @@ -1226,7 +1220,7 @@ bool QmlCompiler::compilePropertyLiteralAssignment(QmlParser::Property *prop, output->indexForByteArray(prop->name); } assign.assignConstant.constant = - output->indexForString(v->primitive); + output->indexForString(v->primitive()); } output->bytecode << assign; @@ -1303,10 +1297,10 @@ bool QmlCompiler::compileDynamicMeta(QmlParser::Object *obj) obj->extObjectData = builder.toMetaObject(); static_cast<QMetaObject &>(obj->extObject) = *obj->extObjectData; - output->mos << obj->extObjectData; + output->synthesizedMetaObjects << obj->extObjectData; QmlInstruction store; store.type = QmlInstruction::StoreMetaObject; - store.storeMeta.data = output->mos.count() - 1; + store.storeMeta.data = output->synthesizedMetaObjects.count() - 1; store.storeMeta.slotData = slotStart; store.line = obj->location.start.line; output->bytecode << store; @@ -1335,12 +1329,9 @@ bool QmlCompiler::compileDynamicMeta(QmlParser::Object *obj) return true; } -void QmlCompiler::compileBinding(const QString &str, QmlParser::Property *prop, +void QmlCompiler::compileBinding(const QString &bind, QmlParser::Property *prop, int ctxt, const QMetaObject *mo, qint64 line) { - Q_ASSERT(isBinding(str)); - - QString bind = str.mid(1, str.length() - 2).trimmed(); QmlBasicScript bs; bs.compile(bind.toLatin1()); @@ -1487,12 +1478,13 @@ QmlCompiledData::~QmlCompiledData() QmlCompiledData &QmlCompiledData::operator=(const QmlCompiledData &other) { types = other.types; + root = other.root; primitives = other.primitives; floatData = other.floatData; intData = other.intData; customTypeData = other.customTypeData; datas = other.datas; - mos = other.mos; + synthesizedMetaObjects = other.synthesizedMetaObjects; bytecode = other.bytecode; return *this; } @@ -1516,5 +1508,14 @@ QObject *QmlCompiledData::TypeReference::createInstance(QmlContext *ctxt) const } } +const QMetaObject *QmlCompiledData::TypeReference::metaObject() const +{ + if (type) + return type->metaObject(); + else if (component) + return &static_cast<QmlComponentPrivate *>(QObjectPrivate::get(component))->cc->root; + else + return 0; +} QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h index b885e7b..9d2f8f7 100644 --- a/src/declarative/qml/qmlcompiler_p.h +++ b/src/declarative/qml/qmlcompiler_p.h @@ -81,6 +81,7 @@ public: QmlRefCount *ref; QObject *createInstance(QmlContext *) const; + const QMetaObject *metaObject() const; }; QList<TypeReference> types; struct CustomTypeData @@ -88,12 +89,13 @@ public: int index; int type; }; + QAbstractDynamicMetaObject root; QList<QString> primitives; QList<float> floatData; QList<int> intData; QList<CustomTypeData> customTypeData; QList<QByteArray> datas; - QList<QMetaObject *> mos; + QList<QMetaObject *> synthesizedMetaObjects; QList<QmlParser::Location> locations; QList<QmlInstruction> bytecode; @@ -118,7 +120,6 @@ public: QList<QmlError> errors() const; static bool isValidId(const QString &); - static bool isBinding(const QString &); static bool isAttachedProperty(const QByteArray &); enum StoreInstructionResult { Ok, UnknownType, InvalidData, ReadOnly }; diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index df5f90e..91bf1c0 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -44,6 +44,7 @@ #include <private/qmlengine_p.h> #include <qmlengine.h> #include <qscriptengine.h> +#include <QtCore/qvarlengtharray.h> #include <qdebug.h> @@ -53,7 +54,8 @@ QT_BEGIN_NAMESPACE QmlContextPrivate::QmlContextPrivate() - : parent(0), engine(0), highPriorityCount(0), startLine(-1), endLine(-1) +: parent(0), engine(0), notifyIndex(-1), highPriorityCount(0), + startLine(-1), endLine(-1) { } @@ -65,21 +67,26 @@ void QmlContextPrivate::dump() void QmlContextPrivate::dump(int depth) { QByteArray ba(depth * 4, ' '); - qWarning() << ba << properties.keys(); - qWarning() << ba << variantProperties.keys(); if (parent) parent->d_func()->dump(depth + 1); } void QmlContextPrivate::destroyed(QObject *obj) { + Q_Q(QmlContext); + defaultObjects.removeAll(obj); - for (QHash<QString, QObject *>::Iterator iter = properties.begin(); - iter != properties.end(); ) { - if (*iter == obj) - iter = properties.erase(iter); - else - ++iter; + + QVariant variantObject = QVariant::fromValue(obj); + QVarLengthArray<int> notifies; + for (int ii = 0; ii < propertyValues.count(); ++ii) { + if (propertyValues.at(ii) == variantObject) { + propertyValues[ii] = QVariant(); + notifies.append(ii); + } + } + for (int ii = 0; ii < notifies.count(); ++ii) { + QMetaObject::activate(q, notifies[ii] + notifyIndex, 0); } } @@ -314,7 +321,22 @@ void QmlContext::addDefaultObject(QObject *object) void QmlContext::setContextProperty(const QString &name, const QVariant &value) { Q_D(QmlContext); - d->variantProperties.insert(name, value); + if (d->notifyIndex == -1) + d->notifyIndex = this->metaObject()->methodCount(); + + if (QmlMetaType::isObject(value.userType())) { + QObject *o = QmlMetaType::toQObject(value); + setContextProperty(name, o); + } else { + QHash<QString, int>::ConstIterator iter = d->propertyNames.find(name); + if(iter == d->propertyNames.end()) { + d->propertyNames.insert(name, d->propertyValues.count()); + d->propertyValues.append(value); + } else { + d->propertyValues[*iter] = value; + QMetaObject::activate(this, *iter + d->notifyIndex, 0); + } + } } /*! @@ -325,8 +347,26 @@ void QmlContext::setContextProperty(const QString &name, const QVariant &value) void QmlContext::setContextProperty(const QString &name, QObject *value) { Q_D(QmlContext); - d->properties.insert(name, value); - QObject::connect(value, SIGNAL(destroyed(QObject*)), this, SLOT(objectDestroyed(QObject*))); + if (d->notifyIndex == -1) + d->notifyIndex = this->metaObject()->methodCount(); + + QObject::connect(value, SIGNAL(destroyed(QObject*)), + this, SLOT(objectDestroyed(QObject*))); + + QHash<QString, int>::ConstIterator iter = d->propertyNames.find(name); + if(iter == d->propertyNames.end()) { + d->propertyNames.insert(name, d->propertyValues.count()); + d->propertyValues.append(QVariant::fromValue(value)); + } else { + int idx = *iter; + if (QmlMetaType::isObject(d->propertyValues.at(idx).userType())) { + QObject *old = QmlMetaType::toQObject(d->propertyValues.at(idx)); + QObject::disconnect(old, SIGNAL(destroyed(QObject*)), + this, SLOT(objectDestroyed(QObject*))); + } + d->propertyValues[*iter] = QVariant::fromValue(value); + QMetaObject::activate(this, *iter + d->notifyIndex, 0); + } } /*! diff --git a/src/declarative/qml/qmlcontext_p.h b/src/declarative/qml/qmlcontext_p.h index f527bb8..6f1e486 100644 --- a/src/declarative/qml/qmlcontext_p.h +++ b/src/declarative/qml/qmlcontext_p.h @@ -64,8 +64,10 @@ public: QmlContext *parent; QmlEngine *engine; - QHash<QString, QObject *> properties; - QHash<QString, QVariant> variantProperties; + + QHash<QString, int> propertyNames; + QList<QVariant> propertyValues; + int notifyIndex; QObjectList defaultObjects; int highPriorityCount; diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp index 06035b0..e864df9 100644 --- a/src/declarative/qml/qmlcustomparser.cpp +++ b/src/declarative/qml/qmlcustomparser.cpp @@ -138,7 +138,7 @@ QmlCustomParserNodePrivate::fromProperty(QmlParser::Property *p) QmlCustomParserNode node = fromObject(v->object); prop.d->values << QVariant::fromValue(node); } else { - prop.d->values << QVariant::fromValue(v->primitive); + prop.d->values << QVariant::fromValue(v->primitive()); } } diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 4e754a3..673520e 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -398,6 +398,30 @@ void QmlDomProperty::setValue(const QmlDomValue &value) qWarning("QmlDomProperty::setValue(const QmlDomValue &): Not Implemented"); } +/*! + Returns the position in the input data where the property ID startd, or 0 if + the property is invalid. +*/ +int QmlDomProperty::position() const +{ + if (d && d->property) { + return d->property->location.range.offset; + } else + return 0; +} + +/*! + Returns the length in the input data from where the property ID started upto + the end of it, or 0 if the property is invalid. +*/ +int QmlDomProperty::length() const +{ + if (d && d->property) + return d->property->location.range.length; + else + return 0; +} + QmlDomObjectPrivate::QmlDomObjectPrivate() : object(0), isVirtualComponent(false) { @@ -732,6 +756,30 @@ QmlDomComponent QmlDomObject::toComponent() const return rv; } +/*! + Returns the position in the input data where the property assignment started +, or 0 if the property is invalid. +*/ +int QmlDomObject::position() const +{ + if (d && d->object) + return d->object->location.range.offset; + else + return 0; +} + +/*! + Returns the length in the input data from where the property assignment star +ted upto the end of it, or 0 if the property is invalid. +*/ +int QmlDomObject::length() const +{ + if (d && d->object) + return d->object->location.range.length; + else + return 0; +} + QmlDomBasicValuePrivate::QmlDomBasicValuePrivate() : value(0) { @@ -809,7 +857,7 @@ Rect { x: 10 } */ QString QmlDomValueLiteral::literal() const { - if (d->value) return d->value->primitive; + if (d->value) return d->value->primitive(); else return QString(); } @@ -878,7 +926,7 @@ Rect { x: Other.x } QString QmlDomValueBinding::binding() const { if (d->value) - return d->value->primitive.mid(1, d->value->primitive.length() - 2); + return d->value->value.asScript(); else return QString(); } @@ -1254,6 +1302,30 @@ QmlDomList QmlDomValue::toList() const } /*! + Returns the position in the input data where the property value startd, or 0 + if the value is invalid. +*/ +int QmlDomValue::position() const +{ + if (type() == Invalid) + return 0; + else + return d->value->location.range.offset; +} + +/*! + Returns the length in the input data from where the property value started u +pto the end of it, or 0 if the value is invalid. +*/ +int QmlDomValue::length() const +{ + if (type() == Invalid) + return 0; + else + return d->value->location.range.length; +} + +/*! \class QmlDomList \internal \brief The QmlDomList class represents a list of values assigned to a QML property. diff --git a/src/declarative/qml/qmldom.h b/src/declarative/qml/qmldom.h index 8b503fa..04ce8b9 100644 --- a/src/declarative/qml/qmldom.h +++ b/src/declarative/qml/qmldom.h @@ -99,6 +99,9 @@ public: QmlDomValue value() const; void setValue(const QmlDomValue &); + int position() const; + int length() const; + private: friend class QmlDomObject; QSharedDataPointer<QmlDomPropertyPrivate> d; @@ -134,6 +137,9 @@ public: bool isComponent() const; QmlDomComponent toComponent() const; + int position() const; + int length() const; + private: friend class QmlDomDocument; friend class QmlDomComponent; @@ -236,6 +242,9 @@ public: QmlDomObject toObject() const; QmlDomList toList() const; + int position() const; + int length() const; + private: friend class QmlDomProperty; friend class QmlDomList; diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index c39a0d5..227aeb0 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -211,6 +211,30 @@ QmlContext *QmlEnginePrivate::setCurrentBindContext(QmlContext *c) return old; } +QmlEnginePrivate::CapturedProperty::CapturedProperty(QObject *obj, int n) +: object(obj), notifyIndex(n) +{ +} + +QmlEnginePrivate::CapturedProperty::CapturedProperty(const QmlMetaProperty &p) +: object(p.object()), name(p.name()), notifyIndex(p.property().notifySignalIndex()) +{ +} + +QmlEnginePrivate::CapturedProperty::CapturedProperty(const CapturedProperty &o) +: object(o.object), name(o.name), notifyIndex(o.notifyIndex) +{ +} + +QmlEnginePrivate::CapturedProperty & +QmlEnginePrivate::CapturedProperty::operator=(const CapturedProperty &o) +{ + object = o.object; + name = o.name; + notifyIndex = o.notifyIndex; + return *this; +} + //////////////////////////////////////////////////////////////////// typedef QHash<QPair<const QMetaObject *, QString>, bool> FunctionCache; Q_GLOBAL_STATIC(FunctionCache, functionCache); @@ -268,7 +292,8 @@ QScriptValue QmlEnginePrivate::propertyObject(const QScriptString &propName, return scriptEngine.newVariant(qVariantFromValue(prop)); } else { QVariant var = prop.read(); - capturedProperties << prop; + if (prop.needsChangedNotifier()) + capturedProperties << CapturedProperty(prop); QObject *varobj = QmlMetaType::toQObject(var); if (!varobj) varobj = qvariant_cast<QObject *>(var); @@ -318,7 +343,8 @@ bool QmlEnginePrivate::fetchCache(QmlBasicScriptNodeCache &cache, const QString if (!prop.isValid()) return false; - capturedProperties << prop; + if (prop.needsChangedNotifier()) + capturedProperties << CapturedProperty(prop); if (prop.type() & QmlMetaProperty::Attached) { @@ -357,16 +383,15 @@ bool QmlEnginePrivate::fetchCache(QmlBasicScriptNodeCache &cache, const QString bool QmlEnginePrivate::loadCache(QmlBasicScriptNodeCache &cache, const QString &propName, QmlContextPrivate *context) { while(context) { - if (context->variantProperties.contains(propName)) { + + QHash<QString, int>::ConstIterator iter = + context->propertyNames.find(propName); + if (iter != context->propertyNames.end()) { cache.object = 0; cache.type = QmlBasicScriptNodeCache::Variant; cache.context = context; - return true; - } - - if (context->properties.contains(propName)) { - cache.object = context->properties[propName]; - cache.type = QmlBasicScriptNodeCache::Explicit; + cache.contextIndex = *iter; + capturedProperties << CapturedProperty(context->q_ptr, *iter + context->notifyIndex); return true; } @@ -621,9 +646,7 @@ QNetworkAccessManager *QmlEngine::networkAccessManager() const Returns the QmlContext for the \a object, or 0 if no context has been set. When the QmlEngine instantiates a QObject, the context is set automatically. - - \sa qmlContext() - */ + */ QmlContext *QmlEngine::contextForObject(const QObject *object) { if(!object) @@ -1045,13 +1068,14 @@ QVariant QmlExpression::value() log.setResult(rv); for (int ii = 0; ii < ep->capturedProperties.count(); ++ii) { - const QmlMetaProperty &prop = + const QmlEnginePrivate::CapturedProperty &prop = ep->capturedProperties.at(ii); - if (prop.hasChangedNotifier()) { - prop.connectNotifier(d->proxy, changedIndex); - } else if (prop.needsChangedNotifier()) { - QString warn = QLatin1String("Expression depends on property without a NOTIFY signal: [") + QLatin1String(prop.object()->metaObject()->className()) + QLatin1String("].") + prop.name(); + if (prop.notifyIndex != -1) { + QMetaObject::connect(prop.object, prop.notifyIndex, + d->proxy, changedIndex); + } else { + QString warn = QLatin1String("Expression depends on property without a NOTIFY signal: [") + QLatin1String(prop.object->metaObject()->className()) + QLatin1String("].") + prop.name; log.addWarning(warn); } } @@ -1059,11 +1083,12 @@ QVariant QmlExpression::value() } else { for (int ii = 0; ii < ep->capturedProperties.count(); ++ii) { - const QmlMetaProperty &prop = + const QmlEnginePrivate::CapturedProperty &prop = ep->capturedProperties.at(ii); - if (prop.hasChangedNotifier()) - prop.connectNotifier(d->proxy, changedIndex); + if (prop.notifyIndex != -1) + QMetaObject::connect(prop.object, prop.notifyIndex, + d->proxy, changedIndex); } } } else { @@ -1254,13 +1279,10 @@ QmlContextScriptClass::queryProperty(const QScriptValue &object, #endif *id = InvalidId; - if (bindContext->d_func()->variantProperties.contains(propName)) { + if (bindContext->d_func()->propertyNames.contains(propName)) { rv |= HandlesReadAccess; *id = VariantPropertyId; - } else if (bindContext->d_func()->properties.contains(propName)) { - rv |= HandlesReadAccess; - *id = ObjectListPropertyId; - } + } for (int ii = 0; !rv && ii < bindContext->d_func()->defaultObjects.count(); ++ii) { rv = engine->d_func()->queryObject(propName, id, @@ -1295,22 +1317,19 @@ QScriptValue QmlContextScriptClass::property(const QScriptValue &object, case VariantPropertyId: { QString propName = name.toString(); - QScriptValue rv = scriptEngine->newVariant(bindContext->d_func()->variantProperties[propName]); + int index = bindContext->d_func()->propertyNames.value(propName); + QVariant value = bindContext->d_func()->propertyValues.at(index); #ifdef PROPERTY_DEBUG qWarning() << "Context Property: Resolved property" << propName << "to context variant property list" << bindContext <<". Value:" << rv.toVariant(); #endif - return rv; - } - case ObjectListPropertyId: - { - QString propName = name.toString(); - QObject *o = bindContext->d_func()->properties[propName]; - QScriptValue rv = scriptEngine->newObject(engine->d_func()->objectClass, scriptEngine->newVariant(QVariant::fromValue(o))); -#ifdef PROPERTY_DEBUG - qWarning() << "Context Property: Resolved property" << propName - << "to context object property list" << bindContext <<". Value:" << rv.toVariant(); -#endif + QScriptValue rv; + if (QmlMetaType::isObject(value.userType())) { + rv = scriptEngine->newObject(engine->d_func()->objectClass, scriptEngine->newVariant(value)); + } else { + rv = scriptEngine->newVariant(value); + } + engine->d_func()->capturedProperties << QmlEnginePrivate::CapturedProperty(bindContext, index + bindContext->d_func()->notifyIndex); return rv; } default: diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h index 9402fa9..7578fdf 100644 --- a/src/declarative/qml/qmlengine_p.h +++ b/src/declarative/qml/qmlengine_p.h @@ -89,7 +89,17 @@ public: QScriptClass::QueryFlags queryObject(const QString &name, uint *id, QObject *); QScriptValue propertyObject(const QScriptString &propName, QObject *, uint id = 0); - QList<QmlMetaProperty> capturedProperties; + struct CapturedProperty { + CapturedProperty(QObject *, int); + CapturedProperty(const QmlMetaProperty &); + CapturedProperty(const CapturedProperty &); + CapturedProperty &operator=(const CapturedProperty &); + + QObject *object; + QString name; + int notifyIndex; + }; + QList<CapturedProperty> capturedProperties; QmlContext *rootContext; QmlContext *currentBindContext; @@ -172,7 +182,6 @@ public: { InvalidId = -1, - ObjectListPropertyId = 0xC0000000, FunctionId = 0x80000000, VariantPropertyId = 0x40000000, PropertyId = 0x00000000, diff --git a/src/declarative/qml/qmlinstruction_p.h b/src/declarative/qml/qmlinstruction_p.h index 86bddf8..f465e9f 100644 --- a/src/declarative/qml/qmlinstruction_p.h +++ b/src/declarative/qml/qmlinstruction_p.h @@ -281,6 +281,7 @@ public: struct { int count; int endLine; + int metaObject; } createComponent; struct { int id; diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp index 2bd41e2..bafdb02 100644 --- a/src/declarative/qml/qmlparser.cpp +++ b/src/declarative/qml/qmlparser.cpp @@ -233,14 +233,102 @@ void QmlParser::Value::dump(int indent) const case Value::Id: type = "Id"; break; - }; + } + + QByteArray primType; + switch(this->value.type()) { + default: + case Variant::Invalid: + primType = "Invalid"; + break; + case Variant::Boolean: + primType = "Boolean"; + break; + case Variant::Number: + primType = "Number"; + break; + case Variant::String: + primType = "String"; + break; + case Variant::Script: + primType = "Script"; + break; + } QByteArray ba(indent * 4, ' '); if (object) { qWarning() << ba.constData() << "Value (" << type << "):"; object->dump(indent + 1); } else { - qWarning() << ba.constData() << "Value (" << type << "):" << primitive; + qWarning() << ba.constData() << "Value (" << type << "):" << primType.constData() << primitive(); + } +} + +QmlParser::Variant::Variant() +: t(Invalid) {} + +QmlParser::Variant::Variant(const Variant &o) +: t(o.t), d(o.d), s(o.s) +{ +} + +QmlParser::Variant::Variant(bool v) +: t(Boolean), b(v) +{ +} + +QmlParser::Variant::Variant(double v) +: t(Number), d(v) +{ +} + +QmlParser::Variant::Variant(const QString &v, Type type) +: t(type), s(v) +{ + Q_ASSERT(type == String || type == Script); +} + +QmlParser::Variant &QmlParser::Variant::operator=(const Variant &o) +{ + t = o.t; + d = o.d; + s = o.s; + return *this; +} + +QmlParser::Variant::Type QmlParser::Variant::type() const +{ + return t; +} + +bool QmlParser::Variant::asBoolean() const +{ + return b; +} + +QString QmlParser::Variant::asString() const +{ + return s; +} + +double QmlParser::Variant::asNumber() const +{ + return d; +} + +QString QmlParser::Variant::asScript() const +{ + switch(type()) { + default: + case Invalid: + return QString(); + case Boolean: + return b?QLatin1String("true"):QLatin1String("false"); + case Number: + return QString::number(d); + case String: + case Script: + return s; } } diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h index 31f8702..f25a76b 100644 --- a/src/declarative/qml/qmlparser_p.h +++ b/src/declarative/qml/qmlparser_p.h @@ -74,10 +74,18 @@ namespace QmlParser int column; }; + struct LocationRange + { + LocationRange() : offset(0), length(0) {} + quint32 offset; + quint32 length; + }; + struct LocationSpan { Location start; Location end; + LocationRange range; }; class Property; @@ -152,6 +160,45 @@ namespace QmlParser void dump(int = 0) const; }; + class Variant + { + public: + enum Type { + Invalid, + Boolean, + Number, + String, + Script + }; + + Variant(); + Variant(const Variant &); + Variant(bool); + Variant(double); + Variant(const QString &, Type = String); + Variant &operator=(const Variant &); + + Type type() const; + + bool isBoolean() const { return type() == Boolean; } + bool isNumber() const { return type() == Number; } + bool isString() const { return type() == String; } + bool isScript() const { return type() == Script; } + + bool asBoolean() const; + QString asString() const; + double asNumber() const; + QString asScript() const; + + private: + Type t; + union { + bool b; + double d; + }; + QString s; + }; + class Value : public QmlRefCount { public: @@ -180,8 +227,11 @@ namespace QmlParser }; Type type; + // ### Temporary + QString primitive() const { return value.asScript(); } + // Primitive value - QString primitive; + Variant value; // Object value Object *object; diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 169e2ea..ae4e903 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -74,8 +74,8 @@ protected: AST::SourceLocation typeLocation, LocationSpan location, AST::UiObjectInitializer *initializer = 0); - QString getPrimitive(const QByteArray &propertyName, AST::ExpressionNode *expr); - void defineProperty(const QString &propertyName, const LocationSpan &location, const QString &primitive); + + QmlParser::Variant getVariant(AST::ExpressionNode *expr); LocationSpan location(AST::SourceLocation start, AST::SourceLocation end); LocationSpan location(AST::UiQualifiedId *); @@ -305,15 +305,22 @@ Object *ProcessAST::defineObjectBinding(int line, QString propertyName = asString(scriptBinding->qualifiedId); if (propertyName == QLatin1String("script")) { QString script; + if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(scriptBinding->statement)) { - script = getPrimitive("script", stmt->expression); + script = getVariant(stmt->expression).asScript(); } else { script = asString(scriptBinding->statement); } LocationSpan l = this->location(scriptBinding->statement->firstSourceLocation(), scriptBinding->statement->lastSourceLocation()); - defineProperty(QLatin1String("script"), l, script); + + _stateStack.pushProperty(QLatin1String("script"), l); + Value *value = new Value; + value->value = QmlParser::Variant(script); + value->location = l; + currentProperty()->addValue(value); + _stateStack.pop(); } else { accept(it->member); } @@ -339,19 +346,11 @@ LocationSpan ProcessAST::location(AST::SourceLocation start, AST::SourceLocation rv.start.column = start.startColumn; rv.end.line = end.startLine; rv.end.column = end.startColumn + end.length - 1; + rv.range.offset = start.offset; + rv.range.length = end.offset + end.length - start.offset; return rv; } -void ProcessAST::defineProperty(const QString &propertyName, const LocationSpan &location, const QString &primitive) -{ - _stateStack.pushProperty(propertyName, location); - Value *value = new Value; - value->primitive = primitive; - value->location = location; - currentProperty()->addValue(value); - _stateStack.pop(); -} - // UiProgram: UiImportListOpt UiObjectMemberList ; bool ProcessAST::visit(AST::UiProgram *node) { @@ -436,7 +435,7 @@ bool ProcessAST::visit(AST::UiPublicMember *node) Value *value = new Value; value->location = location(node->expression->firstSourceLocation(), node->expression->lastSourceLocation()); - value->primitive = getPrimitive("value", node->expression); + value->value = getVariant(node->expression); property.defaultValue->values << value; } @@ -480,30 +479,26 @@ bool ProcessAST::visit(AST::UiObjectBinding *node) return false; } -QString ProcessAST::getPrimitive(const QByteArray &propertyName, AST::ExpressionNode *expr) +QmlParser::Variant ProcessAST::getVariant(AST::ExpressionNode *expr) { - QString primitive; - - if (isSignalProperty(propertyName)) { - primitive = asString(expr); - } else if (propertyName == "id" && expr && expr->kind == AST::Node::Kind_IdentifierExpression) { - primitive = asString(expr); - } else if (AST::StringLiteral *lit = AST::cast<AST::StringLiteral *>(expr)) { - // hack: emulate weird XML feature that string literals are not quoted. - //This needs to be fixed in the qmlcompiler once xml goes away. - primitive = lit->value->asString(); - } else if (expr->kind == AST::Node::Kind_TrueLiteral - || expr->kind == AST::Node::Kind_FalseLiteral - || expr->kind == AST::Node::Kind_NumericLiteral - ) { - primitive = asString(expr); + if (AST::StringLiteral *lit = AST::cast<AST::StringLiteral *>(expr)) { + return QmlParser::Variant(lit->value->asString()); + } else if (expr->kind == AST::Node::Kind_TrueLiteral) { + return QmlParser::Variant(true); + } else if (expr->kind == AST::Node::Kind_FalseLiteral) { + return QmlParser::Variant(false); + } else if (AST::NumericLiteral *lit = AST::cast<AST::NumericLiteral *>(expr)) { + return QmlParser::Variant(lit->value); } else { - // create a binding - primitive += QLatin1Char('{'); - primitive += asString(expr); - primitive += QLatin1Char('}'); + + if (AST::UnaryMinusExpression *unaryMinus = AST::cast<AST::UnaryMinusExpression *>(expr)) { + if (AST::NumericLiteral *lit = AST::cast<AST::NumericLiteral *>(unaryMinus->expression)) { + return QmlParser::Variant(-lit->value); + } + } + + return QmlParser::Variant(asString(expr), QmlParser::Variant::Script); } - return primitive; } @@ -519,25 +514,18 @@ bool ProcessAST::visit(AST::UiScriptBinding *node) } Property *prop = currentProperty(); - QString primitive; + + QmlParser::Variant primitive; if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(node->statement)) { - primitive = getPrimitive(prop->name, stmt->expression); - } else if (isSignalProperty(prop->name)) { - if (AST::Block *block = AST::cast<AST::Block *>(node->statement)) { - const int start = block->lbraceToken.offset + block->rbraceToken.length; - primitive += _contents.mid(start, block->rbraceToken.offset - start); - } else { - primitive += asString(node->statement); - } + primitive = getVariant(stmt->expression); } else { // do binding - primitive += QLatin1Char('{'); - primitive += asString(node->statement); - primitive += QLatin1Char('}'); + primitive = QmlParser::Variant(asString(node->statement), + QmlParser::Variant::Script); } Value *v = new Value; - v->primitive = primitive; + v->value = primitive; v->location = location(node->statement->firstSourceLocation(), node->statement->lastSourceLocation()); @@ -616,7 +604,7 @@ bool ProcessAST::visit(AST::UiSourceElement *node) Value *value = new Value; value->location = location(node->firstSourceLocation(), node->lastSourceLocation()); - value->primitive = source; + value->value = QmlParser::Variant(source); obj->getDefaultProperty()->addValue(value); } diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index e42b2fc..5e0f257 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -215,7 +215,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in const QList<QmlCompiledComponent::TypeReference> &types = comp->types; const QList<QString> &primitives = comp->primitives; const QList<QByteArray> &datas = comp->datas; - const QList<QMetaObject *> &mos = comp->mos; + const QList<QMetaObject *> &synthesizedMetaObjects = comp->synthesizedMetaObjects;; const QList<QmlCompiledData::CustomTypeData> &customTypeData = comp->customTypeData; #ifdef Q_ENABLE_PERFORMANCE_LOG @@ -334,7 +334,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in QFxCompilerTimer<QFxCompiler::InstrStoreMetaObject> cc; #endif QObject *target = stack.top(); - new QmlVMEMetaObject(target, mos.at(instr.storeMeta.data), &comp->primitives, instr.storeMeta.slotData, comp); + new QmlVMEMetaObject(target, synthesizedMetaObjects.at(instr.storeMeta.data), &comp->primitives, instr.storeMeta.slotData, comp); } break; diff --git a/src/declarative/qml/script/qmlbasicscript.cpp b/src/declarative/qml/script/qmlbasicscript.cpp index 129db7e..e0a668a 100644 --- a/src/declarative/qml/script/qmlbasicscript.cpp +++ b/src/declarative/qml/script/qmlbasicscript.cpp @@ -72,15 +72,9 @@ QDebug operator<<(QDebug lhs, const QmlBasicScriptNodeCache &rhs) case QmlBasicScriptNodeCache::SignalProperty: lhs << "SignalProperty" << rhs.object << rhs.core; break; - case QmlBasicScriptNodeCache::Explicit: - lhs << "Explicit" << rhs.object; - break; case QmlBasicScriptNodeCache::Variant: lhs << "Variant" << rhs.context; break; - case QmlBasicScriptNodeCache::ScriptValue: - lhs << "ScriptValue" << rhs.context; - break; } return lhs; @@ -210,15 +204,8 @@ QVariant QmlBasicScriptNodeCache::value(const char *name) const break; case SignalProperty: break; - case Explicit: - return qVariantFromValue(object); - break; case Variant: - return toObjectOrVariant(context->variantProperties[QLatin1String(name)]); - break; - case ScriptValue: - return qVariantFromValue(context->properties[QLatin1String(name)]); - break; + return context->propertyValues[contextIndex]; }; return QVariant(); } @@ -705,7 +692,7 @@ void QmlBasicScript::clearCache(void *voidCache) reinterpret_cast<QmlBasicScriptNodeCache *>(voidCache); for (int ii = 0; ii < d->stateSize; ++ii) { - if (!dataCache[ii].isCore() && !dataCache[ii].isExplicit() && + if (!dataCache[ii].isCore() && !dataCache[ii].isVariant() && dataCache[ii].object) { QMetaObject::removeGuard(&dataCache[ii].object); dataCache[ii].object = 0; @@ -717,7 +704,7 @@ void QmlBasicScript::clearCache(void *voidCache) void QmlBasicScript::guard(QmlBasicScriptNodeCache &n) { if (n.object) { - if (n.isExplicit()) { + if (n.isVariant()) { } else if (n.isCore()) { n.metaObject = n.object->metaObject(); diff --git a/src/declarative/qml/script/qmlbasicscript_p.h b/src/declarative/qml/script/qmlbasicscript_p.h index fb9951e..3b7e966 100644 --- a/src/declarative/qml/script/qmlbasicscript_p.h +++ b/src/declarative/qml/script/qmlbasicscript_p.h @@ -29,19 +29,19 @@ public: Attached, Signal, SignalProperty, - Explicit, - Variant, - ScriptValue } type; + 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 isExplicit() const { return type == Explicit; } + bool isVariant() const { return type == Variant; } void clear(); QVariant value(const char *) const; }; diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp index 230d30b..4020593 100644 --- a/src/gui/painting/qdrawutil.cpp +++ b/src/gui/painting/qdrawutil.cpp @@ -1039,7 +1039,7 @@ void qDrawItem(QPainter *p, Qt::GUIStyle gs, #endif /*! - \struct QMargins + \class QMargins \since 4.6 Holds the borders used to split a pixmap into nine segments in order to @@ -1050,7 +1050,7 @@ void qDrawItem(QPainter *p, Qt::GUIStyle gs, */ /*! - \struct QTileRules + \class QTileRules \since 4.6 Holds the rules used to draw a pixmap or image split into nine segments, diff --git a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp index c63caf4..9a14abb 100644 --- a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp +++ b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp @@ -164,21 +164,63 @@ public: { } + virtual void valueChanged() { + changed = true; + } bool changed; }; void tst_qmlbindengine::contextPropertiesTriggerReeval() { QmlContext context(engine.rootContext()); + MyQmlObject object1; + MyQmlObject object2; + + object1.setStringProperty("Hello"); + object2.setStringProperty("World"); + context.setContextProperty("testProp", QVariant(1)); + context.setContextProperty("testObj", &object1); - MyExpression expr(&context, "testProp + 1"); - QCOMPARE(expr.changed, false); - QCOMPARE(expr.value(), QVariant(2)); + { + MyExpression expr(&context, "testProp + 1"); + QCOMPARE(expr.changed, false); + QCOMPARE(expr.value(), QVariant(2)); - context.setContextProperty("testProp", QVariant(2)); - QCOMPARE(expr.changed, true); - QCOMPARE(expr.value(), QVariant(3)); + context.setContextProperty("testProp", QVariant(2)); + QCOMPARE(expr.changed, true); + QCOMPARE(expr.value(), QVariant(3)); + } + + { + MyExpression expr(&context, "testProp + testProp + testProp"); + QCOMPARE(expr.changed, false); + QCOMPARE(expr.value(), QVariant(6)); + + context.setContextProperty("testProp", QVariant(4)); + QCOMPARE(expr.changed, true); + QCOMPARE(expr.value(), QVariant(12)); + } + + { + MyExpression expr(&context, "testObj.stringProperty"); + QCOMPARE(expr.changed, false); + QCOMPARE(expr.value(), QVariant("Hello")); + + context.setContextProperty("testObj", &object2); + QCOMPARE(expr.changed, true); + QCOMPARE(expr.value(), QVariant("World")); + } + + { + MyExpression expr(&context, "testObj.stringProperty /**/"); + QCOMPARE(expr.changed, false); + QCOMPARE(expr.value(), QVariant("World")); + + context.setContextProperty("testObj", &object1); + QCOMPARE(expr.changed, true); + QCOMPARE(expr.value(), QVariant("Hello")); + } } QTEST_MAIN(tst_qmlbindengine) |