1 // 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 #include "compiler/translator/InitializeDll.h" 8 #include "compiler/translator/InitializeGlobals.h" 9 #include "compiler/translator/InitializeParseContext.h" 10 11 #include "common/platform.h" 12 13 #include <assert.h> 14 InitProcess()15bool InitProcess() 16 { 17 if (!InitializePoolIndex()) { 18 assert(0 && "InitProcess(): Failed to initalize global pool"); 19 return false; 20 } 21 22 if (!InitializeParseContextIndex()) { 23 assert(0 && "InitProcess(): Failed to initalize parse context"); 24 return false; 25 } 26 27 return true; 28 } 29 DetachProcess()30void DetachProcess() 31 { 32 FreeParseContextIndex(); 33 FreePoolIndex(); 34 } 35