daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 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 | |
Geoff Lang | 1773282 | 2013-08-29 13:46:49 -0400 | [diff] [blame^] | 7 | #include "compiler/translator/InitializeDll.h" |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 8 | |
Geoff Lang | 1773282 | 2013-08-29 13:46:49 -0400 | [diff] [blame^] | 9 | #include "compiler/translator/InitializeGlobals.h" |
| 10 | #include "compiler/translator/InitializeParseContext.h" |
| 11 | #include "compiler/translator/osinclude.h" |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 12 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 13 | bool InitProcess() |
| 14 | { |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 15 | if (!InitializePoolIndex()) { |
| 16 | assert(0 && "InitProcess(): Failed to initalize global pool"); |
| 17 | return false; |
alokp@chromium.org | 34b99cd | 2010-07-27 18:37:55 +0000 | [diff] [blame] | 18 | } |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 19 | |
| 20 | if (!InitializeParseContextIndex()) { |
| 21 | assert(0 && "InitProcess(): Failed to initalize parse context"); |
| 22 | return false; |
alokp@chromium.org | 34b99cd | 2010-07-27 18:37:55 +0000 | [diff] [blame] | 23 | } |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 24 | |
alokp@chromium.org | 34b99cd | 2010-07-27 18:37:55 +0000 | [diff] [blame] | 25 | return true; |
| 26 | } |
| 27 | |
Alok Priyadarshi | 8156b6b | 2013-09-23 14:56:58 -0400 | [diff] [blame] | 28 | void DetachProcess() |
alokp@chromium.org | 34b99cd | 2010-07-27 18:37:55 +0000 | [diff] [blame] | 29 | { |
Alok Priyadarshi | 8156b6b | 2013-09-23 14:56:58 -0400 | [diff] [blame] | 30 | FreeParseContextIndex(); |
| 31 | FreePoolIndex(); |
alokp@chromium.org | 34b99cd | 2010-07-27 18:37:55 +0000 | [diff] [blame] | 32 | } |