RIP tp::Strings

This commit is contained in:
IlyaShurupov 2024-03-22 14:44:26 +03:00
parent aa53a4addb
commit 893a07e924
90 changed files with 419 additions and 1475 deletions

View file

@ -6,7 +6,7 @@
namespace obj {
struct Scope {
typedef tp::Map<tp::String, obj::Object*> ObjDict;
typedef tp::Map<std::string, obj::Object*> ObjDict;
typedef tp::List<obj::Object*> ObjList;
ObjDict mLocals;
@ -31,16 +31,16 @@ namespace obj {
ScopeStack();
void enterScope(bool aChildReachable);
void leaveScope();
void addLocal(obj::Object* local, tp::String id);
void addLocal(obj::Object* local, const std::string& id);
void addTemp(obj::Object* tmp);
void popTemp();
void addTempReturn(obj::Object* ret);
obj::Object* getLocal(tp::String& str);
obj::Object* getLocal(const std::string& str);
Scope* getCurrentScope();
~ScopeStack();
private:
obj::Object* getLocalUtil(Scope& scope, tp::String* id);
obj::Object* getLocalUtil(Scope& scope, const std::string& id);
};
};