Path: blob/main_old/src/compiler/translator/FunctionLookup.h
1693 views
//1// Copyright 2018 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// FunctionLookup.h: Used for storing function calls that have not yet been resolved during parsing.6//78#ifndef COMPILER_TRANSLATOR_FUNCTIONLOOKUP_H_9#define COMPILER_TRANSLATOR_FUNCTIONLOOKUP_H_1011#include "compiler/translator/ImmutableString.h"12#include "compiler/translator/IntermNode.h"1314namespace sh15{1617// A function look-up.18class TFunctionLookup : angle::NonCopyable19{20public:21POOL_ALLOCATOR_NEW_DELETE2223static TFunctionLookup *CreateConstructor(const TType *type);24static TFunctionLookup *CreateFunctionCall(const ImmutableString &name, const TSymbol *symbol);2526const ImmutableString &name() const;27ImmutableString getMangledName() const;28static ImmutableString GetMangledName(const char *functionName,29const TIntermSequence &arguments);30std::vector<ImmutableString> getMangledNamesForImplicitConversions() const;3132bool isConstructor() const;33const TType &constructorType() const;3435void setThisNode(TIntermTyped *thisNode);36TIntermTyped *thisNode() const;3738void addArgument(TIntermTyped *argument);39TIntermSequence &arguments();4041// Symbol looked up in the lexical phase using only the name of the function.42// This does not necessarily correspond to the correct overloaded function.43const TSymbol *symbol() const;4445private:46TFunctionLookup(const ImmutableString &name,47const TType *constructorType,48const TSymbol *symbol);4950const ImmutableString mName;51const TType *const mConstructorType;52TIntermTyped *mThisNode;53TIntermSequence mArguments;54const TSymbol *mSymbol;55};5657} // namespace sh5859#endif // COMPILER_TRANSLATOR_FUNCTIONLOOKUP_H_606162