mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 509885 - Convert NInsMap to Allocator, r=gal.
--HG-- extra : rebase_source : 3586f950b5698052af74081f8f986f32dc57fa68
This commit is contained in:
parent
77e519e3e4
commit
3a5203b81c
@ -155,7 +155,6 @@ namespace nanojit
|
||||
: hasLoop(0)
|
||||
, codeList(0)
|
||||
, alloc(alloc)
|
||||
, core(core)
|
||||
, _codeAlloc(codeAlloc)
|
||||
, config(core->config)
|
||||
{
|
||||
@ -741,19 +740,18 @@ namespace nanojit
|
||||
verbose_only(_thisfrag->compileNbr++; )
|
||||
_inExit = false;
|
||||
|
||||
GC* gc = core->gc;
|
||||
LabelStateMap labels(alloc);
|
||||
NInsMap patches(_gc);
|
||||
NInsMap patches(alloc);
|
||||
gen(prev, loopJumps, labels, patches);
|
||||
frag->loopEntry = _nIns;
|
||||
//nj_dprintf(stderr, "assemble frag %X entry %X\n", (int)frag, (int)frag->fragEntry);
|
||||
|
||||
if (!error()) {
|
||||
// patch all branches
|
||||
while (!patches.isEmpty())
|
||||
{
|
||||
NIns* where = patches.lastKey();
|
||||
LInsp targ = patches.removeLast();
|
||||
NInsMap::Iter iter(patches);
|
||||
while (iter.next()) {
|
||||
NIns* where = iter.key();
|
||||
LIns* targ = iter.value();
|
||||
LabelState *label = labels.get(targ);
|
||||
NIns* ntarg = label->addr;
|
||||
if (ntarg) {
|
||||
|
@ -112,8 +112,7 @@ namespace nanojit
|
||||
};
|
||||
|
||||
typedef avmplus::List<NIns*, avmplus::LIST_NonGCObjects> NInsList;
|
||||
typedef avmplus::SortedMap<LIns*,NIns*,avmplus::LIST_NonGCObjects> InsMap;
|
||||
typedef avmplus::SortedMap<NIns*,LIns*,avmplus::LIST_NonGCObjects> NInsMap;
|
||||
typedef HashMap<NIns*, LIns*> NInsMap;
|
||||
|
||||
class LabelState
|
||||
{
|
||||
@ -240,7 +239,6 @@ namespace nanojit
|
||||
}
|
||||
|
||||
Allocator &alloc;
|
||||
AvmCore *core;
|
||||
CodeAlloc& _codeAlloc;
|
||||
avmplus::GC* _gc;
|
||||
DWB(Fragment*) _thisfrag;
|
||||
|
Loading…
Reference in New Issue
Block a user