Fix MSVC warnings.
authorDavid Mandelin <dmandelin@mozilla.com>
Mon, 03 Jan 2011 13:25:17 -0800
changeset 59987 06351b16cca13816a5af60fd0d2683b56531fb78
parent 59986 9fa77ffd11459e9f81052e2bc428376fd41cfaa1
child 59988 2e57743aeca6de8bc42a91045f55865d4fbfb4e6
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b9pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix MSVC warnings.
js/src/jsscript.cpp
js/src/jsscript.h
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -470,17 +470,17 @@ js_XDRScript(JSXDRState *xdr, JSScript *
             JSAtom *name;
             if (xdr->mode == JSXDR_ENCODE)
                 name = JS_LOCAL_NAME_TO_ATOM(names[i]);
             if (!js_XDRAtom(xdr, &name))
                 return false;
             if (xdr->mode == JSXDR_DECODE) {
                 BindingKind kind = (i < nargs)
                                    ? ARGUMENT
-                                   : (i < nargs + nvars)
+                                   : (i < uintN(nargs + nvars))
                                    ? (bitmap[i >> JS_BITS_PER_UINT32_LOG2] &
                                       JS_BIT(i & (JS_BITS_PER_UINT32 - 1))
                                       ? CONSTANT
                                       : VARIABLE)
                                    : UPVAR;
                 if (!bindings.add(cx, name, kind))
                     return false;
             }
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -153,17 +153,17 @@ struct GlobalSlotArray {
     struct Entry {
         uint32      atomIndex;  /* index into atom table */
         uint32      slot;       /* global obj slot number */
     };
     Entry           *vector;
     uint32          length;
 };
 
-class Shape;
+struct Shape;
 
 enum BindingKind { NONE, ARGUMENT, VARIABLE, CONSTANT, UPVAR };
 
 /*
  * Formal parameters, local variables, and upvars are stored in a shape tree
  * path encapsulated within this class.  This class represents bindings for
  * both function and top-level scripts (the latter is needed to track names in
  * strict mode eval code, to give such code its own lexical environment).