diff options
author | dos-reis <gdr@axiomatics.org> | 2010-08-29 04:25:45 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-08-29 04:25:45 +0000 |
commit | 871c6f7c1422155b3263455e291e6eaace27af87 (patch) | |
tree | b75edc04e4a185cf7230e261dc269ba50f78d231 /src/utils/sexpr.cc | |
parent | ac04b468720e2d7804c4d23eb9c4560f14ad2228 (diff) | |
download | open-axiom-871c6f7c1422155b3263455e291e6eaace27af87.tar.gz |
* utils/Makefile.in ($(oa_target_oalib)): Create contaning
directory if necessary.
* utils/storage.H (Memory::Factory): New. Allocate, construct,
and destroy objects.
* utils/sexpr.H (Sexpr::Allocator): Use Memory::Factory.
* utils/sexpr.cc: Adjust implementation.
Diffstat (limited to 'src/utils/sexpr.cc')
-rw-r--r-- | src/utils/sexpr.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/sexpr.cc b/src/utils/sexpr.cc index 248c0649..4910f053 100644 --- a/src/utils/sexpr.cc +++ b/src/utils/sexpr.cc @@ -395,7 +395,7 @@ namespace OpenAxiom { // --------------- // -- Allocator -- // --------------- - Allocator::Allocator() : lists(4 * 1024), vectors(1024) { } + Allocator::Allocator() { } // This destructor is defined here so that it provides // a single instantiation point for destructors of all @@ -446,14 +446,14 @@ namespace OpenAxiom { Allocator::make_list(const std::vector<const Syntax*>& elts) { if (elts.empty()) return &empty_list; - return new(lists.allocate(1)) List(elts); + return lists.make(elts); } const Vector* Allocator::make_vector(const std::vector<const Syntax*>& elts) { if (elts.empty()) return &empty_vector; - return new(vectors.allocate(1)) Vector(elts); + return vectors.make(elts); } // ------------ |