Mercurial > hg > truffle
annotate src/share/vm/opto/type.hpp @ 452:00b023ae2d78
6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
Summary: When we encounter marking stack overflow during precleaning of Reference lists, we were using the overflow list mechanism, which can cause problems on account of mutating the mark word of the header because of conflicts with mutator accesses and updates of that field. Instead we should use the usual mechanism for overflow handling in concurrent phases, namely dirtying of the card on which the overflowed object lies. Since precleaning effectively does a form of discovered list processing, albeit with discovery enabled, we needed to adjust some code to be correct in the face of interleaved processing and discovery.
Reviewed-by: apetrusenko, jcoomes
author | ysr |
---|---|
date | Thu, 20 Nov 2008 12:27:41 -0800 |
parents | a1980da045cc |
children | 35ae4dd6c27c |
rev | line source |
---|---|
0 | 1 /* |
196 | 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. |
0 | 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 |
163 | 194 // compressed oop references. |
195 bool is_ptr_to_narrowoop() const; | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
196 |
0 | 197 // Convenience access |
198 float getf() const; | |
199 double getd() const; | |
200 | |
201 const TypeInt *is_int() const; | |
202 const TypeInt *isa_int() const; // Returns NULL if not an Int | |
203 const TypeLong *is_long() const; | |
204 const TypeLong *isa_long() const; // Returns NULL if not a Long | |
205 const TypeD *is_double_constant() const; // Asserts it is a DoubleCon | |
206 const TypeD *isa_double_constant() const; // Returns NULL if not a DoubleCon | |
207 const TypeF *is_float_constant() const; // Asserts it is a FloatCon | |
208 const TypeF *isa_float_constant() const; // Returns NULL if not a FloatCon | |
209 const TypeTuple *is_tuple() const; // Collection of fields, NOT a pointer | |
210 const TypeAry *is_ary() const; // Array, NOT array pointer | |
211 const TypePtr *is_ptr() const; // Asserts it is a ptr type | |
212 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
|
213 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
|
214 const TypeRawPtr *is_rawptr() const; // Asserts is rawptr |
163 | 215 const TypeNarrowOop *is_narrowoop() const; // Java-style GC'd pointer |
216 const TypeNarrowOop *isa_narrowoop() const; // Returns NULL if not oop ptr type | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
217 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
|
218 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
|
219 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
|
220 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
|
221 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
|
222 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
|
223 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
|
224 const TypeAryPtr *is_aryptr() const; // Array oop |
0 | 225 virtual bool is_finite() const; // Has a finite value |
226 virtual bool is_nan() const; // Is not a number (NaN) | |
227 | |
221
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
228 // Returns this ptr type or the equivalent ptr type for this compressed pointer. |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
229 const TypePtr* make_ptr() const; |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
230 // Returns this compressed pointer or the equivalent compressed version |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
231 // of this pointer type. |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
232 const TypeNarrowOop* make_narrowoop() const; |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
233 |
0 | 234 // Special test for register pressure heuristic |
235 bool is_floatingpoint() const; // True if Float or Double base type | |
236 | |
237 // Do you have memory, directly or through a tuple? | |
238 bool has_memory( ) const; | |
239 | |
240 // Are you a pointer type or not? | |
241 bool isa_oop_ptr() const; | |
242 | |
243 // TRUE if type is a singleton | |
244 virtual bool singleton(void) const; | |
245 | |
246 // TRUE if type is above the lattice centerline, and is therefore vacuous | |
247 virtual bool empty(void) const; | |
248 | |
249 // Return a hash for this type. The hash function is public so ConNode | |
250 // (constants) can hash on their constant, which is represented by a Type. | |
251 virtual int hash() const; | |
252 | |
253 // Map ideal registers (machine types) to ideal types | |
254 static const Type *mreg2type[]; | |
255 | |
256 // Printing, statistics | |
257 static const char * const msg[lastype]; // Printable strings | |
258 #ifndef PRODUCT | |
259 void dump_on(outputStream *st) const; | |
260 void dump() const { | |
261 dump_on(tty); | |
262 } | |
263 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
264 static void dump_stats(); | |
265 static void verify_lastype(); // Check that arrays match type enum | |
266 #endif | |
267 void typerr(const Type *t) const; // Mixing types error | |
268 | |
269 // Create basic type | |
270 static const Type* get_const_basic_type(BasicType type) { | |
271 assert((uint)type <= T_CONFLICT && _const_basic_type[type] != NULL, "bad type"); | |
272 return _const_basic_type[type]; | |
273 } | |
274 | |
275 // Mapping to the array element's basic type. | |
276 BasicType array_element_basic_type() const; | |
277 | |
278 // Create standard type for a ciType: | |
279 static const Type* get_const_type(ciType* type); | |
280 | |
281 // Create standard zero value: | |
282 static const Type* get_zero_type(BasicType type) { | |
283 assert((uint)type <= T_CONFLICT && _zero_type[type] != NULL, "bad type"); | |
284 return _zero_type[type]; | |
285 } | |
286 | |
287 // Report if this is a zero value (not top). | |
288 bool is_zero_type() const { | |
289 BasicType type = basic_type(); | |
290 if (type == T_VOID || type >= T_CONFLICT) | |
291 return false; | |
292 else | |
293 return (this == _zero_type[type]); | |
294 } | |
295 | |
296 // Convenience common pre-built types. | |
297 static const Type *ABIO; | |
298 static const Type *BOTTOM; | |
299 static const Type *CONTROL; | |
300 static const Type *DOUBLE; | |
301 static const Type *FLOAT; | |
302 static const Type *HALF; | |
303 static const Type *MEMORY; | |
304 static const Type *MULTI; | |
305 static const Type *RETURN_ADDRESS; | |
306 static const Type *TOP; | |
307 | |
308 // Mapping from compiler type to VM BasicType | |
309 BasicType basic_type() const { return _basic_type[_base]; } | |
310 | |
311 // Mapping from CI type system to compiler type: | |
312 static const Type* get_typeflow_type(ciType* type); | |
313 | |
314 private: | |
315 // support arrays | |
316 static const BasicType _basic_type[]; | |
317 static const Type* _zero_type[T_CONFLICT+1]; | |
318 static const Type* _const_basic_type[T_CONFLICT+1]; | |
319 }; | |
320 | |
321 //------------------------------TypeF------------------------------------------ | |
322 // Class of Float-Constant Types. | |
323 class TypeF : public Type { | |
324 TypeF( float f ) : Type(FloatCon), _f(f) {}; | |
325 public: | |
326 virtual bool eq( const Type *t ) const; | |
327 virtual int hash() const; // Type specific hashing | |
328 virtual bool singleton(void) const; // TRUE if type is a singleton | |
329 virtual bool empty(void) const; // TRUE if type is vacuous | |
330 public: | |
331 const float _f; // Float constant | |
332 | |
333 static const TypeF *make(float f); | |
334 | |
335 virtual bool is_finite() const; // Has a finite value | |
336 virtual bool is_nan() const; // Is not a number (NaN) | |
337 | |
338 virtual const Type *xmeet( const Type *t ) const; | |
339 virtual const Type *xdual() const; // Compute dual right now. | |
340 // Convenience common pre-built types. | |
341 static const TypeF *ZERO; // positive zero only | |
342 static const TypeF *ONE; | |
343 #ifndef PRODUCT | |
344 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
345 #endif | |
346 }; | |
347 | |
348 //------------------------------TypeD------------------------------------------ | |
349 // Class of Double-Constant Types. | |
350 class TypeD : public Type { | |
351 TypeD( double d ) : Type(DoubleCon), _d(d) {}; | |
352 public: | |
353 virtual bool eq( const Type *t ) const; | |
354 virtual int hash() const; // Type specific hashing | |
355 virtual bool singleton(void) const; // TRUE if type is a singleton | |
356 virtual bool empty(void) const; // TRUE if type is vacuous | |
357 public: | |
358 const double _d; // Double constant | |
359 | |
360 static const TypeD *make(double d); | |
361 | |
362 virtual bool is_finite() const; // Has a finite value | |
363 virtual bool is_nan() const; // Is not a number (NaN) | |
364 | |
365 virtual const Type *xmeet( const Type *t ) const; | |
366 virtual const Type *xdual() const; // Compute dual right now. | |
367 // Convenience common pre-built types. | |
368 static const TypeD *ZERO; // positive zero only | |
369 static const TypeD *ONE; | |
370 #ifndef PRODUCT | |
371 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
372 #endif | |
373 }; | |
374 | |
375 //------------------------------TypeInt---------------------------------------- | |
376 // Class of integer ranges, the set of integers between a lower bound and an | |
377 // upper bound, inclusive. | |
378 class TypeInt : public Type { | |
379 TypeInt( jint lo, jint hi, int w ); | |
380 public: | |
381 virtual bool eq( const Type *t ) const; | |
382 virtual int hash() const; // Type specific hashing | |
383 virtual bool singleton(void) const; // TRUE if type is a singleton | |
384 virtual bool empty(void) const; // TRUE if type is vacuous | |
385 public: | |
386 const jint _lo, _hi; // Lower bound, upper bound | |
387 const short _widen; // Limit on times we widen this sucker | |
388 | |
389 static const TypeInt *make(jint lo); | |
390 // must always specify w | |
391 static const TypeInt *make(jint lo, jint hi, int w); | |
392 | |
393 // Check for single integer | |
394 int is_con() const { return _lo==_hi; } | |
395 bool is_con(int i) const { return is_con() && _lo == i; } | |
396 jint get_con() const { assert( is_con(), "" ); return _lo; } | |
397 | |
398 virtual bool is_finite() const; // Has a finite value | |
399 | |
400 virtual const Type *xmeet( const Type *t ) const; | |
401 virtual const Type *xdual() const; // Compute dual right now. | |
402 virtual const Type *widen( const Type *t ) const; | |
403 virtual const Type *narrow( const Type *t ) const; | |
404 // Do not kill _widen bits. | |
405 virtual const Type *filter( const Type *kills ) const; | |
406 // Convenience common pre-built types. | |
407 static const TypeInt *MINUS_1; | |
408 static const TypeInt *ZERO; | |
409 static const TypeInt *ONE; | |
410 static const TypeInt *BOOL; | |
411 static const TypeInt *CC; | |
412 static const TypeInt *CC_LT; // [-1] == MINUS_1 | |
413 static const TypeInt *CC_GT; // [1] == ONE | |
414 static const TypeInt *CC_EQ; // [0] == ZERO | |
415 static const TypeInt *CC_LE; // [-1,0] | |
416 static const TypeInt *CC_GE; // [0,1] == BOOL (!) | |
417 static const TypeInt *BYTE; | |
418 static const TypeInt *CHAR; | |
419 static const TypeInt *SHORT; | |
420 static const TypeInt *POS; | |
421 static const TypeInt *POS1; | |
422 static const TypeInt *INT; | |
423 static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint] | |
424 #ifndef PRODUCT | |
425 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
426 #endif | |
427 }; | |
428 | |
429 | |
430 //------------------------------TypeLong--------------------------------------- | |
431 // Class of long integer ranges, the set of integers between a lower bound and | |
432 // an upper bound, inclusive. | |
433 class TypeLong : public Type { | |
434 TypeLong( jlong lo, jlong hi, int w ); | |
435 public: | |
436 virtual bool eq( const Type *t ) const; | |
437 virtual int hash() const; // Type specific hashing | |
438 virtual bool singleton(void) const; // TRUE if type is a singleton | |
439 virtual bool empty(void) const; // TRUE if type is vacuous | |
440 public: | |
441 const jlong _lo, _hi; // Lower bound, upper bound | |
442 const short _widen; // Limit on times we widen this sucker | |
443 | |
444 static const TypeLong *make(jlong lo); | |
445 // must always specify w | |
446 static const TypeLong *make(jlong lo, jlong hi, int w); | |
447 | |
448 // Check for single integer | |
449 int is_con() const { return _lo==_hi; } | |
145 | 450 bool is_con(int i) const { return is_con() && _lo == i; } |
0 | 451 jlong get_con() const { assert( is_con(), "" ); return _lo; } |
452 | |
453 virtual bool is_finite() const; // Has a finite value | |
454 | |
455 virtual const Type *xmeet( const Type *t ) const; | |
456 virtual const Type *xdual() const; // Compute dual right now. | |
457 virtual const Type *widen( const Type *t ) const; | |
458 virtual const Type *narrow( const Type *t ) const; | |
459 // Do not kill _widen bits. | |
460 virtual const Type *filter( const Type *kills ) const; | |
461 // Convenience common pre-built types. | |
462 static const TypeLong *MINUS_1; | |
463 static const TypeLong *ZERO; | |
464 static const TypeLong *ONE; | |
465 static const TypeLong *POS; | |
466 static const TypeLong *LONG; | |
467 static const TypeLong *INT; // 32-bit subrange [min_jint..max_jint] | |
468 static const TypeLong *UINT; // 32-bit unsigned [0..max_juint] | |
469 #ifndef PRODUCT | |
470 virtual void dump2( Dict &d, uint, outputStream *st ) const;// Specialized per-Type dumping | |
471 #endif | |
472 }; | |
473 | |
474 //------------------------------TypeTuple-------------------------------------- | |
475 // Class of Tuple Types, essentially type collections for function signatures | |
476 // and class layouts. It happens to also be a fast cache for the HotSpot | |
477 // signature types. | |
478 class TypeTuple : public Type { | |
479 TypeTuple( uint cnt, const Type **fields ) : Type(Tuple), _cnt(cnt), _fields(fields) { } | |
480 public: | |
481 virtual bool eq( const Type *t ) const; | |
482 virtual int hash() const; // Type specific hashing | |
483 virtual bool singleton(void) const; // TRUE if type is a singleton | |
484 virtual bool empty(void) const; // TRUE if type is vacuous | |
485 | |
486 public: | |
487 const uint _cnt; // Count of fields | |
488 const Type ** const _fields; // Array of field types | |
489 | |
490 // Accessors: | |
491 uint cnt() const { return _cnt; } | |
492 const Type* field_at(uint i) const { | |
493 assert(i < _cnt, "oob"); | |
494 return _fields[i]; | |
495 } | |
496 void set_field_at(uint i, const Type* t) { | |
497 assert(i < _cnt, "oob"); | |
498 _fields[i] = t; | |
499 } | |
500 | |
501 static const TypeTuple *make( uint cnt, const Type **fields ); | |
502 static const TypeTuple *make_range(ciSignature *sig); | |
503 static const TypeTuple *make_domain(ciInstanceKlass* recv, ciSignature *sig); | |
504 | |
505 // Subroutine call type with space allocated for argument types | |
506 static const Type **fields( uint arg_cnt ); | |
507 | |
508 virtual const Type *xmeet( const Type *t ) const; | |
509 virtual const Type *xdual() const; // Compute dual right now. | |
510 // Convenience common pre-built types. | |
511 static const TypeTuple *IFBOTH; | |
512 static const TypeTuple *IFFALSE; | |
513 static const TypeTuple *IFTRUE; | |
514 static const TypeTuple *IFNEITHER; | |
515 static const TypeTuple *LOOPBODY; | |
516 static const TypeTuple *MEMBAR; | |
517 static const TypeTuple *STORECONDITIONAL; | |
518 static const TypeTuple *START_I2C; | |
519 static const TypeTuple *INT_PAIR; | |
520 static const TypeTuple *LONG_PAIR; | |
521 #ifndef PRODUCT | |
522 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping | |
523 #endif | |
524 }; | |
525 | |
526 //------------------------------TypeAry---------------------------------------- | |
527 // Class of Array Types | |
528 class TypeAry : public Type { | |
529 TypeAry( const Type *elem, const TypeInt *size) : Type(Array), | |
530 _elem(elem), _size(size) {} | |
531 public: | |
532 virtual bool eq( const Type *t ) const; | |
533 virtual int hash() const; // Type specific hashing | |
534 virtual bool singleton(void) const; // TRUE if type is a singleton | |
535 virtual bool empty(void) const; // TRUE if type is vacuous | |
536 | |
537 private: | |
538 const Type *_elem; // Element type of array | |
539 const TypeInt *_size; // Elements in array | |
540 friend class TypeAryPtr; | |
541 | |
542 public: | |
543 static const TypeAry *make( const Type *elem, const TypeInt *size); | |
544 | |
545 virtual const Type *xmeet( const Type *t ) const; | |
546 virtual const Type *xdual() const; // Compute dual right now. | |
547 bool ary_must_be_exact() const; // true if arrays of such are never generic | |
548 #ifndef PRODUCT | |
549 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping | |
550 #endif | |
551 }; | |
552 | |
553 //------------------------------TypePtr---------------------------------------- | |
554 // Class of machine Pointer Types: raw data, instances or arrays. | |
555 // If the _base enum is AnyPtr, then this refers to all of the above. | |
556 // Otherwise the _base will indicate which subset of pointers is affected, | |
557 // and the class will be inherited from. | |
558 class TypePtr : public Type { | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
559 friend class TypeNarrowOop; |
0 | 560 public: |
561 enum PTR { TopPTR, AnyNull, Constant, Null, NotNull, BotPTR, lastPTR }; | |
562 protected: | |
563 TypePtr( TYPES t, PTR ptr, int offset ) : Type(t), _ptr(ptr), _offset(offset) {} | |
564 virtual bool eq( const Type *t ) const; | |
565 virtual int hash() const; // Type specific hashing | |
566 static const PTR ptr_meet[lastPTR][lastPTR]; | |
567 static const PTR ptr_dual[lastPTR]; | |
568 static const char * const ptr_msg[lastPTR]; | |
569 | |
570 public: | |
571 const int _offset; // Offset into oop, with TOP & BOT | |
572 const PTR _ptr; // Pointer equivalence class | |
573 | |
574 const int offset() const { return _offset; } | |
575 const PTR ptr() const { return _ptr; } | |
576 | |
577 static const TypePtr *make( TYPES t, PTR ptr, int offset ); | |
578 | |
579 // Return a 'ptr' version of this type | |
580 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
581 | |
582 virtual intptr_t get_con() const; | |
583 | |
306
af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
kvn
parents:
235
diff
changeset
|
584 int xadd_offset( intptr_t offset ) const; |
af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
kvn
parents:
235
diff
changeset
|
585 virtual const TypePtr *add_offset( intptr_t offset ) const; |
0 | 586 |
587 virtual bool singleton(void) const; // TRUE if type is a singleton | |
588 virtual bool empty(void) const; // TRUE if type is vacuous | |
589 virtual const Type *xmeet( const Type *t ) const; | |
590 int meet_offset( int offset ) const; | |
591 int dual_offset( ) const; | |
592 virtual const Type *xdual() const; // Compute dual right now. | |
593 | |
594 // meet, dual and join over pointer equivalence sets | |
595 PTR meet_ptr( const PTR in_ptr ) const { return ptr_meet[in_ptr][ptr()]; } | |
596 PTR dual_ptr() const { return ptr_dual[ptr()]; } | |
597 | |
598 // This is textually confusing unless one recalls that | |
599 // join(t) == dual()->meet(t->dual())->dual(). | |
600 PTR join_ptr( const PTR in_ptr ) const { | |
601 return ptr_dual[ ptr_meet[ ptr_dual[in_ptr] ] [ dual_ptr() ] ]; | |
602 } | |
603 | |
604 // Tests for relation to centerline of type lattice: | |
605 static bool above_centerline(PTR ptr) { return (ptr <= AnyNull); } | |
606 static bool below_centerline(PTR ptr) { return (ptr >= NotNull); } | |
607 // Convenience common pre-built types. | |
608 static const TypePtr *NULL_PTR; | |
609 static const TypePtr *NOTNULL; | |
610 static const TypePtr *BOTTOM; | |
611 #ifndef PRODUCT | |
612 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
613 #endif | |
614 }; | |
615 | |
616 //------------------------------TypeRawPtr------------------------------------- | |
617 // Class of raw pointers, pointers to things other than Oops. Examples | |
618 // include the stack pointer, top of heap, card-marking area, handles, etc. | |
619 class TypeRawPtr : public TypePtr { | |
620 protected: | |
621 TypeRawPtr( PTR ptr, address bits ) : TypePtr(RawPtr,ptr,0), _bits(bits){} | |
622 public: | |
623 virtual bool eq( const Type *t ) const; | |
624 virtual int hash() const; // Type specific hashing | |
625 | |
626 const address _bits; // Constant value, if applicable | |
627 | |
628 static const TypeRawPtr *make( PTR ptr ); | |
629 static const TypeRawPtr *make( address bits ); | |
630 | |
631 // Return a 'ptr' version of this type | |
632 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
633 | |
634 virtual intptr_t get_con() const; | |
635 | |
306
af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
kvn
parents:
235
diff
changeset
|
636 virtual const TypePtr *add_offset( intptr_t offset ) const; |
0 | 637 |
638 virtual const Type *xmeet( const Type *t ) const; | |
639 virtual const Type *xdual() const; // Compute dual right now. | |
640 // Convenience common pre-built types. | |
641 static const TypeRawPtr *BOTTOM; | |
642 static const TypeRawPtr *NOTNULL; | |
643 #ifndef PRODUCT | |
644 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
645 #endif | |
646 }; | |
647 | |
648 //------------------------------TypeOopPtr------------------------------------- | |
649 // Some kind of oop (Java pointer), either klass or instance or array. | |
650 class TypeOopPtr : public TypePtr { | |
651 protected: | |
163 | 652 TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id ); |
0 | 653 public: |
654 virtual bool eq( const Type *t ) const; | |
655 virtual int hash() const; // Type specific hashing | |
656 virtual bool singleton(void) const; // TRUE if type is a singleton | |
657 enum { | |
223 | 658 InstanceTop = -1, // undefined instance |
659 InstanceBot = 0 // any possible instance | |
0 | 660 }; |
661 protected: | |
662 | |
663 // Oop is NULL, unless this is a constant oop. | |
664 ciObject* _const_oop; // Constant oop | |
665 // If _klass is NULL, then so is _sig. This is an unloaded klass. | |
666 ciKlass* _klass; // Klass object | |
667 // Does the type exclude subclasses of the klass? (Inexact == polymorphic.) | |
668 bool _klass_is_exact; | |
163 | 669 bool _is_ptr_to_narrowoop; |
0 | 670 |
223 | 671 // If not InstanceTop or InstanceBot, indicates that this is |
672 // a particular instance of this type which is distinct. | |
673 // This is the the node index of the allocation node creating this instance. | |
674 int _instance_id; | |
0 | 675 |
676 static const TypeOopPtr* make_from_klass_common(ciKlass* klass, bool klass_change, bool try_for_exact); | |
677 | |
223 | 678 int dual_instance_id() const; |
679 int meet_instance_id(int uid) const; | |
0 | 680 |
681 public: | |
682 // Creates a type given a klass. Correctly handles multi-dimensional arrays | |
683 // Respects UseUniqueSubclasses. | |
684 // If the klass is final, the resulting type will be exact. | |
685 static const TypeOopPtr* make_from_klass(ciKlass* klass) { | |
686 return make_from_klass_common(klass, true, false); | |
687 } | |
688 // Same as before, but will produce an exact type, even if | |
689 // the klass is not final, as long as it has exactly one implementation. | |
690 static const TypeOopPtr* make_from_klass_unique(ciKlass* klass) { | |
691 return make_from_klass_common(klass, true, true); | |
692 } | |
693 // Same as before, but does not respects UseUniqueSubclasses. | |
694 // Use this only for creating array element types. | |
695 static const TypeOopPtr* make_from_klass_raw(ciKlass* klass) { | |
696 return make_from_klass_common(klass, false, false); | |
697 } | |
698 // Creates a singleton type given an object. | |
699 static const TypeOopPtr* make_from_constant(ciObject* o); | |
700 | |
701 // Make a generic (unclassed) pointer to an oop. | |
702 static const TypeOopPtr* make(PTR ptr, int offset); | |
703 | |
704 ciObject* const_oop() const { return _const_oop; } | |
705 virtual ciKlass* klass() const { return _klass; } | |
706 bool klass_is_exact() const { return _klass_is_exact; } | |
163 | 707 |
708 // Returns true if this pointer points at memory which contains a | |
709 // compressed oop references. | |
710 bool is_ptr_to_narrowoop_nv() const { return _is_ptr_to_narrowoop; } | |
711 | |
223 | 712 bool is_known_instance() const { return _instance_id > 0; } |
713 int instance_id() const { return _instance_id; } | |
714 bool is_known_instance_field() const { return is_known_instance() && _offset >= 0; } | |
0 | 715 |
716 virtual intptr_t get_con() const; | |
717 | |
718 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
719 | |
720 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
721 | |
223 | 722 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; |
0 | 723 |
724 // corresponding pointer to klass, for a given instance | |
725 const TypeKlassPtr* as_klass_type() const; | |
726 | |
306
af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
kvn
parents:
235
diff
changeset
|
727 virtual const TypePtr *add_offset( intptr_t offset ) const; |
0 | 728 |
729 virtual const Type *xmeet( const Type *t ) const; | |
730 virtual const Type *xdual() const; // Compute dual right now. | |
731 | |
732 // Do not allow interface-vs.-noninterface joins to collapse to top. | |
733 virtual const Type *filter( const Type *kills ) const; | |
734 | |
735 // Convenience common pre-built type. | |
736 static const TypeOopPtr *BOTTOM; | |
737 #ifndef PRODUCT | |
738 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | |
739 #endif | |
740 }; | |
741 | |
742 //------------------------------TypeInstPtr------------------------------------ | |
743 // Class of Java object pointers, pointing either to non-array Java instances | |
744 // or to a klassOop (including array klasses). | |
745 class TypeInstPtr : public TypeOopPtr { | |
746 TypeInstPtr( PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id ); | |
747 virtual bool eq( const Type *t ) const; | |
748 virtual int hash() const; // Type specific hashing | |
749 | |
750 ciSymbol* _name; // class name | |
751 | |
752 public: | |
753 ciSymbol* name() const { return _name; } | |
754 | |
755 bool is_loaded() const { return _klass->is_loaded(); } | |
756 | |
757 // Make a pointer to a constant oop. | |
758 static const TypeInstPtr *make(ciObject* o) { | |
759 return make(TypePtr::Constant, o->klass(), true, o, 0); | |
760 } | |
761 | |
762 // Make a pointer to a constant oop with offset. | |
763 static const TypeInstPtr *make(ciObject* o, int offset) { | |
764 return make(TypePtr::Constant, o->klass(), true, o, offset); | |
765 } | |
766 | |
767 // Make a pointer to some value of type klass. | |
768 static const TypeInstPtr *make(PTR ptr, ciKlass* klass) { | |
769 return make(ptr, klass, false, NULL, 0); | |
770 } | |
771 | |
772 // Make a pointer to some non-polymorphic value of exactly type klass. | |
773 static const TypeInstPtr *make_exact(PTR ptr, ciKlass* klass) { | |
774 return make(ptr, klass, true, NULL, 0); | |
775 } | |
776 | |
777 // Make a pointer to some value of type klass with offset. | |
778 static const TypeInstPtr *make(PTR ptr, ciKlass* klass, int offset) { | |
779 return make(ptr, klass, false, NULL, offset); | |
780 } | |
781 | |
782 // Make a pointer to an oop. | |
223 | 783 static const TypeInstPtr *make(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id = InstanceBot ); |
0 | 784 |
785 // If this is a java.lang.Class constant, return the type for it or NULL. | |
786 // Pass to Type::get_const_type to turn it to a type, which will usually | |
787 // be a TypeInstPtr, but may also be a TypeInt::INT for int.class, etc. | |
788 ciType* java_mirror_type() const; | |
789 | |
790 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
791 | |
792 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
793 | |
223 | 794 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; |
0 | 795 |
306
af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
kvn
parents:
235
diff
changeset
|
796 virtual const TypePtr *add_offset( intptr_t offset ) const; |
0 | 797 |
798 virtual const Type *xmeet( const Type *t ) const; | |
799 virtual const TypeInstPtr *xmeet_unloaded( const TypeInstPtr *t ) const; | |
800 virtual const Type *xdual() const; // Compute dual right now. | |
801 | |
802 // Convenience common pre-built types. | |
803 static const TypeInstPtr *NOTNULL; | |
804 static const TypeInstPtr *BOTTOM; | |
805 static const TypeInstPtr *MIRROR; | |
806 static const TypeInstPtr *MARK; | |
807 static const TypeInstPtr *KLASS; | |
808 #ifndef PRODUCT | |
809 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
810 #endif | |
811 }; | |
812 | |
813 //------------------------------TypeAryPtr------------------------------------- | |
814 // Class of Java array pointers | |
815 class TypeAryPtr : public TypeOopPtr { | |
816 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) {}; | |
817 virtual bool eq( const Type *t ) const; | |
818 virtual int hash() const; // Type specific hashing | |
819 const TypeAry *_ary; // Array we point into | |
820 | |
821 public: | |
822 // Accessors | |
823 ciKlass* klass() const; | |
824 const TypeAry* ary() const { return _ary; } | |
825 const Type* elem() const { return _ary->_elem; } | |
826 const TypeInt* size() const { return _ary->_size; } | |
827 | |
223 | 828 static const TypeAryPtr *make( PTR ptr, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot); |
0 | 829 // Constant pointer to array |
223 | 830 static const TypeAryPtr *make( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot); |
0 | 831 |
832 // Convenience | |
833 static const TypeAryPtr *make(ciObject* o); | |
834 | |
835 // Return a 'ptr' version of this type | |
836 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
837 | |
838 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
839 | |
223 | 840 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; |
0 | 841 |
842 virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const; | |
366
8261ee795323
6711100: 64bit fastdebug server vm crashes with assert(_base == Int,"Not an Int")
rasbold
parents:
306
diff
changeset
|
843 virtual const TypeInt* narrow_size_type(const TypeInt* size) const; |
0 | 844 |
845 virtual bool empty(void) const; // TRUE if type is vacuous | |
306
af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
kvn
parents:
235
diff
changeset
|
846 virtual const TypePtr *add_offset( intptr_t offset ) const; |
0 | 847 |
848 virtual const Type *xmeet( const Type *t ) const; | |
849 virtual const Type *xdual() const; // Compute dual right now. | |
850 | |
851 // Convenience common pre-built types. | |
852 static const TypeAryPtr *RANGE; | |
853 static const TypeAryPtr *OOPS; | |
163 | 854 static const TypeAryPtr *NARROWOOPS; |
0 | 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 #ifndef PRODUCT | |
870 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
871 #endif | |
872 }; | |
873 | |
874 //------------------------------TypeKlassPtr----------------------------------- | |
875 // Class of Java Klass pointers | |
876 class TypeKlassPtr : public TypeOopPtr { | |
877 TypeKlassPtr( PTR ptr, ciKlass* klass, int offset ); | |
878 | |
879 virtual bool eq( const Type *t ) const; | |
880 virtual int hash() const; // Type specific hashing | |
881 | |
882 public: | |
883 ciSymbol* name() const { return _klass->name(); } | |
884 | |
885 // ptr to klass 'k' | |
886 static const TypeKlassPtr *make( ciKlass* k ) { return make( TypePtr::Constant, k, 0); } | |
887 // ptr to klass 'k' with offset | |
888 static const TypeKlassPtr *make( ciKlass* k, int offset ) { return make( TypePtr::Constant, k, offset); } | |
889 // ptr to klass 'k' or sub-klass | |
890 static const TypeKlassPtr *make( PTR ptr, ciKlass* k, int offset); | |
891 | |
892 virtual const Type *cast_to_ptr_type(PTR ptr) const; | |
893 | |
894 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | |
895 | |
896 // corresponding pointer to instance, for a given class | |
897 const TypeOopPtr* as_instance_type() const; | |
898 | |
306
af945ba2e739
6741738: TypePtr::add_offset() set incorrect offset when the add overflows
kvn
parents:
235
diff
changeset
|
899 virtual const TypePtr *add_offset( intptr_t offset ) const; |
0 | 900 virtual const Type *xmeet( const Type *t ) const; |
901 virtual const Type *xdual() const; // Compute dual right now. | |
902 | |
903 // Convenience common pre-built types. | |
904 static const TypeKlassPtr* OBJECT; // Not-null object klass or below | |
905 static const TypeKlassPtr* OBJECT_OR_NULL; // Maybe-null version of same | |
906 #ifndef PRODUCT | |
907 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
908 #endif | |
909 }; | |
910 | |
163 | 911 //------------------------------TypeNarrowOop---------------------------------- |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
912 // 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
|
913 // 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
|
914 // 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
|
915 // 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
|
916 // 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
|
917 class TypeNarrowOop : public Type { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
918 protected: |
221
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
919 const TypePtr* _ooptype; // Could be TypePtr::NULL_PTR |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
920 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
921 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
|
922 _ooptype(ooptype) { |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
923 assert(ooptype->offset() == 0 || |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
924 ooptype->offset() == OffsetBot || |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
925 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
|
926 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
927 public: |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
928 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
|
929 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
|
930 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
|
931 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
932 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
|
933 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
|
934 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
935 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
|
936 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
937 // 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
|
938 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
|
939 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
940 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
|
941 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
942 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
|
943 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
944 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
|
945 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
|
946 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
947 |
221
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
948 // returns the equivalent ptr type for this compressed pointer |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
949 const TypePtr *make_oopptr() const { |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
950 return _ooptype; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
951 } |
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 static const TypeNarrowOop *BOTTOM; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
954 static const TypeNarrowOop *NULL_PTR; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
955 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
956 #ifndef PRODUCT |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
957 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
|
958 #endif |
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 |
0 | 961 //------------------------------TypeFunc--------------------------------------- |
962 // Class of Array Types | |
963 class TypeFunc : public Type { | |
964 TypeFunc( const TypeTuple *domain, const TypeTuple *range ) : Type(Function), _domain(domain), _range(range) {} | |
965 virtual bool eq( const Type *t ) const; | |
966 virtual int hash() const; // Type specific hashing | |
967 virtual bool singleton(void) const; // TRUE if type is a singleton | |
968 virtual bool empty(void) const; // TRUE if type is vacuous | |
969 public: | |
970 // Constants are shared among ADLC and VM | |
971 enum { Control = AdlcVMDeps::Control, | |
972 I_O = AdlcVMDeps::I_O, | |
973 Memory = AdlcVMDeps::Memory, | |
974 FramePtr = AdlcVMDeps::FramePtr, | |
975 ReturnAdr = AdlcVMDeps::ReturnAdr, | |
976 Parms = AdlcVMDeps::Parms | |
977 }; | |
978 | |
979 const TypeTuple* const _domain; // Domain of inputs | |
980 const TypeTuple* const _range; // Range of results | |
981 | |
982 // Accessors: | |
983 const TypeTuple* domain() const { return _domain; } | |
984 const TypeTuple* range() const { return _range; } | |
985 | |
986 static const TypeFunc *make(ciMethod* method); | |
987 static const TypeFunc *make(ciSignature signature, const Type* extra); | |
988 static const TypeFunc *make(const TypeTuple* domain, const TypeTuple* range); | |
989 | |
990 virtual const Type *xmeet( const Type *t ) const; | |
991 virtual const Type *xdual() const; // Compute dual right now. | |
992 | |
993 BasicType return_type() const; | |
994 | |
995 #ifndef PRODUCT | |
996 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping | |
997 void print_flattened() const; // Print a 'flattened' signature | |
998 #endif | |
999 // Convenience common pre-built types. | |
1000 }; | |
1001 | |
1002 //------------------------------accessors-------------------------------------- | |
163 | 1003 inline bool Type::is_ptr_to_narrowoop() const { |
1004 #ifdef _LP64 | |
1005 return (isa_oopptr() != NULL && is_oopptr()->is_ptr_to_narrowoop_nv()); | |
1006 #else | |
1007 return false; | |
1008 #endif | |
1009 } | |
1010 | |
0 | 1011 inline float Type::getf() const { |
1012 assert( _base == FloatCon, "Not a FloatCon" ); | |
1013 return ((TypeF*)this)->_f; | |
1014 } | |
1015 | |
1016 inline double Type::getd() const { | |
1017 assert( _base == DoubleCon, "Not a DoubleCon" ); | |
1018 return ((TypeD*)this)->_d; | |
1019 } | |
1020 | |
1021 inline const TypeF *Type::is_float_constant() const { | |
1022 assert( _base == FloatCon, "Not a Float" ); | |
1023 return (TypeF*)this; | |
1024 } | |
1025 | |
1026 inline const TypeF *Type::isa_float_constant() const { | |
1027 return ( _base == FloatCon ? (TypeF*)this : NULL); | |
1028 } | |
1029 | |
1030 inline const TypeD *Type::is_double_constant() const { | |
1031 assert( _base == DoubleCon, "Not a Double" ); | |
1032 return (TypeD*)this; | |
1033 } | |
1034 | |
1035 inline const TypeD *Type::isa_double_constant() const { | |
1036 return ( _base == DoubleCon ? (TypeD*)this : NULL); | |
1037 } | |
1038 | |
1039 inline const TypeInt *Type::is_int() const { | |
1040 assert( _base == Int, "Not an Int" ); | |
1041 return (TypeInt*)this; | |
1042 } | |
1043 | |
1044 inline const TypeInt *Type::isa_int() const { | |
1045 return ( _base == Int ? (TypeInt*)this : NULL); | |
1046 } | |
1047 | |
1048 inline const TypeLong *Type::is_long() const { | |
1049 assert( _base == Long, "Not a Long" ); | |
1050 return (TypeLong*)this; | |
1051 } | |
1052 | |
1053 inline const TypeLong *Type::isa_long() const { | |
1054 return ( _base == Long ? (TypeLong*)this : NULL); | |
1055 } | |
1056 | |
1057 inline const TypeTuple *Type::is_tuple() const { | |
1058 assert( _base == Tuple, "Not a Tuple" ); | |
1059 return (TypeTuple*)this; | |
1060 } | |
1061 | |
1062 inline const TypeAry *Type::is_ary() const { | |
1063 assert( _base == Array , "Not an Array" ); | |
1064 return (TypeAry*)this; | |
1065 } | |
1066 | |
1067 inline const TypePtr *Type::is_ptr() const { | |
1068 // AnyPtr is the first Ptr and KlassPtr the last, with no non-ptrs between. | |
1069 assert(_base >= AnyPtr && _base <= KlassPtr, "Not a pointer"); | |
1070 return (TypePtr*)this; | |
1071 } | |
1072 | |
1073 inline const TypePtr *Type::isa_ptr() const { | |
1074 // AnyPtr is the first Ptr and KlassPtr the last, with no non-ptrs between. | |
1075 return (_base >= AnyPtr && _base <= KlassPtr) ? (TypePtr*)this : NULL; | |
1076 } | |
1077 | |
1078 inline const TypeOopPtr *Type::is_oopptr() const { | |
1079 // OopPtr is the first and KlassPtr the last, with no non-oops between. | |
1080 assert(_base >= OopPtr && _base <= KlassPtr, "Not a Java pointer" ) ; | |
1081 return (TypeOopPtr*)this; | |
1082 } | |
1083 | |
1084 inline const TypeOopPtr *Type::isa_oopptr() const { | |
1085 // OopPtr is the first and KlassPtr the last, with no non-oops between. | |
1086 return (_base >= OopPtr && _base <= KlassPtr) ? (TypeOopPtr*)this : NULL; | |
1087 } | |
1088 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1089 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
|
1090 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
|
1091 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1092 |
0 | 1093 inline const TypeRawPtr *Type::is_rawptr() const { |
1094 assert( _base == RawPtr, "Not a raw pointer" ); | |
1095 return (TypeRawPtr*)this; | |
1096 } | |
1097 | |
1098 inline const TypeInstPtr *Type::isa_instptr() const { | |
1099 return (_base == InstPtr) ? (TypeInstPtr*)this : NULL; | |
1100 } | |
1101 | |
1102 inline const TypeInstPtr *Type::is_instptr() const { | |
1103 assert( _base == InstPtr, "Not an object pointer" ); | |
1104 return (TypeInstPtr*)this; | |
1105 } | |
1106 | |
1107 inline const TypeAryPtr *Type::isa_aryptr() const { | |
1108 return (_base == AryPtr) ? (TypeAryPtr*)this : NULL; | |
1109 } | |
1110 | |
1111 inline const TypeAryPtr *Type::is_aryptr() const { | |
1112 assert( _base == AryPtr, "Not an array pointer" ); | |
1113 return (TypeAryPtr*)this; | |
1114 } | |
1115 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1116 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
|
1117 // 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
|
1118 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
|
1119 return (TypeNarrowOop*)this; |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1120 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1121 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1122 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
|
1123 // 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
|
1124 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
|
1125 } |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
64
diff
changeset
|
1126 |
0 | 1127 inline const TypeKlassPtr *Type::isa_klassptr() const { |
1128 return (_base == KlassPtr) ? (TypeKlassPtr*)this : NULL; | |
1129 } | |
1130 | |
1131 inline const TypeKlassPtr *Type::is_klassptr() const { | |
1132 assert( _base == KlassPtr, "Not a klass pointer" ); | |
1133 return (TypeKlassPtr*)this; | |
1134 } | |
1135 | |
221
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1136 inline const TypePtr* Type::make_ptr() const { |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1137 return (_base == NarrowOop) ? is_narrowoop()->make_oopptr() : |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1138 (isa_ptr() ? is_ptr() : NULL); |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1139 } |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1140 |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1141 inline const TypeNarrowOop* Type::make_narrowoop() const { |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1142 return (_base == NarrowOop) ? is_narrowoop() : |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1143 (isa_ptr() ? TypeNarrowOop::make(is_ptr()) : NULL); |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1144 } |
1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
kvn
parents:
163
diff
changeset
|
1145 |
0 | 1146 inline bool Type::is_floatingpoint() const { |
1147 if( (_base == FloatCon) || (_base == FloatBot) || | |
1148 (_base == DoubleCon) || (_base == DoubleBot) ) | |
1149 return true; | |
1150 return false; | |
1151 } | |
1152 | |
1153 | |
1154 // =============================================================== | |
1155 // Things that need to be 64-bits in the 64-bit build but | |
1156 // 32-bits in the 32-bit build. Done this way to get full | |
1157 // optimization AND strong typing. | |
1158 #ifdef _LP64 | |
1159 | |
1160 // For type queries and asserts | |
1161 #define is_intptr_t is_long | |
1162 #define isa_intptr_t isa_long | |
1163 #define find_intptr_t_type find_long_type | |
1164 #define find_intptr_t_con find_long_con | |
1165 #define TypeX TypeLong | |
1166 #define Type_X Type::Long | |
1167 #define TypeX_X TypeLong::LONG | |
1168 #define TypeX_ZERO TypeLong::ZERO | |
1169 // For 'ideal_reg' machine registers | |
1170 #define Op_RegX Op_RegL | |
1171 // For phase->intcon variants | |
1172 #define MakeConX longcon | |
1173 #define ConXNode ConLNode | |
1174 // For array index arithmetic | |
1175 #define MulXNode MulLNode | |
1176 #define AndXNode AndLNode | |
1177 #define OrXNode OrLNode | |
1178 #define CmpXNode CmpLNode | |
1179 #define SubXNode SubLNode | |
1180 #define LShiftXNode LShiftLNode | |
1181 // For object size computation: | |
1182 #define AddXNode AddLNode | |
17
ff5961f4c095
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
0
diff
changeset
|
1183 #define RShiftXNode RShiftLNode |
0 | 1184 // For card marks and hashcodes |
1185 #define URShiftXNode URShiftLNode | |
420
a1980da045cc
6462850: generate biased locking code in C2 ideal graph
kvn
parents:
366
diff
changeset
|
1186 // UseOptoBiasInlining |
a1980da045cc
6462850: generate biased locking code in C2 ideal graph
kvn
parents:
366
diff
changeset
|
1187 #define XorXNode XorLNode |
a1980da045cc
6462850: generate biased locking code in C2 ideal graph
kvn
parents:
366
diff
changeset
|
1188 #define StoreXConditionalNode StoreLConditionalNode |
0 | 1189 // Opcodes |
1190 #define Op_LShiftX Op_LShiftL | |
1191 #define Op_AndX Op_AndL | |
1192 #define Op_AddX Op_AddL | |
1193 #define Op_SubX Op_SubL | |
1194 // conversions | |
1195 #define ConvI2X(x) ConvI2L(x) | |
1196 #define ConvL2X(x) (x) | |
1197 #define ConvX2I(x) ConvL2I(x) | |
1198 #define ConvX2L(x) (x) | |
1199 | |
1200 #else | |
1201 | |
1202 // For type queries and asserts | |
1203 #define is_intptr_t is_int | |
1204 #define isa_intptr_t isa_int | |
1205 #define find_intptr_t_type find_int_type | |
1206 #define find_intptr_t_con find_int_con | |
1207 #define TypeX TypeInt | |
1208 #define Type_X Type::Int | |
1209 #define TypeX_X TypeInt::INT | |
1210 #define TypeX_ZERO TypeInt::ZERO | |
1211 // For 'ideal_reg' machine registers | |
1212 #define Op_RegX Op_RegI | |
1213 // For phase->intcon variants | |
1214 #define MakeConX intcon | |
1215 #define ConXNode ConINode | |
1216 // For array index arithmetic | |
1217 #define MulXNode MulINode | |
1218 #define AndXNode AndINode | |
1219 #define OrXNode OrINode | |
1220 #define CmpXNode CmpINode | |
1221 #define SubXNode SubINode | |
1222 #define LShiftXNode LShiftINode | |
1223 // For object size computation: | |
1224 #define AddXNode AddINode | |
17
ff5961f4c095
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
never
parents:
0
diff
changeset
|
1225 #define RShiftXNode RShiftINode |
0 | 1226 // For card marks and hashcodes |
1227 #define URShiftXNode URShiftINode | |
420
a1980da045cc
6462850: generate biased locking code in C2 ideal graph
kvn
parents:
366
diff
changeset
|
1228 // UseOptoBiasInlining |
a1980da045cc
6462850: generate biased locking code in C2 ideal graph
kvn
parents:
366
diff
changeset
|
1229 #define XorXNode XorINode |
a1980da045cc
6462850: generate biased locking code in C2 ideal graph
kvn
parents:
366
diff
changeset
|
1230 #define StoreXConditionalNode StoreIConditionalNode |
0 | 1231 // Opcodes |
1232 #define Op_LShiftX Op_LShiftI | |
1233 #define Op_AndX Op_AndI | |
1234 #define Op_AddX Op_AddI | |
1235 #define Op_SubX Op_SubI | |
1236 // conversions | |
1237 #define ConvI2X(x) (x) | |
1238 #define ConvL2X(x) ConvL2I(x) | |
1239 #define ConvX2I(x) (x) | |
1240 #define ConvX2L(x) ConvI2L(x) | |
1241 | |
1242 #endif |