Most of the code & API changes necessary for supporting Relay (GraphQL)

This commit is contained in:
Jarred Sumner
2021-09-29 23:28:54 -07:00
parent 5dac4e6108
commit 74db7809eb
5 changed files with 497 additions and 14 deletions

View File

@@ -3183,6 +3183,9 @@ pub fn NewParser(
pub fn findSymbol(p: *P, loc: logger.Loc, name: string) !FindSymbolResult {
var declare_loc: logger.Loc = undefined;
var is_inside_with_scope = false;
// This function can show up in profiling.
// That's part of why we do this.
// Instead of rehashing `name` for every scope, we do it just once.
const hash = @TypeOf(p.module_scope.members).getHash(name);
const ref: Ref = brk: {