[JAEGER] Added JSOP_DOUBLE.
authorDavid Anderson <danderson@mozilla.com>
Tue, 25 May 2010 22:42:43 -0700
changeset 52605 0f15e5db7b31c8012fed45f3a041079ea22b96cf
parent 52604 6d5526c51d107f087836a9ff0715bb711a2a6b23
child 52606 4895c5845d1e7ed4257de975f8742a0504d21cf6
push idunknown
push userunknown
push dateunknown
milestone1.9.3a5pre
[JAEGER] Added JSOP_DOUBLE.
js/src/methodjit/CodeGen_NaN32.cpp
js/src/methodjit/Compiler.cpp
--- a/js/src/methodjit/CodeGen_NaN32.cpp
+++ b/js/src/methodjit/CodeGen_NaN32.cpp
@@ -64,17 +64,17 @@ CodeGenerator::CodeGenerator(MacroAssemb
 
 void
 CodeGenerator::storeJsval(const Value &v, Address address)
 {
     jsval_layout jv;
     jv.asBits = Jsvalify(v);
 
     masm.store32(Imm32(jv.s.mask32), Address(address.base, address.offset + TAG_OFFSET));
-    if (!v.isNullOrUndefined())
+    if (!v.isUndefined())
         masm.store32(Imm32(jv.s.payload.u32), Address(address.base, address.offset + PAYLOAD_OFFSET));
 }
 
 void
 CodeGenerator::storeValue(FrameEntry *fe, Address address, bool popped)
 {
     if (fe->isConstant()) {
         storeJsval(fe->getValue(), address);
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -211,16 +211,25 @@ mjit::Compiler::generateMethod()
             Jump j = masm.jump();
             jumpInScript(j, PC + GET_JUMP_OFFSET(PC));
           }
           END_CASE(JSOP_GOTO)
 
           BEGIN_CASE(JSOP_TRACE)
           END_CASE(JSOP_TRACE)
 
+          BEGIN_CASE(JSOP_DOUBLE)
+          {
+            uint32 index = fullAtomIndex(PC);
+            JSAtom *atom = script->getAtom(index);
+            double d = *ATOM_TO_DOUBLE(atom);
+            frame.push(Value(DoubleTag(d)));
+          }
+          END_CASE(JSOP_DOUBLE)
+
           BEGIN_CASE(JSOP_ZERO)
             frame.push(JSVAL_ZERO);
           END_CASE(JSOP_ZERO)
 
           BEGIN_CASE(JSOP_ONE)
             frame.push(JSVAL_ONE);
           END_CASE(JSOP_ONE)