mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fixed _thisfrag not being set in beginAssembly
This commit is contained in:
commit
490d9eb8b5
@ -116,14 +116,6 @@ namespace nanojit
|
||||
Assembler::Assembler(Fragmento* frago)
|
||||
: _frago(frago)
|
||||
, _gc(frago->core()->gc)
|
||||
, _thisfrag(NULL)
|
||||
, _branchStateMap(NULL)
|
||||
, _latestGuard(NULL)
|
||||
, _functions(NULL)
|
||||
, _nIns(NULL)
|
||||
, _nExitIns(NULL)
|
||||
, _nativePages(NULL)
|
||||
, _nativeExitPages(NULL)
|
||||
{
|
||||
AvmCore *core = frago->core();
|
||||
nInit(core);
|
||||
|
@ -46,7 +46,7 @@ namespace nanojit
|
||||
/**
|
||||
* This is the main control center for creating and managing fragments.
|
||||
*/
|
||||
Fragmento::Fragmento(AvmCore* core) : _pageList(NULL), _allocList(core->GetGC())
|
||||
Fragmento::Fragmento(AvmCore* core) : _allocList(core->GetGC())
|
||||
{
|
||||
_core = core;
|
||||
GC *gc = core->GetGC();
|
||||
|
@ -83,19 +83,13 @@ public:
|
||||
inline void*
|
||||
Alloc(uint32_t pages)
|
||||
{
|
||||
#if defined DARWIN
|
||||
return valloc(pages * kNativePageSize);
|
||||
#else
|
||||
void* p = malloc((pages + 1) * kNativePageSize);
|
||||
p = (void*)(((int)(((char*)p) + kNativePageSize - 1)) & (~0xfff));
|
||||
return p;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void
|
||||
Free(void* p)
|
||||
{
|
||||
// @todo: don't know how to free
|
||||
free(p);
|
||||
}
|
||||
|
||||
};
|
||||
@ -108,13 +102,13 @@ public:
|
||||
static inline void*
|
||||
Alloc(uint32_t bytes)
|
||||
{
|
||||
return malloc(bytes);
|
||||
return calloc(1, bytes);
|
||||
}
|
||||
|
||||
static inline void
|
||||
Free(void* p)
|
||||
{
|
||||
//free(p);
|
||||
free(p);
|
||||
}
|
||||
|
||||
static inline GCHeap*
|
||||
@ -127,7 +121,7 @@ public:
|
||||
inline void*
|
||||
operator new(size_t size, GC* gc)
|
||||
{
|
||||
return malloc(size);
|
||||
return GC::Alloc(size);
|
||||
}
|
||||
|
||||
#define DWB(x) x
|
||||
|
Loading…
Reference in New Issue
Block a user