Preprocessor: 1) Rationalize the "fixed atom" scheme, 2) remove redundant lookups when the text is already available.
This simplification is a prelude to eliminating what I appear unnecessary symbol inserts into tables when tokenizing in the preprecessor, which show up as taking notable time. (Performance issue.) It also simply makes the preprocessor easier to understand, which it is badly in need of.
This commit is contained in:
parent
2f273369e4
commit
6ab3d582d6
10 changed files with 362 additions and 412 deletions
|
|
@ -287,31 +287,6 @@ protected:
|
|||
//
|
||||
// from Pp.cpp
|
||||
//
|
||||
int bindAtom;
|
||||
int constAtom;
|
||||
int defaultAtom;
|
||||
int defineAtom;
|
||||
int definedAtom;
|
||||
int elseAtom;
|
||||
int elifAtom;
|
||||
int endifAtom;
|
||||
int ifAtom;
|
||||
int ifdefAtom;
|
||||
int ifndefAtom;
|
||||
int includeAtom;
|
||||
int lineAtom;
|
||||
int pragmaAtom;
|
||||
int texunitAtom;
|
||||
int undefAtom;
|
||||
int errorAtom;
|
||||
int __LINE__Atom;
|
||||
int __FILE__Atom;
|
||||
int __VERSION__Atom;
|
||||
int versionAtom;
|
||||
int coreAtom;
|
||||
int compatibilityAtom;
|
||||
int esAtom;
|
||||
int extensionAtom;
|
||||
TSourceLoc ifloc; /* outermost #if */
|
||||
|
||||
int InitCPP();
|
||||
|
|
@ -467,7 +442,7 @@ protected:
|
|||
TStringMap stringMap;
|
||||
int nextAtom;
|
||||
void InitAtomTable();
|
||||
int AddAtomFixed(const char* s, int atom);
|
||||
void AddAtomFixed(const char* s, int atom);
|
||||
int LookUpAddString(const char* s);
|
||||
const char* GetAtomString(int atom);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue