Ticket #221: declarative.diff

File declarative.diff, 4.4 KB (added by rudi, 13 years ago)

Updated patch

  • declarative.pro

     
    11TARGET     = QtDeclarative
     2os2:TARGET_SHORT = QtDecl
    23QPRO_PWD   = $$PWD
    34QT         = core gui script network
    45contains(QT_CONFIG, svg): QT += svg
  • qml/qdeclarativeparser_p.h

     
    274274        union {
    275275            bool b;
    276276            double d;
     277            qint64 l;
    277278            QDeclarativeJS::AST::Node *n;
    278279        };
    279280        QString s;
  • qml/parser/qdeclarativejsparser_p.h

     
    8080    union Value {
    8181      int ival;
    8282      double dval;
     83      qint64 llval;
    8384      NameId *sval;
    8485      AST::ArgumentList *ArgumentList;
    8586      AST::CaseBlock *CaseBlock;
     
    216217
    217218    struct SavedToken {
    218219       int token;
    219        double dval;
     220       qint64 lval;
    220221       AST::SourceLocation loc;
    221222    };
    222223
    223     double yylval;
     224    qint64 yylval;
    224225    AST::SourceLocation yylloc;
    225226    AST::SourceLocation yyprevlloc;
    226227
  • qml/parser/qdeclarativejsparser.cpp

     
    168168
    169169            if (first_token == last_token) {
    170170                yytoken = lexer->lex();
    171                 yylval = lexer->dval();
     171                yylval = lexer->llval();
    172172                yylloc = location(lexer);
    173173            } else {
    174174                yytoken = first_token->token;
    175                 yylval = first_token->dval;
     175                yylval = first_token->lval;
    176176                yylloc = first_token->loc;
    177177                ++first_token;
    178178            }
     
    182182        if (action > 0) {
    183183            if (action != ACCEPT_STATE) {
    184184                yytoken = -1;
    185                 sym(1).dval = yylval;
     185                sym(1).llval = yylval;
    186186                loc(1) = yylloc;
    187187            } else {
    188188              --tos;
     
    17891789        if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
    17901790            SavedToken &tk = token_buffer[0];
    17911791            tk.token = yytoken;
    1792             tk.dval = yylval;
     1792            tk.lval = yylval;
    17931793            tk.loc = yylloc;
    17941794
    17951795            yylloc = yyprevlloc;
     
    18141814        hadErrors = true;
    18151815
    18161816        token_buffer[0].token = yytoken;
    1817         token_buffer[0].dval = yylval;
     1817        token_buffer[0].lval = yylval;
    18181818        token_buffer[0].loc = yylloc;
    18191819
    18201820        token_buffer[1].token = yytoken = lexer->lex();
    1821         token_buffer[1].dval  = yylval  = lexer->dval();
     1821        token_buffer[1].lval  = yylval  = lexer->llval();
    18221822        token_buffer[1].loc   = yylloc  = location(lexer);
    18231823
    18241824        if (t_action(errorState, yytoken)) {
  • qml/parser/qdeclarativejslexer_p.h

     
    195195    inline int ival() const { return qsyylval.ival; }
    196196    inline double dval() const { return qsyylval.dval; }
    197197    inline NameId *ustr() const { return qsyylval.ustr; }
     198    inline qint64 llval() const { return qsyylval.llval; }
    198199
    199200    const QChar *characterBuffer() const { return buffer16; }
    200201    int characterCount() const { return pos16; }
     
    219220    union {
    220221        int ival;
    221222        double dval;
     223        qint64 llval;
    222224        NameId *ustr;
    223225    } qsyylval;
    224226
  • qml/qdeclarativeparser.cpp

     
    259259: t(Invalid) {}
    260260
    261261QDeclarativeParser::Variant::Variant(const Variant &o)
    262 : t(o.t), d(o.d), s(o.s)
     262: t(o.t), l(o.l), s(o.s)
    263263{
    264264}
    265265
     
    286286QDeclarativeParser::Variant &QDeclarativeParser::Variant::operator=(const Variant &o)
    287287{
    288288    t = o.t;
    289     d = o.d;
     289    l = o.l;
    290290    s = o.s;
    291291    return *this;
    292292}