Clean up Symbol handling.
* Introduce SymbolSet class. As each Symbol contains sequentially
assigned ordinal value, representing a set of Symbols as a growable
bitset is faster and more space-efficient than generic unordered_bitmap
(for the full build, we save about 1500MB).
* Remove useless constructor argument.
* Make a Symbol for .KATI_READONLY constant instead of Evaluator member.
* Avoid testing 'this' for nullness in Value::DebugString, it's not
standard-compliant. Make Value::DebugString static instead.
* Avoid 'fallthrough' compiler warning.
diff --git a/expr.h b/expr.h
index 588c6f7..e9e6d96 100644
--- a/expr.h
+++ b/expr.h
@@ -45,7 +45,7 @@
// Only safe after IsLiteral() returns true.
virtual StringPiece GetLiteralValueUnsafe() const { return ""; }
- string DebugString() const;
+ static string DebugString(const Value *);
protected:
Value();