diff --git a/include/avian/codegen/architecture.h b/include/avian/codegen/architecture.h index 91a41551f0..b1cd7e8013 100644 --- a/include/avian/codegen/architecture.h +++ b/include/avian/codegen/architecture.h @@ -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; diff --git a/include/avian/util/slice.h b/include/avian/util/slice.h index 13930bc8a6..a5003f1ac5 100644 --- a/include/avian/util/slice.h +++ b/include/avian/util/slice.h @@ -99,7 +99,7 @@ class Slice { return slice; } - void resize(Allocator* a, size_t newCount) + void resize(Alloc* a, size_t newCount) { Slice slice(clone(a, newCount)); a->free(items, count); diff --git a/src/avian/alloc-vector.h b/src/avian/alloc-vector.h index a859864d7c..29b82f1551 100644 --- a/src/avian/alloc-vector.h +++ b/src/avian/alloc-vector.h @@ -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 data; size_t position; size_t minimumCapacity; diff --git a/src/avian/lzma.h b/src/avian/lzma.h index 12642ded3f..7d6ec23ec7 100644 --- a/src/avian/lzma.h +++ b/src/avian/lzma.h @@ -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); diff --git a/src/codegen/target/arm/assembler.cpp b/src/codegen/target/arm/assembler.cpp index 9f9b0dcfce..7de408deba 100644 --- a/src/codegen/target/arm/assembler.cpp +++ b/src/codegen/target/arm/assembler.cpp @@ -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); } diff --git a/src/codegen/target/arm/context.cpp b/src/codegen/target/arm/context.cpp index 1c2757abbc..a690caf410 100644 --- a/src/codegen/target/arm/context.cpp +++ b/src/codegen/target/arm/context.cpp @@ -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), diff --git a/src/codegen/target/arm/context.h b/src/codegen/target/arm/context.h index 15d3c2e0f0..45d937da9b 100644 --- a/src/codegen/target/arm/context.h +++ b/src/codegen/target/arm/context.h @@ -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; diff --git a/src/codegen/target/x86/assembler.cpp b/src/codegen/target/x86/assembler.cpp index e124a97a85..e9ada91b2e 100644 --- a/src/codegen/target/x86/assembler.cpp +++ b/src/codegen/target/x86/assembler.cpp @@ -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); } diff --git a/src/codegen/target/x86/context.cpp b/src/codegen/target/x86/context.cpp index 93cdef29cd..c86e5734ef 100644 --- a/src/codegen/target/x86/context.cpp +++ b/src/codegen/target/x86/context.cpp @@ -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), diff --git a/src/codegen/target/x86/context.h b/src/codegen/target/x86/context.h index 9a1eb912b8..93a6f1cc5b 100644 --- a/src/codegen/target/x86/context.h +++ b/src/codegen/target/x86/context.h @@ -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); diff --git a/src/lzma-decode.cpp b/src/lzma-decode.cpp index a1af7ae9fc..0630eda03d 100644 --- a/src/lzma-decode.cpp +++ b/src/lzma-decode.cpp @@ -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) diff --git a/src/lzma-encode.cpp b/src/lzma-encode.cpp index 8dc26586a3..cfaf3f3512 100644 --- a/src/lzma-encode.cpp +++ b/src/lzma-encode.cpp @@ -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)