aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/vm.H16
-rw-r--r--src/utils/string-pool.H4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/include/vm.H b/src/include/vm.H
index 6a3dc872..d321835f 100644
--- a/src/include/vm.H
+++ b/src/include/vm.H
@@ -191,7 +191,7 @@ namespace OpenAxiom {
// ------------
// -- String --
// ------------
- using String = BasicString;
+ using String = InternedString;
constexpr ValueBits str_tag = 0x4;
@@ -199,16 +199,16 @@ namespace OpenAxiom {
return (ValueBits(v) & 0x7) == str_tag;
}
- inline BasicString to_string(Value v) {
- return reinterpret_cast<BasicString>
+ inline InternedString to_string(Value v) {
+ return reinterpret_cast<InternedString>
(ValueBits(v) & ~ValueBits(0x7));
}
- inline Value from_string(BasicString s) {
+ inline Value from_string(InternedString s) {
return Value(ValueBits(s) | str_tag);
}
- inline BasicString to_string_if_can(Value v) {
+ inline InternedString to_string_if_can(Value v) {
return is_string(v) ? to_string(v) : nullptr;
}
@@ -353,12 +353,12 @@ namespace OpenAxiom {
// -- Scope --
// -----------
struct Scope : Dynamic, private std::map<Symbol*, Value> {
- explicit Scope(BasicString n) : id(n) { }
- BasicString name() const { return id; }
+ explicit Scope(InternedString n) : id(n) { }
+ InternedString name() const { return id; }
Value* lookup(Symbol*) const;
Value* define(Symbol*, Value);
private:
- const BasicString id;
+ const InternedString id;
};
// --------------
diff --git a/src/utils/string-pool.H b/src/utils/string-pool.H
index 2e40957b..220f43be 100644
--- a/src/utils/string-pool.H
+++ b/src/utils/string-pool.H
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2013, Gabriel Dos Reis.
+// Copyright (C) 2010-2014, Gabriel Dos Reis.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,7 @@ namespace OpenAxiom {
const Byte* make_copy(const Byte*, size_t);
};
- typedef const StringPool::EntryType* BasicString;
+ typedef const StringPool::EntryType* InternedString;
}
#endif // OPENAXIOM_STRING_POOL_INCLUDED