blob: 43f81784d0adec5ab116a8be34e57adf06133bad [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
Geoff Lang17732822013-08-29 13:46:49 -04007#include "compiler/translator/InitializeDll.h"
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00008
Geoff Lang17732822013-08-29 13:46:49 -04009#include "compiler/translator/InitializeGlobals.h"
10#include "compiler/translator/InitializeParseContext.h"
11#include "compiler/translator/osinclude.h"
daniel@transgaming.combbf56f72010-04-20 18:52:13 +000012
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000013bool InitProcess()
14{
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000015 if (!InitializePoolIndex()) {
16 assert(0 && "InitProcess(): Failed to initalize global pool");
17 return false;
alokp@chromium.org34b99cd2010-07-27 18:37:55 +000018 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000019
20 if (!InitializeParseContextIndex()) {
21 assert(0 && "InitProcess(): Failed to initalize parse context");
22 return false;
alokp@chromium.org34b99cd2010-07-27 18:37:55 +000023 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000024
alokp@chromium.org34b99cd2010-07-27 18:37:55 +000025 return true;
26}
27
Alok Priyadarshi8156b6b2013-09-23 14:56:58 -040028void DetachProcess()
alokp@chromium.org34b99cd2010-07-27 18:37:55 +000029{
Alok Priyadarshi8156b6b2013-09-23 14:56:58 -040030 FreeParseContextIndex();
31 FreePoolIndex();
alokp@chromium.org34b99cd2010-07-27 18:37:55 +000032}