Mercurial > hg > truffle
annotate src/share/vm/opto/type.hpp @ 145:f3de1255b035
6603011: RFE: Optimize long division
Summary: Transform long division by constant into multiply
Reviewed-by: never, kvn
author | rasbold |
---|---|
date | Wed, 07 May 2008 08:06:46 -0700 |
parents | ba764ed4b6f2 |
children | 885ed790ecf0 |
rev | line source |
---|---|
0 | 1 /* |
2 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
20 * CA 95054 USA or visit www.sun.com if you need additional information or | |
21 * have any questions. | |
22 * | |
23 */ | |
24 | |
25 // Portions of code courtesy of Clifford Click | |
26 | |
27 // Optimization - Graph Style | |
28 | |
29 | |
30 // This class defines a Type lattice. The lattice is used in the constant | |
31 // propagation algorithms, and for some type-checking of the iloc code. | |
32 // Basic types include RSD's (lower bound, upper bound, stride for integers), | |
33 // float & double precision constants, sets of data-labels and code-labels. | |
34 // The complete lattice is described below. Subtypes have no relationship to | |
35 // up or down in the lattice; that is entirely determined by the behavior of | |
36 // the MEET/JOIN functions. | |
37 | |
38 class Dict; | |
39 class Type; | |
40 class TypeD; | |
41 class TypeF; | |
42 class TypeInt; | |
43 class TypeLong; | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
44 class TypeNarrowOop; |
0 | 45 class TypeAry; |
46 class TypeTuple; | |
47 class TypePtr; | |
48 class TypeRawPtr; | |
49 class TypeOopPtr; | |
50 class TypeInstPtr; | |
51 class TypeAryPtr; | |
52 class TypeKlassPtr; | |
53 | |
54 //------------------------------Type------------------------------------------- | |
55 // Basic Type object, represents a set of primitive Values. | |
56 // Types are hash-cons'd into a private class dictionary, so only one of each | |
57 // different kind of Type exists. Types are never modified after creation, so | |
58 // all their interesting fields are constant. | |
59 class Type { | |
60 public: | |
61 enum TYPES { | |
62 Bad=0, // Type check | |
63 Control, // Control of code (not in lattice) | |
64 Top, // Top of the lattice | |
65 Int, // Integer range (lo-hi) | |
66 Long, // Long integer range (lo-hi) | |
67 Half, // Placeholder half of doubleword | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
68 NarrowOop, // Compressed oop pointer |
0 | 69 |
70 Tuple, // Method signature or object layout | |
71 Array, // Array types | |
72 | |
73 AnyPtr, // Any old raw, klass, inst, or array pointer | |
74 RawPtr, // Raw (non-oop) pointers | |
75 OopPtr, // Any and all Java heap entities | |
76 InstPtr, // Instance pointers (non-array objects) | |
77 AryPtr, // Array pointers | |
78 KlassPtr, // Klass pointers | |
79 // (Ptr order matters: See is_ptr, isa_ptr, is_oopptr, isa_oopptr.) | |
80 | |
81 Function, // Function signature | |
82 Abio, // Abstract I/O | |
83 Return_Address, // Subroutine return address | |
84 Memory, // Abstract store | |
85 FloatTop, // No float value | |
86 FloatCon, // Floating point constant | |
87 FloatBot, // Any float value | |
88 DoubleTop, // No double value | |
89 DoubleCon, // Double precision constant | |
90 DoubleBot, // Any double value | |
91 Bottom, // Bottom of lattice | |
92 lastype // Bogus ending type (not in lattice) | |
93 }; | |
94 | |
95 // Signal values for offsets from a base pointer | |
96 enum OFFSET_SIGNALS { | |
97 OffsetTop = -2000000000, // undefined offset | |
98 OffsetBot = -2000000001 // any possible offset | |
99 }; | |
100 | |
101 // Min and max WIDEN values. | |
102 enum WIDEN { | |
103 WidenMin = 0, | |
104 WidenMax = 3 | |
105 }; | |
106 | |
107 private: | |
108 // Dictionary of types shared among compilations. | |
109 static Dict* _shared_type_dict; | |
110 | |
111 static int uhash( const Type *const t ); | |
112 // Structural equality check. Assumes that cmp() has already compared | |
113 // the _base types and thus knows it can cast 't' appropriately. | |
114 virtual bool eq( const Type *t ) const; | |
115 | |
116 // Top-level hash-table of types | |
117 static Dict *type_dict() { | |
118 return Compile::current()->type_dict(); | |
119 } | |
120 | |
121 // DUAL operation: reflect around lattice centerline. Used instead of | |
122 // join to ensure my lattice is symmetric up and down. Dual is computed | |
123 // lazily, on demand, and cached in _dual. | |
124 const Type *_dual; // Cached dual value | |
125 // Table for efficient dualing of base types | |
126 static const TYPES dual_type[lastype]; | |
127 | |
128 protected: | |
129 // Each class of type is also identified by its base. | |
130 const TYPES _base; // Enum of Types type | |
131 | |
132 Type( TYPES t ) : _dual(NULL), _base(t) {} // Simple types | |
133 // ~Type(); // Use fast deallocation | |
134 const Type *hashcons(); // Hash-cons the type | |
135 | |
136 public: | |
137 | |
138 inline void* operator new( size_t x ) { | |
139 Compile* compile = Compile::current(); | |
140 compile->set_type_last_size(x); | |
141 void *temp = compile->type_arena()->Amalloc_D(x); | |
142 compile->set_type_hwm(temp); | |
143 return temp; | |
144 } | |
145 inline void operator delete( void* ptr ) { | |
146 Compile* compile = Compile::current(); | |
147 compile->type_arena()->Afree(ptr,compile->type_last_size()); | |
148 } | |
149 | |
150 // Initialize the type system for a particular compilation. | |
151 static void Initialize(Compile* compile); | |
152 | |
153 // Initialize the types shared by all compilations. | |
154 static void Initialize_shared(Compile* compile); | |
155 | |
156 TYPES base() const { | |
157 assert(_base > Bad && _base < lastype, "sanity"); | |
158 return _base; | |
159 } | |
160 | |
161 // Create a new hash-consd type | |
162 static const Type *make(enum TYPES); | |
163 // Test for equivalence of types | |
164 static int cmp( const Type *const t1, const Type *const t2 ); | |
165 // Test for higher or equal in lattice | |
166 int higher_equal( const Type *t ) const { return !cmp(meet(t),t); } | |
167 | |
168 // MEET operation; lower in lattice. | |
169 const Type *meet( const Type *t ) const; | |
170 // WIDEN: 'widens' for Ints and other range types | |
171 virtual const Type *widen( const Type *old ) const { return this; } | |
172 // NARROW: complement for widen, used by pessimistic phases | |
173 virtual const Type *narrow( const Type *old ) const { return this; } | |
174 | |
175 // DUAL operation: reflect around lattice centerline. Used instead of | |
176 // join to ensure my lattice is symmetric up and down. | |
177 const Type *dual() const { return _dual; } | |
178 | |
179 // Compute meet dependent on base type | |
180 virtual const Type *xmeet( const Type *t ) const; | |
181 virtual const Type *xdual() const; // Compute dual right now. | |
182 | |
183 // JOIN operation; higher in lattice. Done by finding the dual of the | |
184 // meet of the dual of the 2 inputs. | |
185 const Type *join( const Type *t ) const { | |
186 return dual()->meet(t->dual())->dual(); } | |
187 | |
188 // Modified version of JOIN adapted to the needs Node::Value. | |
189 // Normalizes all empty values to TOP. Does not kill _widen bits. | |
190 // Currently, it also works around limitations involving interface types. | |
191 virtual const Type *filter( const Type *kills ) const; | |
192 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
193 // Returns true if this pointer points at memory which contains a |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
194 // compressed oop references. In 32-bit builds it's non-virtual |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
195 // since we don't support compressed oops at all in the mode. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
196 LP64_ONLY(virtual) bool is_narrow() const { return false; } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
197 |
0 | 198 // Convenience access |
199 float getf() const; | |
200 double getd() const; | |
201 | |
202 const TypeInt *is_int() const; | |
203 const TypeInt *isa_int() const; // Returns NULL if not an Int | |
204 const TypeLong *is_long() const; | |
205 const TypeLong *isa_long() const; // Returns NULL if not a Long | |
206 const TypeD *is_double_constant() const; // Asserts it is a DoubleCon | |
207 const TypeD *isa_double_constant() const; // Returns NULL if not a DoubleCon | |
208 const TypeF *is_float_constant() const; // Asserts it is a FloatCon | |
209 const TypeF *isa_float_constant() const; // Returns NULL if not a FloatCon | |
210 const TypeTuple *is_tuple() const; // Collection of fields, NOT a pointer | |
211 const TypeAry *is_ary() const; // Array, NOT array pointer | |
212 const TypePtr *is_ptr() const; // Asserts it is a ptr type | |
213 const TypePtr *isa_ptr() const; // Returns NULL if not ptr type | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
214 const TypeRawPtr *isa_rawptr() const; // NOT Java oop |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
215 const TypeRawPtr *is_rawptr() const; // Asserts is rawptr |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
216 const TypeNarrowOop *is_narrowoop() const; // Java-style GC'd pointer |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
217 const TypeNarrowOop *isa_narrowoop() const; // Returns NULL if not oop ptr type |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
218 const TypeOopPtr *isa_oopptr() const; // Returns NULL if not oop ptr type |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
219 const TypeOopPtr *is_oopptr() const; // Java-style GC'd pointer |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
220 const TypeKlassPtr *isa_klassptr() const; // Returns NULL if not KlassPtr |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
221 const TypeKlassPtr *is_klassptr() const; // assert if not KlassPtr |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
222 const TypeInstPtr *isa_instptr() const; // Returns NULL if not InstPtr |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
223 const TypeInstPtr *is_instptr() const; // Instance |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
224 const TypeAryPtr *isa_aryptr() const; // Returns NULL if not AryPtr |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
225 const TypeAryPtr *is_aryptr() const; // Array oop |
0 | 226 virtual bool is_finite() const; // Has a finite value |
227 virtual bool is_nan() const; // Is not a number (NaN) | |
228 | |
229 // Special test for register pressure heuristic | |
230 bool is_floatingpoint() const; // True if Float or Double base type | |
231 | |
232 // Do you have memory, directly or through a tuple? | |
233 bool has_memory( ) const; | |
234 | |
235 // Are you a pointer type or not? | |
236 bool isa_oop_ptr() const; | |
237 | |
238 // TRUE if type is a singleton | |
239 virtual bool singleton(void) const; | |
240 | |
241 // TRUE if type is above the lattice centerline, and is therefore vacuous | |
242 virtual bool empty(void) const; | |
243 | |
244 // Return a hash for this type. The hash function is public so ConNode | |
245 // (constants) can hash on their constant, which is represented by a Type. | |
246 virtual int hash() const; | |
247 | |
248 // Map ideal registers (machine types) to ideal types | |
249 static const Type *mreg2type[]; | |
250 | |
251 // Printing, statistics | |
252 static const char * const msg[lastype]; // Printable strings | |
253 #ifndef PRODUCT | |
254 void dump_on(outputStream *st) const; | |
255 void dump() const { | |
256 dump_on(tty); | |
257 } | |
258 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
259 static void dump_stats(); | |
260 static void verify_lastype(); // Check that arrays match type enum | |
261 #endif | |
262 void typerr(const Type *t) const; // Mixing types error | |
263 | |
264 // Create basic type | |
265 static const Type* get_const_basic_type(BasicType type) { | |
266 assert((uint)type <= T_CONFLICT && _const_basic_type[type] != NULL, "bad type"); | |
267 return _const_basic_type[type]; | |
268 } | |
269 | |
270 // Mapping to the array element's basic type. | |
271 BasicType array_element_basic_type() const; | |
272 | |
273 // Create standard type for a ciType: | |
274 static const Type* get_const_type(ciType* type); | |
275 | |
276 // Create standard zero value: | |
277 static const Type* get_zero_type(BasicType type) { | |
278 assert((uint)type <= T_CONFLICT && _zero_type[type] != NULL, "bad type"); | |
279 return _zero_type[type]; | |
280 } | |
281 | |
282 // Report if this is a zero value (not top). | |
283 bool is_zero_type() const { | |
284 BasicType type = basic_type(); | |
285 if (type == T_VOID || type >= T_CONFLICT) | |
286 return false; | |
287 else | |
288 return (this == _zero_type[type]); | |
289 } | |
290 | |
291 // Convenience common pre-built types. | |
292 static const Type *ABIO; | |
293 static const Type *BOTTOM; | |
294 static const Type *CONTROL; | |
295 static const Type *DOUBLE; | |
296 static const Type *FLOAT; | |
297 static const Type *HALF; | |
298 static const Type *MEMORY; | |
299 static const Type *MULTI; | |
300 static const Type *RETURN_ADDRESS; | |
301 static const Type *TOP; | |
302 | |
303 // Mapping from compiler type to VM BasicType | |
304 BasicType basic_type() const { return _basic_type[_base]; } | |
305 | |
306 // Mapping from CI type system to compiler type: | |
307 static const Type* get_typeflow_type(ciType* type); | |
308 | |
309 private: | |
310 // support arrays | |
311 static const BasicType _basic_type[]; | |
312 static const Type* _zero_type[T_CONFLICT+1]; | |
313 static const Type* _const_basic_type[T_CONFLICT+1]; | |
314 }; | |
315 | |
316 //------------------------------TypeF------------------------------------------ | |
317 // Class of Float-Constant Types. | |
318 class TypeF : public Type { | |
319 TypeF( float f ) : Type(FloatCon), _f(f) {}; | |
320 public: | |
321 virtual bool eq( const Type *t ) const; | |
322 virtual int hash() const; // Type specific hashing | |
323 virtual bool singleton(void) const; // TRUE if type is a singleton | |
324 virtual bool empty(void) const; // TRUE if type is vacuous | |
325 public: | |
326 const float _f; // Float constant | |
327 | |
328 static const TypeF *make(float f); | |
329 | |
330 virtual bool is_finite() const; // Has a finite value | |
331 virtual bool is_nan() const; // Is not a number (NaN) | |
332 | |
333 virtual const Type *xmeet( const Type *t ) const; | |
334 virtual const Type *xdual() const; // Compute dual right now. | |
335 // Convenience common pre-built types. | |
336 static const TypeF *ZERO; // positive zero only | |
337 static const TypeF *ONE; | |
338 #ifndef PRODUCT | |
339 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
340 #endif | |
341 }; | |
342 | |
343 //------------------------------TypeD------------------------------------------ | |
344 // Class of Double-Constant Types. | |
345 class TypeD : public Type { | |
346 TypeD( double d ) : Type(DoubleCon), _d(d) {}; | |
347 public: | |
348 virtual bool eq( const Type *t ) const; | |
349 virtual int hash() const; // Type specific hashing | |
350 virtual bool singleton(void) const; // TRUE if type is a singleton | |
351 virtual bool empty(void) const; // TRUE if type is vacuous | |
352 public: | |
353 const double _d; // Double constant | |
354 | |
355 static const TypeD *make(double d); | |
356 | |
357 virtual bool is_finite() const; // Has a finite value | |
358 virtual bool is_nan() const; // Is not a number (NaN) | |
359 | |
360 virtual const Type *xmeet( const Type *t ) const; | |
361 virtual const Type *xdual() const; // Compute dual right now. | |
362 // Convenience common pre-built types. | |
363 static const TypeD *ZERO; // positive zero only | |
364 static const TypeD *ONE; | |
365 #ifndef PRODUCT | |
366 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
367 #endif | |
368 }; | |
369 | |
370 //------------------------------TypeInt---------------------------------------- | |
371 // Class of integer ranges, the set of integers between a lower bound and an | |
372 // upper bound, inclusive. | |
373 class TypeInt : public Type { | |
374 TypeInt( jint lo, jint hi, int w ); | |
375 public: | |
376 virtual bool eq( const Type *t ) const; | |
377 virtual int hash() const; // Type specific hashing | |
378 virtual bool singleton(void) const; // TRUE if type is a singleton | |
379 virtual bool empty(void) const; // TRUE if type is vacuous | |
380 public: | |
381 const jint _lo, _hi; // Lower bound, upper bound | |
382 const short _widen; // Limit on times we widen this sucker | |
383 | |
384 static const TypeInt *make(jint lo); | |
385 // must always specify w | |
386 static const TypeInt *make(jint lo, jint hi, int w); | |
387 | |
388 // Check for single integer | |
389 int is_con() const { return _lo==_hi; } | |
390 bool is_con(int i) const { return is_con() && _lo == i; } | |
391 jint get_con() const { assert( is_con(), "" ); return _lo; } | |
392 | |
393 virtual bool is_finite() const; // Has a finite value | |
394 | |
395 virtual const Type *xmeet( const Type *t ) const; | |
396 virtual const Type *xdual() const; // Compute dual right now. | |
397 virtual const Type *widen( const Type *t ) const; | |
398 virtual const Type *narrow( const Type *t ) const; | |
399 // Do not kill _widen bits. | |
400 virtual const Type *filter( const Type *kills ) const; | |
401 // Convenience common pre-built types. | |
402 static const TypeInt *MINUS_1; | |
403 static const TypeInt *ZERO; | |
404 static const TypeInt *ONE; | |
405 static const TypeInt *BOOL; | |
406 static const TypeInt *CC; | |
407 static const TypeInt *CC_LT; // [-1] == MINUS_1 | |
408 static const TypeInt *CC_GT; // [1] == ONE | |
409 static const TypeInt *CC_EQ; // [0] == ZERO | |
410 static const TypeInt *CC_LE; // [-1,0] | |
411 static const TypeInt *CC_GE; // [0,1] == BOOL (!) | |
412 static const TypeInt *BYTE; | |
413 static const TypeInt *CHAR; | |
414 static const TypeInt *SHORT; | |
415 static const TypeInt *POS; | |
416 static const TypeInt *POS1; | |
417 static const TypeInt *INT; | |
418 static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint] | |
419 #ifndef PRODUCT | |
420 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
421 #endif | |
422 }; | |
423 | |
424 | |
425 //------------------------------TypeLong--------------------------------------- | |
426 // Class of long integer ranges, the set of integers between a lower bound and | |
427 // an upper bound, inclusive. | |
428 class TypeLong : public Type { | |
429 TypeLong( jlong lo, jlong hi, int w ); | |
430 public: | |
431 virtual bool eq( const Type *t ) const; | |
432 virtual int hash() const; // Type specific hashing | |
433 virtual bool singleton(void) const; // TRUE if type is a singleton | |
434 virtual bool empty(void) const; // TRUE if type is vacuous | |
435 public: | |
436 const jlong _lo, _hi; // Lower bound, upper bound | |
437 const short _widen; // Limit on times we widen this sucker | |
438 | |
439 static const TypeLong *make(jlong lo); | |
440 // must always specify w | |
441 static const TypeLong *make(jlong lo, jlong hi, int w); | |
442 | |
443 // Check for single integer | |
444 int is_con() const { return _lo==_hi; } | |
145 | 445 bool is_con(int i) const { return is_con() && _lo == i; } |
0 | 446 jlong get_con() const { assert( is_con(), "" ); return _lo; } |
447 | |
448 virtual bool is_finite() const; // Has a finite value | |
449 | |
450 virtual const Type *xmeet( const Type *t ) const; | |
451 virtual const Type *xdual() const; // Compute dual right now. | |
452 virtual const Type *widen( const Type *t ) const; | |
453 virtual const Type *narrow( const Type *t ) const; | |
454 // Do not kill _widen bits. | |
455 virtual const Type *filter( const Type *kills ) const; | |
456 // Convenience common pre-built types. | |
457 static const TypeLong *MINUS_1; | |
458 static const TypeLong *ZERO; | |
459 static const TypeLong *ONE; | |
460 static const TypeLong *POS; | |
461 static const TypeLong *LONG; | |
462 static const TypeLong *INT; // 32-bit subrange [min_jint..max_jint] | |
463 static const TypeLong *UINT; // 32-bit unsigned [0..max_juint] | |
464 #ifndef PRODUCT | |
465 virtual void dump2( Dict &d, uint, outputStream *st ) const;// Specialized per-Type dumping | |
466 #endif | |
467 }; | |
468 | |
469 //------------------------------TypeTuple-------------------------------------- | |
470 // Class of Tuple Types, essentially type collections for function signatures | |
471 // and class layouts. It happens to also be a fast cache for the HotSpot | |
472 // signature types. | |
473 class TypeTuple : public Type { | |
474 TypeTuple( uint cnt, const Type **fields ) : Type(Tuple), _cnt(cnt), _fields(fields) { } | |
475 public: | |
476 virtual bool eq( const Type *t ) const; | |
477 virtual int hash() const; // Type specific hashing | |
478 virtual bool singleton(void) const; // TRUE if type is a singleton | |
479 virtual bool empty(void) const; // TRUE if type is vacuous | |
480 | |
481 public: | |
482 const uint _cnt; // Count of fields | |
483 const Type ** const _fields; // Array of field types | |
484 | |
485 // Accessors: | |
486 uint cnt() const { return _cnt; } | |
487 const Type* field_at(uint i) const { | |
488 assert(i < _cnt, "oob"); | |
489 return _fields[i]; | |
490 } | |
491 void set_field_at(uint i, const Type* t) { | |
492 assert(i < _cnt, "oob"); | |
493 _fields[i] = t; | |
494 } | |
495 | |
496 static const TypeTuple *make( uint cnt, const Type **fields ); | |
497 static const TypeTuple *make_range(ciSignature *sig); | |
498 static const TypeTuple *make_domain(ciInstanceKlass* recv, ciSignature *sig); | |
499 | |
500 // Subroutine call type with space allocated for argument types | |
501 static const Type **fields( uint arg_cnt ); | |
502 | |
503 virtual const Type *xmeet( const Type *t ) const; | |
504 virtual const Type *xdual() const; // Compute dual right now. | |
505 // Convenience common pre-built types. | |
506 static const TypeTuple *IFBOTH; | |
507 static const TypeTuple *IFFALSE; | |
508 static const TypeTuple *IFTRUE; | |
509 static const TypeTuple *IFNEITHER; | |
510 static const TypeTuple *LOOPBODY; | |
511 static const TypeTuple *MEMBAR; | |
512 static const TypeTuple *STORECONDITIONAL; | |
513 static const TypeTuple *START_I2C; | |
514 static const TypeTuple *INT_PAIR; | |
515 static const TypeTuple *LONG_PAIR; | |
516 #ifndef PRODUCT | |
517 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping | |
518 #endif | |
519 }; | |
520 | |
521 //------------------------------TypeAry---------------------------------------- | |
522 // Class of Array Types | |
523 class TypeAry : public Type { | |
524 TypeAry( const Type *elem, const TypeInt *size) : Type(Array), | |
525 _elem(elem), _size(size) {} | |
526 public: | |
527 virtual bool eq( const Type *t ) const; | |
528 virtual int hash() const; // Type specific hashing | |
529 virtual bool singleton(void) const; // TRUE if type is a singleton | |
530 virtual bool empty(void) const; // TRUE if type is vacuous | |
531 | |
532 private: | |
533 const Type *_elem; // Element type of array | |
534 const TypeInt *_size; // Elements in array | |
535 friend class TypeAryPtr; | |
536 | |
537 public: | |
538 static const TypeAry *make( const Type *elem, const TypeInt *size); | |
539 | |
540 virtual const Type *xmeet( const Type *t ) const; | |
541 virtual const Type *xdual() const; // Compute dual right now. | |
542 bool ary_must_be_exact() const; // true if arrays of such are never generic | |
543 #ifndef PRODUCT | |
544 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping | |
545 #endif | |
546 }; | |
547 | |
548 //------------------------------TypePtr---------------------------------------- | |
549 // Class of machine Pointer Types: raw data, instances or arrays. | |
550 // If the _base enum is AnyPtr, then this refers to all of the above. | |
551 // Otherwise the _base will indicate which subset of pointers is affected, | |
552 // and the class will be inherited from. | |
553 class TypePtr : public Type { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
554 friend class TypeNarrowOop; |
0 | 555 public: |
556 enum PTR { TopPTR, AnyNull, Constant, Null, NotNull, BotPTR, lastPTR }; | |
557 protected: | |
558 TypePtr( TYPES t, PTR ptr, int offset ) : Type(t), _ptr(ptr), _offset(offset) {} | |
559 virtual bool eq( const Type *t ) const; | |
560 virtual int hash() const; // Type specific hashing | |
561 static const PTR ptr_meet[lastPTR][lastPTR]; | |
562 static const PTR ptr_dual[lastPTR]; | |
563 static const char * const ptr_msg[lastPTR]; | |
564 | |
565 public: | |
566 const int _offset; // Offset into oop, with TOP & BOT | |
567 const PTR _ptr; // Pointer equivalence class | |
568 | |
569 const int offset() const { return _offset; } | |
570 const PTR ptr() const { return _ptr; } | |
571 | |
572 static const TypePtr *make( TYPES t, PTR ptr, int offset ); | |
573 | |
574 // Return a 'ptr' version of this type | |
575 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
576 | |
577 virtual intptr_t get_con() const; | |
578 | |
579 virtual const TypePtr *add_offset( int offset ) const; | |
580 | |
581 virtual bool singleton(void) const; // TRUE if type is a singleton | |
582 virtual bool empty(void) const; // TRUE if type is vacuous | |
583 virtual const Type *xmeet( const Type *t ) const; | |
584 int meet_offset( int offset ) const; | |
585 int dual_offset( ) const; | |
586 virtual const Type *xdual() const; // Compute dual right now. | |
587 | |
588 // meet, dual and join over pointer equivalence sets | |
589 PTR meet_ptr( const PTR in_ptr ) const { return ptr_meet[in_ptr][ptr()]; } | |
590 PTR dual_ptr() const { return ptr_dual[ptr()]; } | |
591 | |
592 // This is textually confusing unless one recalls that | |
593 // join(t) == dual()->meet(t->dual())->dual(). | |
594 PTR join_ptr( const PTR in_ptr ) const { | |
595 return ptr_dual[ ptr_meet[ ptr_dual[in_ptr] ] [ dual_ptr() ] ]; | |
596 } | |
597 | |
598 // Tests for relation to centerline of type lattice: | |
599 static bool above_centerline(PTR ptr) { return (ptr <= AnyNull); } | |
600 static bool below_centerline(PTR ptr) { return (ptr >= NotNull); } | |
601 // Convenience common pre-built types. | |
602 static const TypePtr *NULL_PTR; | |
603 static const TypePtr *NOTNULL; | |
604 static const TypePtr *BOTTOM; | |
605 #ifndef PRODUCT | |
606 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
607 #endif | |
608 }; | |
609 | |
610 //------------------------------TypeRawPtr------------------------------------- | |
611 // Class of raw pointers, pointers to things other than Oops. Examples | |
612 // include the stack pointer, top of heap, card-marking area, handles, etc. | |
613 class TypeRawPtr : public TypePtr { | |
614 protected: | |
615 TypeRawPtr( PTR ptr, address bits ) : TypePtr(RawPtr,ptr,0), _bits(bits){} | |
616 public: | |
617 virtual bool eq( const Type *t ) const; | |
618 virtual int hash() const; // Type specific hashing | |
619 | |
620 const address _bits; // Constant value, if applicable | |
621 | |
622 static const TypeRawPtr *make( PTR ptr ); | |
623 static const TypeRawPtr *make( address bits ); | |
624 | |
625 // Return a 'ptr' version of this type | |
626 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
627 | |
628 virtual intptr_t get_con() const; | |
629 | |
630 virtual const TypePtr *add_offset( int offset ) const; | |
631 | |
632 virtual const Type *xmeet( const Type *t ) const; | |
633 virtual const Type *xdual() const; // Compute dual right now. | |
634 // Convenience common pre-built types. | |
635 static const TypeRawPtr *BOTTOM; | |
636 static const TypeRawPtr *NOTNULL; | |
637 #ifndef PRODUCT | |
638 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
639 #endif | |
640 }; | |
641 | |
642 //------------------------------TypeOopPtr------------------------------------- | |
643 // Some kind of oop (Java pointer), either klass or instance or array. | |
644 class TypeOopPtr : public TypePtr { | |
645 protected: | |
646 TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id ) : TypePtr(t, ptr, offset), _const_oop(o), _klass(k), _klass_is_exact(xk), _instance_id(instance_id) { } | |
647 public: | |
648 virtual bool eq( const Type *t ) const; | |
649 virtual int hash() const; // Type specific hashing | |
650 virtual bool singleton(void) const; // TRUE if type is a singleton | |
651 enum { | |
652 UNKNOWN_INSTANCE = 0 | |
653 }; | |
654 protected: | |
655 | |
656 int xadd_offset( int offset ) const; | |
657 // Oop is NULL, unless this is a constant oop. | |
658 ciObject* _const_oop; // Constant oop | |
659 // If _klass is NULL, then so is _sig. This is an unloaded klass. | |
660 ciKlass* _klass; // Klass object | |
661 // Does the type exclude subclasses of the klass? (Inexact == polymorphic.) | |
662 bool _klass_is_exact; | |
663 | |
664 int _instance_id; // if not UNKNOWN_INSTANCE, indicates that this is a particular instance | |
665 // of this type which is distinct. This is the the node index of the | |
666 // node creating this instance | |
667 | |
668 static const TypeOopPtr* make_from_klass_common(ciKlass* klass, bool klass_change, bool try_for_exact); | |
669 | |
670 int dual_instance() const { return -_instance_id; } | |
671 int meet_instance(int uid) const; | |
672 | |
673 public: | |
674 // Creates a type given a klass. Correctly handles multi-dimensional arrays | |
675 // Respects UseUniqueSubclasses. | |
676 // If the klass is final, the resulting type will be exact. | |
677 static const TypeOopPtr* make_from_klass(ciKlass* klass) { | |
678 return make_from_klass_common(klass, true, false); | |
679 } | |
680 // Same as before, but will produce an exact type, even if | |
681 // the klass is not final, as long as it has exactly one implementation. | |
682 static const TypeOopPtr* make_from_klass_unique(ciKlass* klass) { | |
683 return make_from_klass_common(klass, true, true); | |
684 } | |
685 // Same as before, but does not respects UseUniqueSubclasses. | |
686 // Use this only for creating array element types. | |
687 static const TypeOopPtr* make_from_klass_raw(ciKlass* klass) { | |
688 return make_from_klass_common(klass, false, false); | |
689 } | |
690 // Creates a singleton type given an object. | |
691 static const TypeOopPtr* make_from_constant(ciObject* o); | |
692 | |
693 // Make a generic (unclassed) pointer to an oop. | |
694 static const TypeOopPtr* make(PTR ptr, int offset); | |
695 | |
696 ciObject* const_oop() const { return _const_oop; } | |
697 virtual ciKlass* klass() const { return _klass; } | |
698 bool klass_is_exact() const { return _klass_is_exact; } | |
699 bool is_instance() const { return _instance_id != UNKNOWN_INSTANCE; } | |
700 uint instance_id() const { return _instance_id; } | |
64
b8f5ba577b02
6673473: (Escape Analysis) Add the instance's field information to PhiNode
kvn
parents:
17
diff
changeset
|
701 bool is_instance_field() const { return _instance_id != UNKNOWN_INSTANCE && _offset >= 0; } |
0 | 702 |
703 virtual intptr_t get_con() const; | |
704 | |
705 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
706 | |
707 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
708 | |
709 virtual const TypeOopPtr *cast_to_instance(int instance_id) const; | |
710 | |
711 // corresponding pointer to klass, for a given instance | |
712 const TypeKlassPtr* as_klass_type() const; | |
713 | |
714 virtual const TypePtr *add_offset( int offset ) const; | |
715 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
716 // returns the equivalent compressed version of this pointer type |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
717 virtual const TypeNarrowOop* make_narrowoop() const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
718 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
719 #ifdef _LP64 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
720 virtual bool is_narrow() const { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
721 return (UseCompressedOops && _offset != 0); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
722 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
723 #endif |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
724 |
0 | 725 virtual const Type *xmeet( const Type *t ) const; |
726 virtual const Type *xdual() const; // Compute dual right now. | |
727 | |
728 // Do not allow interface-vs.-noninterface joins to collapse to top. | |
729 virtual const Type *filter( const Type *kills ) const; | |
730 | |
731 // Convenience common pre-built type. | |
732 static const TypeOopPtr *BOTTOM; | |
733 #ifndef PRODUCT | |
734 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
735 #endif | |
736 }; | |
737 | |
738 //------------------------------TypeInstPtr------------------------------------ | |
739 // Class of Java object pointers, pointing either to non-array Java instances | |
740 // or to a klassOop (including array klasses). | |
741 class TypeInstPtr : public TypeOopPtr { | |
742 TypeInstPtr( PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id ); | |
743 virtual bool eq( const Type *t ) const; | |
744 virtual int hash() const; // Type specific hashing | |
745 | |
746 ciSymbol* _name; // class name | |
747 | |
748 public: | |
749 ciSymbol* name() const { return _name; } | |
750 | |
751 bool is_loaded() const { return _klass->is_loaded(); } | |
752 | |
753 // Make a pointer to a constant oop. | |
754 static const TypeInstPtr *make(ciObject* o) { | |
755 return make(TypePtr::Constant, o->klass(), true, o, 0); | |
756 } | |
757 | |
758 // Make a pointer to a constant oop with offset. | |
759 static const TypeInstPtr *make(ciObject* o, int offset) { | |
760 return make(TypePtr::Constant, o->klass(), true, o, offset); | |
761 } | |
762 | |
763 // Make a pointer to some value of type klass. | |
764 static const TypeInstPtr *make(PTR ptr, ciKlass* klass) { | |
765 return make(ptr, klass, false, NULL, 0); | |
766 } | |
767 | |
768 // Make a pointer to some non-polymorphic value of exactly type klass. | |
769 static const TypeInstPtr *make_exact(PTR ptr, ciKlass* klass) { | |
770 return make(ptr, klass, true, NULL, 0); | |
771 } | |
772 | |
773 // Make a pointer to some value of type klass with offset. | |
774 static const TypeInstPtr *make(PTR ptr, ciKlass* klass, int offset) { | |
775 return make(ptr, klass, false, NULL, offset); | |
776 } | |
777 | |
778 // Make a pointer to an oop. | |
779 static const TypeInstPtr *make(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id = 0 ); | |
780 | |
781 // If this is a java.lang.Class constant, return the type for it or NULL. | |
782 // Pass to Type::get_const_type to turn it to a type, which will usually | |
783 // be a TypeInstPtr, but may also be a TypeInt::INT for int.class, etc. | |
784 ciType* java_mirror_type() const; | |
785 | |
786 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
787 | |
788 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
789 | |
790 virtual const TypeOopPtr *cast_to_instance(int instance_id) const; | |
791 | |
792 virtual const TypePtr *add_offset( int offset ) const; | |
793 | |
794 virtual const Type *xmeet( const Type *t ) const; | |
795 virtual const TypeInstPtr *xmeet_unloaded( const TypeInstPtr *t ) const; | |
796 virtual const Type *xdual() const; // Compute dual right now. | |
797 | |
798 // Convenience common pre-built types. | |
799 static const TypeInstPtr *NOTNULL; | |
800 static const TypeInstPtr *BOTTOM; | |
801 static const TypeInstPtr *MIRROR; | |
802 static const TypeInstPtr *MARK; | |
803 static const TypeInstPtr *KLASS; | |
804 #ifndef PRODUCT | |
805 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
806 #endif | |
807 }; | |
808 | |
809 //------------------------------TypeAryPtr------------------------------------- | |
810 // Class of Java array pointers | |
811 class TypeAryPtr : public TypeOopPtr { | |
812 TypeAryPtr( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id ) : TypeOopPtr(AryPtr,ptr,k,xk,o,offset, instance_id), _ary(ary) {}; | |
813 virtual bool eq( const Type *t ) const; | |
814 virtual int hash() const; // Type specific hashing | |
815 const TypeAry *_ary; // Array we point into | |
816 | |
817 public: | |
818 // Accessors | |
819 ciKlass* klass() const; | |
820 const TypeAry* ary() const { return _ary; } | |
821 const Type* elem() const { return _ary->_elem; } | |
822 const TypeInt* size() const { return _ary->_size; } | |
823 | |
824 static const TypeAryPtr *make( PTR ptr, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = 0); | |
825 // Constant pointer to array | |
826 static const TypeAryPtr *make( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = 0); | |
827 | |
828 // Convenience | |
829 static const TypeAryPtr *make(ciObject* o); | |
830 | |
831 // Return a 'ptr' version of this type | |
832 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
833 | |
834 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
835 | |
836 virtual const TypeOopPtr *cast_to_instance(int instance_id) const; | |
837 | |
838 virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const; | |
839 | |
840 virtual bool empty(void) const; // TRUE if type is vacuous | |
841 virtual const TypePtr *add_offset( int offset ) const; | |
842 | |
843 virtual const Type *xmeet( const Type *t ) const; | |
844 virtual const Type *xdual() const; // Compute dual right now. | |
845 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
846 #ifdef _LP64 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
847 virtual bool is_narrow() const { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
848 return (UseCompressedOops && klass() != NULL && _offset != 0); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
849 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
850 #endif |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
851 |
0 | 852 // Convenience common pre-built types. |
853 static const TypeAryPtr *RANGE; | |
854 static const TypeAryPtr *OOPS; | |
855 static const TypeAryPtr *BYTES; | |
856 static const TypeAryPtr *SHORTS; | |
857 static const TypeAryPtr *CHARS; | |
858 static const TypeAryPtr *INTS; | |
859 static const TypeAryPtr *LONGS; | |
860 static const TypeAryPtr *FLOATS; | |
861 static const TypeAryPtr *DOUBLES; | |
862 // selects one of the above: | |
863 static const TypeAryPtr *get_array_body_type(BasicType elem) { | |
864 assert((uint)elem <= T_CONFLICT && _array_body_type[elem] != NULL, "bad elem type"); | |
865 return _array_body_type[elem]; | |
866 } | |
867 static const TypeAryPtr *_array_body_type[T_CONFLICT+1]; | |
868 // sharpen the type of an int which is used as an array size | |
869 static const TypeInt* narrow_size_type(const TypeInt* size, BasicType elem); | |
870 #ifndef PRODUCT | |
871 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
872 #endif | |
873 }; | |
874 | |
875 //------------------------------TypeKlassPtr----------------------------------- | |
876 // Class of Java Klass pointers | |
877 class TypeKlassPtr : public TypeOopPtr { | |
878 TypeKlassPtr( PTR ptr, ciKlass* klass, int offset ); | |
879 | |
880 virtual bool eq( const Type *t ) const; | |
881 virtual int hash() const; // Type specific hashing | |
882 | |
883 public: | |
884 ciSymbol* name() const { return _klass->name(); } | |
885 | |
886 // ptr to klass 'k' | |
887 static const TypeKlassPtr *make( ciKlass* k ) { return make( TypePtr::Constant, k, 0); } | |
888 // ptr to klass 'k' with offset | |
889 static const TypeKlassPtr *make( ciKlass* k, int offset ) { return make( TypePtr::Constant, k, offset); } | |
890 // ptr to klass 'k' or sub-klass | |
891 static const TypeKlassPtr *make( PTR ptr, ciKlass* k, int offset); | |
892 | |
893 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
894 | |
895 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
896 | |
897 // corresponding pointer to instance, for a given class | |
898 const TypeOopPtr* as_instance_type() const; | |
899 | |
900 virtual const TypePtr *add_offset( int offset ) const; | |
901 virtual const Type *xmeet( const Type *t ) const; | |
902 virtual const Type *xdual() const; // Compute dual right now. | |
903 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
904 #ifdef _LP64 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
905 // Perm objects don't use compressed references, except for static fields |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
906 // which are currently compressed |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
907 virtual bool is_narrow() const { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
908 if (UseCompressedOops && _offset != 0 && _klass->is_instance_klass()) { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
909 ciInstanceKlass* ik = _klass->as_instance_klass(); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
910 return ik != NULL && ik->get_field_by_offset(_offset, true) != NULL; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
911 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
912 return false; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
913 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
914 #endif |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
915 |
0 | 916 // Convenience common pre-built types. |
917 static const TypeKlassPtr* OBJECT; // Not-null object klass or below | |
918 static const TypeKlassPtr* OBJECT_OR_NULL; // Maybe-null version of same | |
919 #ifndef PRODUCT | |
920 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
921 #endif | |
922 }; | |
923 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
924 //------------------------------TypeNarrowOop---------------------------------------- |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
925 // A compressed reference to some kind of Oop. This type wraps around |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
926 // a preexisting TypeOopPtr and forwards most of it's operations to |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
927 // the underlying type. It's only real purpose is to track the |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
928 // oopness of the compressed oop value when we expose the conversion |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
929 // between the normal and the compressed form. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
930 class TypeNarrowOop : public Type { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
931 protected: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
932 const TypePtr* _ooptype; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
933 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
934 TypeNarrowOop( const TypePtr* ooptype): Type(NarrowOop), |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
935 _ooptype(ooptype) { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
936 assert(ooptype->offset() == 0 || |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
937 ooptype->offset() == OffsetBot || |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
938 ooptype->offset() == OffsetTop, "no real offsets"); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
939 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
940 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
941 virtual bool eq( const Type *t ) const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
942 virtual int hash() const; // Type specific hashing |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
943 virtual bool singleton(void) const; // TRUE if type is a singleton |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
944 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
945 virtual const Type *xmeet( const Type *t ) const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
946 virtual const Type *xdual() const; // Compute dual right now. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
947 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
948 virtual intptr_t get_con() const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
949 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
950 // Do not allow interface-vs.-noninterface joins to collapse to top. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
951 virtual const Type *filter( const Type *kills ) const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
952 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
953 virtual bool empty(void) const; // TRUE if type is vacuous |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
954 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
955 static const TypeNarrowOop *make( const TypePtr* type); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
956 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
957 static const TypeNarrowOop* make_from_constant(ciObject* con) { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
958 return make(TypeOopPtr::make_from_constant(con)); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
959 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
960 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
961 // returns the equivalent oopptr type for this compressed pointer |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
962 virtual const TypePtr *make_oopptr() const { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
963 return _ooptype; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
964 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
965 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
966 static const TypeNarrowOop *BOTTOM; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
967 static const TypeNarrowOop *NULL_PTR; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
968 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
969 #ifndef PRODUCT |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
970 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
971 #endif |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
972 }; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
973 |
0 | 974 //------------------------------TypeFunc--------------------------------------- |
975 // Class of Array Types | |
976 class TypeFunc : public Type { | |
977 TypeFunc( const TypeTuple *domain, const TypeTuple *range ) : Type(Function), _domain(domain), _range(range) {} | |
978 virtual bool eq( const Type *t ) const; | |
979 virtual int hash() const; // Type specific hashing | |
980 virtual bool singleton(void) const; // TRUE if type is a singleton | |
981 virtual bool empty(void) const; // TRUE if type is vacuous | |
982 public: | |
983 // Constants are shared among ADLC and VM | |
984 enum { Control = AdlcVMDeps::Control, | |
985 I_O = AdlcVMDeps::I_O, | |
986 Memory = AdlcVMDeps::Memory, | |
987 FramePtr = AdlcVMDeps::FramePtr, | |
988 ReturnAdr = AdlcVMDeps::ReturnAdr, | |
989 Parms = AdlcVMDeps::Parms | |
990 }; | |
991 | |
992 const TypeTuple* const _domain; // Domain of inputs | |
993 const TypeTuple* const _range; // Range of results | |
994 | |
995 // Accessors: | |
996 const TypeTuple* domain() const { return _domain; } | |
997 const TypeTuple* range() const { return _range; } | |
998 | |
999 static const TypeFunc *make(ciMethod* method); | |
1000 static const TypeFunc *make(ciSignature signature, const Type* extra); | |
1001 static const TypeFunc *make(const TypeTuple* domain, const TypeTuple* range); | |
1002 | |
1003 virtual const Type *xmeet( const Type *t ) const; | |
1004 virtual const Type *xdual() const; // Compute dual right now. | |
1005 | |
1006 BasicType return_type() const; | |
1007 | |
1008 #ifndef PRODUCT | |
1009 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
1010 void print_flattened() const; // Print a 'flattened' signature | |
1011 #endif | |
1012 // Convenience common pre-built types. | |
1013 }; | |
1014 | |
1015 //------------------------------accessors-------------------------------------- | |
1016 inline float Type::getf() const { | |
1017 assert( _base == FloatCon, "Not a FloatCon" ); | |
1018 return ((TypeF*)this)->_f; | |
1019 } | |
1020 | |
1021 inline double Type::getd() const { | |
1022 assert( _base == DoubleCon, "Not a DoubleCon" ); | |
1023 return ((TypeD*)this)->_d; | |
1024 } | |
1025 | |
1026 inline const TypeF *Type::is_float_constant() const { | |
1027 assert( _base == FloatCon, "Not a Float" ); | |
1028 return (TypeF*)this; | |
1029 } | |
1030 | |
1031 inline const TypeF *Type::isa_float_constant() const { | |
1032 return ( _base == FloatCon ? (TypeF*)this : NULL); | |
1033 } | |
1034 | |
1035 inline const TypeD *Type::is_double_constant() const { | |
1036 assert( _base == DoubleCon, "Not a Double" ); | |
1037 return (TypeD*)this; | |
1038 } | |
1039 | |
1040 inline const TypeD *Type::isa_double_constant() const { | |
1041 return ( _base == DoubleCon ? (TypeD*)this : NULL); | |
1042 } | |
1043 | |
1044 inline const TypeInt *Type::is_int() const { | |
1045 assert( _base == Int, "Not an Int" ); | |
1046 return (TypeInt*)this; | |
1047 } | |
1048 | |
1049 inline const TypeInt *Type::isa_int() const { | |
1050 return ( _base == Int ? (TypeInt*)this : NULL); | |
1051 } | |
1052 | |
1053 inline const TypeLong *Type::is_long() const { | |
1054 assert( _base == Long, "Not a Long" ); | |
1055 return (TypeLong*)this; | |
1056 } | |
1057 | |
1058 inline const TypeLong *Type::isa_long() const { | |
1059 return ( _base == Long ? (TypeLong*)this : NULL); | |
1060 } | |
1061 | |
1062 inline const TypeTuple *Type::is_tuple() const { | |
1063 assert( _base == Tuple, "Not a Tuple" ); | |
1064 return (TypeTuple*)this; | |
1065 } | |
1066 | |
1067 inline const TypeAry *Type::is_ary() const { | |
1068 assert( _base == Array , "Not an Array" ); | |
1069 return (TypeAry*)this; | |
1070 } | |
1071 | |
1072 inline const TypePtr *Type::is_ptr() const { | |
1073 // AnyPtr is the first Ptr and KlassPtr the last, with no non-ptrs between. | |
1074 assert(_base >= AnyPtr && _base <= KlassPtr, "Not a pointer"); | |
1075 return (TypePtr*)this; | |
1076 } | |
1077 | |
1078 inline const TypePtr *Type::isa_ptr() const { | |
1079 // AnyPtr is the first Ptr and KlassPtr the last, with no non-ptrs between. | |
1080 return (_base >= AnyPtr && _base <= KlassPtr) ? (TypePtr*)this : NULL; | |
1081 } | |
1082 | |
1083 inline const TypeOopPtr *Type::is_oopptr() const { | |
1084 // OopPtr is the first and KlassPtr the last, with no non-oops between. | |
1085 assert(_base >= OopPtr && _base <= KlassPtr, "Not a Java pointer" ) ; | |
1086 return (TypeOopPtr*)this; | |
1087 } | |
1088 | |
1089 inline const TypeOopPtr *Type::isa_oopptr() const { | |
1090 // OopPtr is the first and KlassPtr the last, with no non-oops between. | |
1091 return (_base >= OopPtr && _base <= KlassPtr) ? (TypeOopPtr*)this : NULL; | |
1092 } | |
1093 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1094 inline const TypeRawPtr *Type::isa_rawptr() const { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1095 return (_base == RawPtr) ? (TypeRawPtr*)this : NULL; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1096 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1097 |
0 | 1098 inline const TypeRawPtr *Type::is_rawptr() const { |
1099 assert( _base == RawPtr, "Not a raw pointer" ); | |
1100 return (TypeRawPtr*)this; | |
1101 } | |
1102 | |
1103 inline const TypeInstPtr *Type::isa_instptr() const { | |
1104 return (_base == InstPtr) ? (TypeInstPtr*)this : NULL; | |
1105 } | |
1106 | |
1107 inline const TypeInstPtr *Type::is_instptr() const { | |
1108 assert( _base == InstPtr, "Not an object pointer" ); | |
1109 return (TypeInstPtr*)this; | |
1110 } | |
1111 | |
1112 inline const TypeAryPtr *Type::isa_aryptr() const { | |
1113 return (_base == AryPtr) ? (TypeAryPtr*)this : NULL; | |
1114 } | |
1115 | |
1116 inline const TypeAryPtr *Type::is_aryptr() const { | |
1117 assert( _base == AryPtr, "Not an array pointer" ); | |
1118 return (TypeAryPtr*)this; | |
1119 } | |
1120 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1121 inline const TypeNarrowOop *Type::is_narrowoop() const { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1122 // OopPtr is the first and KlassPtr the last, with no non-oops between. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1123 assert(_base == NarrowOop, "Not a narrow oop" ) ; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1124 return (TypeNarrowOop*)this; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1125 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1126 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1127 inline const TypeNarrowOop *Type::isa_narrowoop() const { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1128 // OopPtr is the first and KlassPtr the last, with no non-oops between. |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1129 return (_base == NarrowOop) ? (TypeNarrowOop*)this : NULL; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1130 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1131 |
0 | 1132 inline const TypeKlassPtr *Type::isa_klassptr() const { |
1133 return (_base == KlassPtr) ? (TypeKlassPtr*)this : NULL; | |
1134 } | |
1135 | |
1136 inline const TypeKlassPtr *Type::is_klassptr() const { | |
1137 assert( _base == KlassPtr, "Not a klass pointer" ); | |
1138 return (TypeKlassPtr*)this; | |
1139 } | |
1140 | |
1141 inline bool Type::is_floatingpoint() const { | |
1142 if( (_base == FloatCon) || (_base == FloatBot) || | |
1143 (_base == DoubleCon) || (_base == DoubleBot) ) | |
1144 return true; | |
1145 return false; | |
1146 } | |
1147 | |
1148 | |
1149 // =============================================================== | |
1150 // Things that need to be 64-bits in the 64-bit build but | |
1151 // 32-bits in the 32-bit build. Done this way to get full | |
1152 // optimization AND strong typing. | |
1153 #ifdef _LP64 | |
1154 | |
1155 // For type queries and asserts | |
1156 #define is_intptr_t is_long | |
1157 #define isa_intptr_t isa_long | |
1158 #define find_intptr_t_type find_long_type | |
1159 #define find_intptr_t_con find_long_con | |
1160 #define TypeX TypeLong | |
1161 #define Type_X Type::Long | |
1162 #define TypeX_X TypeLong::LONG | |
1163 #define TypeX_ZERO TypeLong::ZERO | |
1164 // For 'ideal_reg' machine registers | |
1165 #define Op_RegX Op_RegL | |
1166 // For phase->intcon variants | |
1167 #define MakeConX longcon | |
1168 #define ConXNode ConLNode | |
1169 // For array index arithmetic | |
1170 #define MulXNode MulLNode | |
1171 #define AndXNode AndLNode | |
1172 #define OrXNode OrLNode | |
1173 #define CmpXNode CmpLNode | |
1174 #define SubXNode SubLNode | |
1175 #define LShiftXNode LShiftLNode | |
1176 // For object size computation: | |
1177 #define AddXNode AddLNode | |
17
ff5961f4c095
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
0
diff
changeset
|
1178 #define RShiftXNode RShiftLNode |
0 | 1179 // For card marks and hashcodes |
1180 #define URShiftXNode URShiftLNode | |
1181 // Opcodes | |
1182 #define Op_LShiftX Op_LShiftL | |
1183 #define Op_AndX Op_AndL | |
1184 #define Op_AddX Op_AddL | |
1185 #define Op_SubX Op_SubL | |
1186 // conversions | |
1187 #define ConvI2X(x) ConvI2L(x) | |
1188 #define ConvL2X(x) (x) | |
1189 #define ConvX2I(x) ConvL2I(x) | |
1190 #define ConvX2L(x) (x) | |
1191 | |
1192 #else | |
1193 | |
1194 // For type queries and asserts | |
1195 #define is_intptr_t is_int | |
1196 #define isa_intptr_t isa_int | |
1197 #define find_intptr_t_type find_int_type | |
1198 #define find_intptr_t_con find_int_con | |
1199 #define TypeX TypeInt | |
1200 #define Type_X Type::Int | |
1201 #define TypeX_X TypeInt::INT | |
1202 #define TypeX_ZERO TypeInt::ZERO | |
1203 // For 'ideal_reg' machine registers | |
1204 #define Op_RegX Op_RegI | |
1205 // For phase->intcon variants | |
1206 #define MakeConX intcon | |
1207 #define ConXNode ConINode | |
1208 // For array index arithmetic | |
1209 #define MulXNode MulINode | |
1210 #define AndXNode AndINode | |
1211 #define OrXNode OrINode | |
1212 #define CmpXNode CmpINode | |
1213 #define SubXNode SubINode | |
1214 #define LShiftXNode LShiftINode | |
1215 // For object size computation: | |
1216 #define AddXNode AddINode | |
17
ff5961f4c095
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
0
diff
changeset
|
1217 #define RShiftXNode RShiftINode |
0 | 1218 // For card marks and hashcodes |
1219 #define URShiftXNode URShiftINode | |
1220 // Opcodes | |
1221 #define Op_LShiftX Op_LShiftI | |
1222 #define Op_AndX Op_AndI | |
1223 #define Op_AddX Op_AddI | |
1224 #define Op_SubX Op_SubI | |
1225 // conversions | |
1226 #define ConvI2X(x) (x) | |
1227 #define ConvL2X(x) ConvL2I(x) | |
1228 #define ConvX2I(x) (x) | |
1229 #define ConvX2L(x) ConvI2L(x) | |
1230 | |
1231 #endif |