Bug 509893 - Convert NInsList to SeqBuilder<> and Allocator, r=gal.
authorEdwin Smith <edwsmith@adobe.com>
Tue, 04 Aug 2009 13:21:15 -0400
changeset 31514 c015eb0ab91d0bf36bb67758aefe3254cb547df5
parent 31513 a9b159ffb3868e6ccbc6fa3e111270abe2f22f4c
child 31515 39aeb2d502f0a9ef339d3d4198eb917c35e61022
push id8556
push userrsayre@mozilla.com
push dateThu, 13 Aug 2009 21:38:45 +0000
treeherderautoland@9734564871cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgal
bugs509893
milestone1.9.2a2pre
Bug 509893 - Convert NInsList to SeqBuilder<> and Allocator, r=gal.
js/src/nanojit/Assembler.cpp
js/src/nanojit/Assembler.h
js/src/nanojit/LIR.cpp
--- a/js/src/nanojit/Assembler.cpp
+++ b/js/src/nanojit/Assembler.cpp
@@ -786,19 +786,18 @@ namespace nanojit
         NIns* SOT = 0;
         if (frag->isRoot()) {
             SOT = frag->loopEntry;
             verbose_only( verbose_outputf("%010lx:", (unsigned long)_nIns); )
         } else {
             SOT = frag->root->fragEntry;
         }
         AvmAssert(SOT);
-        while(!loopJumps.isEmpty())
-        {
-            NIns* loopJump = (NIns*)loopJumps.removeLast();
+        for (Seq<NIns*>* p = loopJumps.get(); p != NULL; p = p->tail) {
+            NIns* loopJump = p->head;
             verbose_only( verbose_outputf("## patching branch at %010lx to %010lx",
                                           loopJump, SOT); )
             nPatchBranch(loopJump, SOT);
         }
 
         NIns* fragEntry = genPrologue();
         verbose_only( outputAddr=true; )
         verbose_only( asm_output("[prologue]"); )
--- a/js/src/nanojit/Assembler.h
+++ b/js/src/nanojit/Assembler.h
@@ -106,17 +106,17 @@ namespace nanojit
         ,RegionFull
         ,MaxLength
         ,MaxExit
         ,MaxXJump
         ,UnknownPrim
         ,UnknownBranch
     };
 
-    typedef avmplus::List<NIns*, avmplus::LIST_NonGCObjects> NInsList;
+    typedef SeqBuilder<NIns*> NInsList;
     typedef HashMap<NIns*, LIns*> NInsMap;
 
     class LabelState
     {
     public:
         RegAlloc regs;
         NIns *addr;
         LabelState(NIns *a, RegAlloc &r) : regs(r), addr(a)
--- a/js/src/nanojit/LIR.cpp
+++ b/js/src/nanojit/LIR.cpp
@@ -2030,17 +2030,17 @@ namespace nanojit
         })
 
         /* Set up the generic text output cache for the assembler */
         verbose_only( StringList asmOutput(alloc); )
         verbose_only( assm->_outputCache = &asmOutput; )
 
         bool treeCompile = core->config.tree_opt && (triggerFrag->kind == BranchTrace);
         RegAllocMap regMap(alloc);
-        NInsList loopJumps(gc);
+        NInsList loopJumps(alloc);
 #ifdef MEMORY_INFO
 //        loopJumps.set_meminfo_name("LIR loopjumps");
 #endif
         assm->beginAssembly(triggerFrag, &regMap);
         if (assm->error())
             return;
 
         //logc->printf("recompile trigger %X kind %d\n", (int)triggerFrag, triggerFrag->kind);