Avoid changing built-in symbol tables during lookup.

Previously, we'd add UnresolvedFunction symbols wherever the original
FunctionDeclaration was found, but that can alter shared SymbolTables
(e.g. the root table) and the node will not be cleaned up when the
program is deleted. The pooling system expects that any node created as
part of a Program will go away when the Program does.

This change puts the UnresolvedFunction symbol as close to the
FunctionDeclaration as possible without changing builtin symbol tables.

Change-Id: I4c80cfba734047f11b50c86829d95d8e393c3060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327921
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2 files changed