blob: 6c7f27fced174b0b14a67be7c6520f1794e2a766 [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
daniel@transgaming.combbf56f72010-04-20 18:52:13 +00007#include "compiler/InitializeDll.h"
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00008
daniel@transgaming.combbf56f72010-04-20 18:52:13 +00009#include "compiler/InitializeGlobals.h"
10#include "compiler/InitializeParseContext.h"
alokp@chromium.org34b99cd2010-07-27 18:37:55 +000011#include "compiler/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}