Fix warnings, no bug. r=dvander
authorBrian Hackett <bhackett1024@gmail.com>
Wed, 18 Jan 2012 18:08:22 -0800
changeset 86077 84b48b4d62a1dcdce5d8b415b4979e3a72c4c365
parent 86076 aba1658ce66cf41eaf0a4fad9b817c73ed58c73f
child 86078 78a8aeae5b30f3c7cb7768bfae2645bf75743212
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
milestone12.0a1
Fix warnings, no bug. r=dvander
js/src/methodjit/InvokeHelpers.cpp
js/src/methodjit/MethodJIT.h
js/src/methodjit/StubCalls.cpp
--- a/js/src/methodjit/InvokeHelpers.cpp
+++ b/js/src/methodjit/InvokeHelpers.cpp
@@ -692,17 +692,17 @@ void JS_FASTCALL
 stubs::ScriptProbeOnlyEpilogue(VMFrame &f)
 {
     Probes::exitJSFun(f.cx, f.fp()->fun(), f.fp()->script());
 }
 
 void JS_FASTCALL
 stubs::CrossChunkShim(VMFrame &f, void *edge_)
 {
-    CrossChunkEdge *edge = (CrossChunkEdge *) edge_;
+    DebugOnly<CrossChunkEdge*> edge = (CrossChunkEdge *) edge_;
 
     mjit::ExpandInlineFrames(f.cx->compartment);
 
     JSScript *script = f.script();
     JS_ASSERT(edge->target < script->length);
     JS_ASSERT(script->code + edge->target == f.pc());
 
     CompileStatus status = CanMethodJIT(f.cx, script, f.pc(), f.fp()->isConstructing(),
--- a/js/src/methodjit/MethodJIT.h
+++ b/js/src/methodjit/MethodJIT.h
@@ -744,16 +744,18 @@ struct ChunkDescriptor
     uint32_t begin;
     uint32_t end;
 
     /* Use counter for the chunk. */
     uint32_t counter;
 
     /* Optional compiled code for the chunk. */
     JITChunk *chunk;
+
+    ChunkDescriptor() { PodZero(this); }
 };
 
 /* Jump or fallthrough edge in the bytecode which crosses a chunk boundary. */
 struct CrossChunkEdge
 {
     /* Bytecode offsets of the source and target of the edge. */
     uint32_t source;
     uint32_t target;
@@ -770,16 +772,18 @@ struct CrossChunkEdge
     void *targetLabel;
 
     /*
      * Location of a shim which will transfer control to the interpreter at the
      * target bytecode. The source jumps are patched to jump to this label if
      * the source is compiled but not the target.
      */
     void *shimLabel;
+
+    CrossChunkEdge() { PodZero(this); }
 };
 
 struct JITScript
 {
     JSScript        *script;
 
     void            *invokeEntry;       /* invoke address */
     void            *fastEntry;         /* cached entry, fastest */
--- a/js/src/methodjit/StubCalls.cpp
+++ b/js/src/methodjit/StubCalls.cpp
@@ -1564,17 +1564,17 @@ stubs::LookupSwitch(VMFrame &f, jsbyteco
     return FindNativeCode(f, jpc + GET_JUMP_OFFSET(jpc));
 }
 
 void * JS_FASTCALL
 stubs::TableSwitch(VMFrame &f, jsbytecode *origPc)
 {
     jsbytecode * const originalPC = origPc;
 
-    JSOp op = JSOp(*originalPC);
+    DebugOnly<JSOp> op = JSOp(*originalPC);
     JS_ASSERT(op == JSOP_TABLESWITCH);
 
     uint32_t jumpOffset = GET_JUMP_OFFSET(originalPC);
     jsbytecode *pc = originalPC + JUMP_OFFSET_LEN;
     
     /* Note: compiler adjusts the stack beforehand. */
     Value rval = f.regs.sp[-1];