Replace Allocator with Alloc or AllocOnly where possible

This commit is contained in:
Joshua Warner 2014-05-05 07:31:52 -06:00
parent fa1e3d74c0
commit 4d79f3bea1
12 changed files with 22 additions and 22 deletions

View File

@ -20,7 +20,7 @@ class Zone;
namespace avian {
namespace util {
class Allocator;
class Alloc;
}
namespace codegen {
@ -143,7 +143,7 @@ class Architecture {
unsigned cSize,
OperandMask& cMask) = 0;
virtual Assembler* makeAssembler(util::Allocator*, vm::Zone*) = 0;
virtual Assembler* makeAssembler(util::Alloc*, vm::Zone*) = 0;
virtual void acquire() = 0;
virtual void release() = 0;

View File

@ -99,7 +99,7 @@ class Slice {
return slice;
}
void resize(Allocator* a, size_t newCount)
void resize(Alloc* a, size_t newCount)
{
Slice<T> slice(clone(a, newCount));
a->free(items, count);

View File

@ -26,7 +26,7 @@ namespace vm {
class Vector {
public:
Vector(avian::util::Aborter* a,
avian::util::Allocator* allocator,
avian::util::Alloc* allocator,
size_t minimumCapacity)
: a(a),
allocator(allocator),
@ -175,7 +175,7 @@ class Vector {
}
avian::util::Aborter* a;
avian::util::Allocator* allocator;
avian::util::Alloc* allocator;
avian::util::Slice<uint8_t> data;
size_t position;
size_t minimumCapacity;

View File

@ -15,20 +15,20 @@
namespace avian {
namespace util {
class Allocator;
class AllocOnly;
}
}
namespace vm {
uint8_t* decodeLZMA(System* s,
avian::util::Allocator* a,
avian::util::AllocOnly* a,
uint8_t* in,
unsigned inSize,
unsigned* outSize);
uint8_t* encodeLZMA(System* s,
avian::util::Allocator* a,
avian::util::AllocOnly* a,
uint8_t* in,
unsigned inSize,
unsigned* outSize);

View File

@ -619,7 +619,7 @@ class MyArchitecture : public Architecture {
}
}
virtual Assembler* makeAssembler(Allocator* allocator, Zone* zone);
virtual Assembler* makeAssembler(Alloc* allocator, Zone* zone);
virtual void acquire()
{
@ -639,7 +639,7 @@ class MyArchitecture : public Architecture {
class MyAssembler : public Assembler {
public:
MyAssembler(System* s, Allocator* a, Zone* zone, MyArchitecture* arch)
MyAssembler(System* s, Alloc* a, Zone* zone, MyArchitecture* arch)
: con(s, a, zone), arch_(arch)
{
}
@ -1075,7 +1075,7 @@ class MyAssembler : public Assembler {
MyArchitecture* arch_;
};
Assembler* MyArchitecture::makeAssembler(Allocator* allocator, Zone* zone)
Assembler* MyArchitecture::makeAssembler(Alloc* allocator, Zone* zone)
{
return new (zone) MyAssembler(this->con.s, allocator, zone, this);
}

View File

@ -15,7 +15,7 @@ namespace avian {
namespace codegen {
namespace arm {
Context::Context(vm::System* s, util::Allocator* a, vm::Zone* zone)
Context::Context(vm::System* s, util::Alloc* a, vm::Zone* zone)
: s(s),
zone(zone),
client(0),

View File

@ -24,7 +24,7 @@ namespace avian {
namespace util {
class Aborter;
class Allocator;
class Alloc;
} // namespace util
namespace codegen {
@ -37,7 +37,7 @@ class ConstantPoolEntry;
class Context {
public:
Context(vm::System* s, util::Allocator* a, vm::Zone* zone);
Context(vm::System* s, util::Alloc* a, vm::Zone* zone);
vm::System* s;
vm::Zone* zone;

View File

@ -887,7 +887,7 @@ class MyArchitecture : public Architecture {
}
}
virtual Assembler* makeAssembler(util::Allocator* allocator, Zone* zone);
virtual Assembler* makeAssembler(util::Alloc* allocator, Zone* zone);
virtual void acquire()
{
@ -908,7 +908,7 @@ class MyArchitecture : public Architecture {
class MyAssembler : public Assembler {
public:
MyAssembler(System* s, util::Allocator* a, Zone* zone, MyArchitecture* arch)
MyAssembler(System* s, util::Alloc* a, Zone* zone, MyArchitecture* arch)
: c(s, a, zone, &(arch->c)), arch_(arch)
{
}
@ -1273,7 +1273,7 @@ class MyAssembler : public Assembler {
MyArchitecture* arch_;
};
Assembler* MyArchitecture::makeAssembler(util::Allocator* allocator, Zone* zone)
Assembler* MyArchitecture::makeAssembler(util::Alloc* allocator, Zone* zone)
{
return new (zone) MyAssembler(c.s, allocator, zone, this);
}

View File

@ -24,7 +24,7 @@ ArchitectureContext::ArchitectureContext(vm::System* s, bool useNativeFeatures)
}
Context::Context(vm::System* s,
util::Allocator* a,
util::Alloc* a,
vm::Zone* zone,
ArchitectureContext* ac)
: s(s),

View File

@ -26,7 +26,7 @@
namespace vm {
class System;
class Allocator;
class Alloc;
class Zone;
} // namespace vm
@ -80,7 +80,7 @@ class ArchitectureContext {
class Context {
public:
Context(vm::System* s,
util::Allocator* a,
util::Alloc* a,
vm::Zone* zone,
ArchitectureContext* ac);

View File

@ -27,7 +27,7 @@ int32_t read4(const uint8_t* in)
namespace vm {
uint8_t* decodeLZMA(System* s,
avian::util::Allocator* a,
avian::util::AllocOnly* a,
uint8_t* in,
unsigned inSize,
unsigned* outSize)

View File

@ -25,7 +25,7 @@ SRes myProgress(void*, UInt64, UInt64)
namespace vm {
uint8_t* encodeLZMA(System* s,
Allocator* a,
AllocOnly* a,
uint8_t* in,
unsigned inSize,
unsigned* outSize)