OLD | NEW |
1 // | 1 // |
2 // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. | 2 // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 // | 5 // |
6 | 6 |
7 #ifndef _TYPES_INCLUDED | 7 #ifndef _TYPES_INCLUDED |
8 #define _TYPES_INCLUDED | 8 #define _TYPES_INCLUDED |
9 | 9 |
10 #include "compiler/BaseTypes.h" | 10 #include "compiler/BaseTypes.h" |
11 #include "compiler/Common.h" | 11 #include "compiler/Common.h" |
12 #include "compiler/debug.h" | 12 #include "compiler/debug.h" |
13 | 13 |
14 class TType; | 14 class TType; |
15 struct TPublicType; | 15 struct TPublicType; |
16 | 16 |
17 // | 17 typedef TVector<TType*> TTypeList; |
18 // Need to have association of line numbers to types in a list for building stru
cts. | |
19 // | |
20 struct TTypeLine { | |
21 TType* type; | |
22 int line; | |
23 }; | |
24 typedef TVector<TTypeLine> TTypeList; | |
25 | 18 |
26 inline TTypeList* NewPoolTTypeList() | 19 inline TTypeList* NewPoolTTypeList() |
27 { | 20 { |
28 void* memory = GlobalPoolAllocator.allocate(sizeof(TTypeList)); | 21 void* memory = GlobalPoolAllocator.allocate(sizeof(TTypeList)); |
29 return new(memory) TTypeList; | 22 return new(memory) TTypeList; |
30 } | 23 } |
31 | 24 |
32 // | 25 // |
33 // Base class for things that have a type. | 26 // Base class for things that have a type. |
34 // | 27 // |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 if (!userDef) | 246 if (!userDef) |
254 { | 247 { |
255 return false; | 248 return false; |
256 } | 249 } |
257 | 250 |
258 return userDef->isStructureContainingArrays(); | 251 return userDef->isStructureContainingArrays(); |
259 } | 252 } |
260 }; | 253 }; |
261 | 254 |
262 #endif // _TYPES_INCLUDED_ | 255 #endif // _TYPES_INCLUDED_ |
OLD | NEW |