mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Replace Allocator with Alloc or AllocOnly where possible
This commit is contained in:
@ -20,7 +20,7 @@ class Zone;
|
|||||||
namespace avian {
|
namespace avian {
|
||||||
|
|
||||||
namespace util {
|
namespace util {
|
||||||
class Allocator;
|
class Alloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
@ -143,7 +143,7 @@ class Architecture {
|
|||||||
unsigned cSize,
|
unsigned cSize,
|
||||||
OperandMask& cMask) = 0;
|
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 acquire() = 0;
|
||||||
virtual void release() = 0;
|
virtual void release() = 0;
|
||||||
|
@ -99,7 +99,7 @@ class Slice {
|
|||||||
return slice;
|
return slice;
|
||||||
}
|
}
|
||||||
|
|
||||||
void resize(Allocator* a, size_t newCount)
|
void resize(Alloc* a, size_t newCount)
|
||||||
{
|
{
|
||||||
Slice<T> slice(clone(a, newCount));
|
Slice<T> slice(clone(a, newCount));
|
||||||
a->free(items, count);
|
a->free(items, count);
|
||||||
|
@ -26,7 +26,7 @@ namespace vm {
|
|||||||
class Vector {
|
class Vector {
|
||||||
public:
|
public:
|
||||||
Vector(avian::util::Aborter* a,
|
Vector(avian::util::Aborter* a,
|
||||||
avian::util::Allocator* allocator,
|
avian::util::Alloc* allocator,
|
||||||
size_t minimumCapacity)
|
size_t minimumCapacity)
|
||||||
: a(a),
|
: a(a),
|
||||||
allocator(allocator),
|
allocator(allocator),
|
||||||
@ -175,7 +175,7 @@ class Vector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
avian::util::Aborter* a;
|
avian::util::Aborter* a;
|
||||||
avian::util::Allocator* allocator;
|
avian::util::Alloc* allocator;
|
||||||
avian::util::Slice<uint8_t> data;
|
avian::util::Slice<uint8_t> data;
|
||||||
size_t position;
|
size_t position;
|
||||||
size_t minimumCapacity;
|
size_t minimumCapacity;
|
||||||
|
@ -15,20 +15,20 @@
|
|||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace util {
|
namespace util {
|
||||||
class Allocator;
|
class AllocOnly;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace vm {
|
namespace vm {
|
||||||
|
|
||||||
uint8_t* decodeLZMA(System* s,
|
uint8_t* decodeLZMA(System* s,
|
||||||
avian::util::Allocator* a,
|
avian::util::AllocOnly* a,
|
||||||
uint8_t* in,
|
uint8_t* in,
|
||||||
unsigned inSize,
|
unsigned inSize,
|
||||||
unsigned* outSize);
|
unsigned* outSize);
|
||||||
|
|
||||||
uint8_t* encodeLZMA(System* s,
|
uint8_t* encodeLZMA(System* s,
|
||||||
avian::util::Allocator* a,
|
avian::util::AllocOnly* a,
|
||||||
uint8_t* in,
|
uint8_t* in,
|
||||||
unsigned inSize,
|
unsigned inSize,
|
||||||
unsigned* outSize);
|
unsigned* outSize);
|
||||||
|
@ -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()
|
virtual void acquire()
|
||||||
{
|
{
|
||||||
@ -639,7 +639,7 @@ class MyArchitecture : public Architecture {
|
|||||||
|
|
||||||
class MyAssembler : public Assembler {
|
class MyAssembler : public Assembler {
|
||||||
public:
|
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)
|
: con(s, a, zone), arch_(arch)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -1075,7 +1075,7 @@ class MyAssembler : public Assembler {
|
|||||||
MyArchitecture* arch_;
|
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);
|
return new (zone) MyAssembler(this->con.s, allocator, zone, this);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace avian {
|
|||||||
namespace codegen {
|
namespace codegen {
|
||||||
namespace arm {
|
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),
|
: s(s),
|
||||||
zone(zone),
|
zone(zone),
|
||||||
client(0),
|
client(0),
|
||||||
|
@ -24,7 +24,7 @@ namespace avian {
|
|||||||
|
|
||||||
namespace util {
|
namespace util {
|
||||||
class Aborter;
|
class Aborter;
|
||||||
class Allocator;
|
class Alloc;
|
||||||
} // namespace util
|
} // namespace util
|
||||||
|
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
@ -37,7 +37,7 @@ class ConstantPoolEntry;
|
|||||||
|
|
||||||
class Context {
|
class Context {
|
||||||
public:
|
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::System* s;
|
||||||
vm::Zone* zone;
|
vm::Zone* zone;
|
||||||
|
@ -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()
|
virtual void acquire()
|
||||||
{
|
{
|
||||||
@ -908,7 +908,7 @@ class MyArchitecture : public Architecture {
|
|||||||
|
|
||||||
class MyAssembler : public Assembler {
|
class MyAssembler : public Assembler {
|
||||||
public:
|
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)
|
: c(s, a, zone, &(arch->c)), arch_(arch)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -1273,7 +1273,7 @@ class MyAssembler : public Assembler {
|
|||||||
MyArchitecture* arch_;
|
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);
|
return new (zone) MyAssembler(c.s, allocator, zone, this);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ ArchitectureContext::ArchitectureContext(vm::System* s, bool useNativeFeatures)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Context::Context(vm::System* s,
|
Context::Context(vm::System* s,
|
||||||
util::Allocator* a,
|
util::Alloc* a,
|
||||||
vm::Zone* zone,
|
vm::Zone* zone,
|
||||||
ArchitectureContext* ac)
|
ArchitectureContext* ac)
|
||||||
: s(s),
|
: s(s),
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
namespace vm {
|
namespace vm {
|
||||||
class System;
|
class System;
|
||||||
class Allocator;
|
class Alloc;
|
||||||
class Zone;
|
class Zone;
|
||||||
} // namespace vm
|
} // namespace vm
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ class ArchitectureContext {
|
|||||||
class Context {
|
class Context {
|
||||||
public:
|
public:
|
||||||
Context(vm::System* s,
|
Context(vm::System* s,
|
||||||
util::Allocator* a,
|
util::Alloc* a,
|
||||||
vm::Zone* zone,
|
vm::Zone* zone,
|
||||||
ArchitectureContext* ac);
|
ArchitectureContext* ac);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ int32_t read4(const uint8_t* in)
|
|||||||
namespace vm {
|
namespace vm {
|
||||||
|
|
||||||
uint8_t* decodeLZMA(System* s,
|
uint8_t* decodeLZMA(System* s,
|
||||||
avian::util::Allocator* a,
|
avian::util::AllocOnly* a,
|
||||||
uint8_t* in,
|
uint8_t* in,
|
||||||
unsigned inSize,
|
unsigned inSize,
|
||||||
unsigned* outSize)
|
unsigned* outSize)
|
||||||
|
@ -25,7 +25,7 @@ SRes myProgress(void*, UInt64, UInt64)
|
|||||||
namespace vm {
|
namespace vm {
|
||||||
|
|
||||||
uint8_t* encodeLZMA(System* s,
|
uint8_t* encodeLZMA(System* s,
|
||||||
Allocator* a,
|
AllocOnly* a,
|
||||||
uint8_t* in,
|
uint8_t* in,
|
||||||
unsigned inSize,
|
unsigned inSize,
|
||||||
unsigned* outSize)
|
unsigned* outSize)
|
||||||
|
Reference in New Issue
Block a user