diff options
author | Gabriel Dos Reis <GabrielDosReis@users.noreply.github.com> | 2022-08-14 12:27:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-14 12:27:19 -0700 |
commit | fcbc13e8dbdd934e02299ca31f001f95fcfdb45c (patch) | |
tree | e64f37713e433f6fb8b26c9f59a86d395f5dd8cb /src/rt/Lisp.cc | |
parent | 03bd43a9cd709a46cfa5785173ef8884f109c2b4 (diff) | |
parent | 988f87a691af3c38ac6773b8c77b9a60d39f6aba (diff) | |
download | open-axiom-fcbc13e8dbdd934e02299ca31f001f95fcfdb45c.tar.gz |
Merge pull request #13 from GabrielDosReis/gdr/rename-Dynamic-to-Boxed
Rename `Dynamic` to `Boxed`
Diffstat (limited to 'src/rt/Lisp.cc')
-rw-r--r-- | src/rt/Lisp.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rt/Lisp.cc b/src/rt/Lisp.cc index 71b3c2b1..fae3e02f 100644 --- a/src/rt/Lisp.cc +++ b/src/rt/Lisp.cc @@ -68,8 +68,8 @@ namespace OpenAxiom { constexpr NamedConstant<Value> value_constants[] = { { "NIL", Value::nil }, { "T", Value::t }, - { "MOST-NEGATIVE-FIXNUM", from_fixnum(Fixnum::minimum) }, - { "MOST-POSITIVE-FIXNUM", from_fixnum(Fixnum::maximum) }, + { "MOST-NEGATIVE-FIXNUM", to_value(Fixnum::minimum) }, + { "MOST-POSITIVE-FIXNUM", to_value(Fixnum::maximum) }, }; static void define_special_constants(Evaluator* ctx) { @@ -151,7 +151,7 @@ namespace OpenAxiom { val = -val; } } - return VM::from_fixnum(Fixnum(val)); + return VM::to_value(Fixnum(val)); } static Value @@ -163,14 +163,14 @@ namespace OpenAxiom { if (x.dotted()) result = ctx->make_value(*p++); while (p != x.rend()) - result = from_pair(ctx->make_pair(ctx->make_value(*p++), result)); + result = to_value(ctx->make_pair(ctx->make_value(*p++), result)); return result; } static Value construct(Evaluator* ctx, const Sexpr::StringSyntax& x) { auto s = ctx->intern(x.lexeme().begin(), x.lexeme().size()); - return from_string(s); + return to_value(s); } static Value @@ -457,7 +457,7 @@ namespace OpenAxiom { if (v == Value::nil) break; os << ' '; - if (auto q = to_pair_if_can(v)) { + if (auto q = if_pair(v)) { p = q; continue; } @@ -478,7 +478,7 @@ namespace OpenAxiom { os << '"'; } - static void format(const Dynamic*, std::ostream&); + static void format(const Boxed*, std::ostream&); void format(Value v, std::ostream& os) { if (v == Value::nil) @@ -491,14 +491,14 @@ namespace OpenAxiom { format(to_pair(v), os); else if (is<String>(v)) format(to_string(v), os); - else if (is<Dynamic>(v)) - format(to_dynamic(v), os); + else if (is<Boxed>(v)) + format(to_boxed(v), os); else os << "#<unprintable>"; } - static void format(const Dynamic* x, std::ostream& os) { - struct V : Dynamic::Visitor { + static void format(const Boxed* x, std::ostream& os) { + struct V : Boxed::Visitor { std::ostream& os; V(std::ostream& s) : os(s) { } void visit(const Symbol& s) { |