PP: Non-functional: Remove custom allocator and related improvements.

Removed the preprocesser memory pool.

Removed extra copies and unnecessary allocations of objects related to the ones
that were using the pool.

Replaced some allocated pointers with objects instead, generally using more
modern techiques. There end up being fewer memory allocations/deletions to get right.

Overall combined effect of all changes is to use slightly less memory and
run slightly faster (< 1% for both, but noticable).

As part of simplifying the code base, this change makes it easier to see
PP symbol tracking, which I suspect has an even bigger run-time simplification
to make.
This commit is contained in:
John Kessenich 2016-12-19 21:57:06 -07:00
parent bfff871dad
commit b8387c87d0
7 changed files with 97 additions and 283 deletions

View file

@ -90,17 +90,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace glslang {
int TPpContext::InitScanner()
{
// Add various atoms needed by the CPP line scanner:
if (!InitCPP())
return 0;
previous_token = '\n';
return 1;
}
///////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// Floating point constants: /////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////