Bug 947587 - fix non-ion builds r=bhackett a=NPOTB
authorJan de Mooij <jdemooij@mozilla.com>
Sun, 15 Dec 2013 19:46:34 +0100
changeset 174304 143420a8de2c77d5f789e56ecdfbf03a6d3634e2
parent 174303 c6eb37cebcd9e985507cda1ef33eefab1156fa61
child 174305 050d4121ba7baf5c3e4f2d295633eaf62607563b
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett, NPOTB
bugs947587
milestone28.0a2
Bug 947587 - fix non-ion builds r=bhackett a=NPOTB
js/src/jsapi.cpp
js/src/jsinfer.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -4255,17 +4255,17 @@ struct AutoLastFrameCheck
 #if defined(HAVE_GETC_UNLOCKED)
 # define fast_getc getc_unlocked
 #elif defined(HAVE__GETC_NOLOCK)
 # define fast_getc _getc_nolock
 #else
 # define fast_getc getc
 #endif
 
-typedef Vector<char, 8, TempAllocPolicy> FileContents;
+typedef js::Vector<char, 8, TempAllocPolicy> FileContents;
 
 static bool
 ReadCompleteFile(JSContext *cx, FILE *fp, FileContents &buffer)
 {
     /* Get the complete length of the file, if possible. */
     struct stat st;
     int ok = fstat(fileno(fp), &st);
     if (ok != 0)
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -577,32 +577,32 @@ class types::CompilerConstraintList
         TemporaryTypeSet *bytecodeTypes;
     };
 
   private:
 
     // OOM during generation of some constraint.
     bool failed_;
 
+#ifdef JS_ION
     // Allocator used for constraints.
     LifoAlloc *alloc_;
 
-#ifdef JS_ION
     // Constraints generated on heap properties.
     Vector<CompilerConstraint *, 0, jit::IonAllocPolicy> constraints;
 
     // Scripts whose stack type sets were frozen for the compilation.
     Vector<FrozenScript, 1, jit::IonAllocPolicy> frozenScripts;
 #endif
 
   public:
     CompilerConstraintList(jit::TempAllocator &alloc)
       : failed_(false)
+#ifdef JS_ION
       , alloc_(alloc.lifoAlloc())
-#ifdef JS_ION
       , constraints(alloc)
       , frozenScripts(alloc)
 #endif
     {}
 
     void add(CompilerConstraint *constraint) {
 #ifdef JS_ION
         if (!constraint || !constraints.append(constraint))
@@ -664,24 +664,32 @@ class types::CompilerConstraintList
 
     bool failed() {
         return failed_;
     }
     void setFailed() {
         failed_ = true;
     }
     LifoAlloc *alloc() const {
+#ifdef JS_ION
         return alloc_;
+#else
+        MOZ_CRASH();
+#endif
     }
 };
 
 CompilerConstraintList *
 types::NewCompilerConstraintList(jit::TempAllocator &alloc)
 {
+#ifdef JS_ION
     return alloc.lifoAlloc()->new_<CompilerConstraintList>(alloc);
+#else
+    MOZ_CRASH();
+#endif
 }
 
 /* static */ bool
 TypeScript::FreezeTypeSets(CompilerConstraintList *constraints, JSScript *script,
                            TemporaryTypeSet **pThisTypes,
                            TemporaryTypeSet **pArgTypes,
                            TemporaryTypeSet **pBytecodeTypes)
 {