This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH to split up cpp_read_main_file


Neil Booth wrote:

OK, but what about the rest of the state?

The hash table with all the identifier bindings is reset. Then a magic fragment for the built-in is replayed. This restores the builtin and command-line macros.

Loosely, that's it.

Note we can't throw away the hash_table, since the
identity of IDENTIFIER_NODES has to be preserved.
However, the bindings (macros and declarations)
associated with identifiers has to be reset.
If we extends Mike's "multi-context" model to also
handle cpp-state, then we don't even need to reset
the bindings - we just change context.

The file _cpp_file and associate data structures
are re-used, not reset.  (That is why I will need a
working buffer cache.)

All the state from processing options remains.  (Currently,
there is no support for changing command line flags
between source files.)

The state associated with fragments remains.

You'll see when the compile server branch goes live,
probably early next week.  Merging seems to be done,
but I need to do more testing.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]