~ubuntu-branches/ubuntu/lucid/seamonkey/lucid-security

« back to all changes in this revision

Viewing changes to js/src/jsemit.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2008-07-29 21:29:02 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080729212902-spm9kpvchp9udwbw
Tags: 1.1.11+nobinonly-0ubuntu1
* New security upstream release: 1.1.11 (LP: #218534)
  Fixes USN-602-1, USN-619-1, USN-623-1 and USN-629-1
* Refresh diverged patch:
  - update debian/patches/80_security_build.patch
* Fix FTBFS with missing -lfontconfig
  - add debian/patches/11_fix_ftbfs_with_fontconfig.patch
  - update debian/patches/series
* Build with default gcc (hardy: 4.2, intrepid: 4.3)
  - update debian/rules
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
5355
5355
                ReportStatementTooLarge(cx, cg);
5356
5356
                return JS_FALSE;
5357
5357
            }
 
5358
            if (pn2->pn_type == TOK_NAME && pn2->pn_op != JSOP_SETNAME) {
 
5359
                /*
 
5360
                 * x getter = y where x is a local or let variable is not
 
5361
                 * supported.
 
5362
                 */
 
5363
                js_ReportCompileErrorNumber(cx,
 
5364
                                            pn2, JSREPORT_PN | JSREPORT_ERROR,
 
5365
                                            JSMSG_BAD_GETTER_OR_SETTER,
 
5366
                                            (op == JSOP_GETTER)
 
5367
                                            ? js_getter_str
 
5368
                                            : js_setter_str);
 
5369
                return JS_FALSE;
 
5370
            }
5358
5371
        } else
5359
5372
#endif
5360
5373
        /* If += or similar, dup the left operand and get its value. */
5433
5446
        /* Finally, emit the specialized assignment bytecode. */
5434
5447
        switch (pn2->pn_type) {
5435
5448
          case TOK_NAME:
5436
 
            if (pn2->pn_slot < 0 || !(pn2->pn_attrs & JSPROP_READONLY)) {
5437
 
                if (pn2->pn_slot >= 0) {
 
5449
            if (pn2->pn_slot >= 0) {
 
5450
                if (!(pn2->pn_attrs & JSPROP_READONLY))
5438
5451
                    EMIT_UINT16_IMM_OP(pn2->pn_op, atomIndex);
5439
 
                } else {
 
5452
                break;
 
5453
            }
 
5454
            // FALL THROUGH
5440
5455
          case TOK_DOT:
5441
 
                    EMIT_ATOM_INDEX_OP(pn2->pn_op, atomIndex);
5442
 
                }
5443
 
            }
 
5456
            EMIT_ATOM_INDEX_OP(pn2->pn_op, atomIndex);
5444
5457
            break;
5445
5458
          case TOK_LB:
5446
5459
#if JS_HAS_LVALUE_RETURN
5721
5734
 
5722
5735
        /*
5723
5736
         * Allocate another stack slot for GC protection in case the initial
5724
 
         * value being post-incremented or -decremented is not a number, but
5725
 
         * converts to a jsdouble.  In the TOK_NAME cases, op has 0 operand
 
5737
         * value being incremented or decremented is not a number, but
 
5738
         * converts to a jsdouble. In the TOK_NAME cases, op has 0 operand
5726
5739
         * uses and 1 definition, so we don't need an extra stack slot -- we
5727
5740
         * can use the one allocated for the def.
5728
5741
         */
5729
5742
        if (pn2->pn_type != TOK_NAME &&
5730
 
            (js_CodeSpec[op].format & JOF_POST) &&
 
5743
            (js_CodeSpec[op].format & (JOF_INC | JOF_DEC)) &&
5731
5744
            (uintN)depth == cg->maxStackDepth) {
5732
5745
            ++cg->maxStackDepth;
5733
5746
        }