blob: 99b0dfc242dba5c530ceb3527e0c1949b571b756 [file] [log] [blame]
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00001//
2// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7#ifndef _INITIALIZE_INCLUDED_
8#define _INITIALIZE_INCLUDED_
9
10#include "ResourceLimits.h"
11#include "Common.h"
12#include "ShHandle.h"
13#include "SymbolTable.h"
14
15typedef TVector<TString> TBuiltInStrings;
16
17class TBuiltIns {
18public:
19 POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
20 void initialize();
21 void initialize(const TBuiltInResource& resources);
22 TBuiltInStrings* getBuiltInStrings() { return builtInStrings; }
23protected:
24 TBuiltInStrings builtInStrings[EShLangCount];
25};
26
27void IdentifyBuiltIns(EShLanguage, TSymbolTable&);
28void IdentifyBuiltIns(EShLanguage, TSymbolTable&, const TBuiltInResource &resources);
29bool GenerateBuiltInSymbolTable(const TBuiltInResource* resources, TInfoSink&, TSymbolTable*, EShLanguage language = EShLangCount);
30bool InitializeSymbolTable(TBuiltInStrings* BuiltInStrings, EShLanguage language, TInfoSink& infoSink, const TBuiltInResource *resources, TSymbolTable*);
31const char* GetPreprocessorBuiltinString();
32extern "C" int InitPreprocessor(void);
33extern "C" int FinalizePreprocessor(void);
34
35#endif // _INITIALIZE_INCLUDED_