Thu, 12 Mar 2009 18:16:36 -0700
Merge
1 /*
2 * Copyright 1997-2009 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 */
25 // Portions of code courtesy of Clifford Click
27 // Optimization - Graph Style
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.
38 class Dict;
39 class Type;
40 class TypeD;
41 class TypeF;
42 class TypeInt;
43 class TypeLong;
44 class TypeNarrowOop;
45 class TypeAry;
46 class TypeTuple;
47 class TypePtr;
48 class TypeRawPtr;
49 class TypeOopPtr;
50 class TypeInstPtr;
51 class TypeAryPtr;
52 class TypeKlassPtr;
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
68 NarrowOop, // Compressed oop pointer
70 Tuple, // Method signature or object layout
71 Array, // Array types
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.)
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 };
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 };
101 // Min and max WIDEN values.
102 enum WIDEN {
103 WidenMin = 0,
104 WidenMax = 3
105 };
107 private:
108 // Dictionary of types shared among compilations.
109 static Dict* _shared_type_dict;
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;
116 // Top-level hash-table of types
117 static Dict *type_dict() {
118 return Compile::current()->type_dict();
119 }
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];
128 protected:
129 // Each class of type is also identified by its base.
130 const TYPES _base; // Enum of Types type
132 Type( TYPES t ) : _dual(NULL), _base(t) {} // Simple types
133 // ~Type(); // Use fast deallocation
134 const Type *hashcons(); // Hash-cons the type
136 public:
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 }
150 // Initialize the type system for a particular compilation.
151 static void Initialize(Compile* compile);
153 // Initialize the types shared by all compilations.
154 static void Initialize_shared(Compile* compile);
156 TYPES base() const {
157 assert(_base > Bad && _base < lastype, "sanity");
158 return _base;
159 }
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); }
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; }
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; }
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.
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(); }
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;
193 // Returns true if this pointer points at memory which contains a
194 // compressed oop references.
195 bool is_ptr_to_narrowoop() const;
197 // Convenience access
198 float getf() const;
199 double getd() const;
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
213 const TypeRawPtr *isa_rawptr() const; // NOT Java oop
214 const TypeRawPtr *is_rawptr() const; // Asserts is rawptr
215 const TypeNarrowOop *is_narrowoop() const; // Java-style GC'd pointer
216 const TypeNarrowOop *isa_narrowoop() const; // Returns NULL if not oop ptr type
217 const TypeOopPtr *isa_oopptr() const; // Returns NULL if not oop ptr type
218 const TypeOopPtr *is_oopptr() const; // Java-style GC'd pointer
219 const TypeKlassPtr *isa_klassptr() const; // Returns NULL if not KlassPtr
220 const TypeKlassPtr *is_klassptr() const; // assert if not KlassPtr
221 const TypeInstPtr *isa_instptr() const; // Returns NULL if not InstPtr
222 const TypeInstPtr *is_instptr() const; // Instance
223 const TypeAryPtr *isa_aryptr() const; // Returns NULL if not AryPtr
224 const TypeAryPtr *is_aryptr() const; // Array oop
225 virtual bool is_finite() const; // Has a finite value
226 virtual bool is_nan() const; // Is not a number (NaN)
228 // Returns this ptr type or the equivalent ptr type for this compressed pointer.
229 const TypePtr* make_ptr() const;
230 // Returns this compressed pointer or the equivalent compressed version
231 // of this pointer type.
232 const TypeNarrowOop* make_narrowoop() const;
234 // Special test for register pressure heuristic
235 bool is_floatingpoint() const; // True if Float or Double base type
237 // Do you have memory, directly or through a tuple?
238 bool has_memory( ) const;
240 // Are you a pointer type or not?
241 bool isa_oop_ptr() const;
243 // TRUE if type is a singleton
244 virtual bool singleton(void) const;
246 // TRUE if type is above the lattice centerline, and is therefore vacuous
247 virtual bool empty(void) const;
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;
253 // Map ideal registers (machine types) to ideal types
254 static const Type *mreg2type[];
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
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 }
275 // Mapping to the array element's basic type.
276 BasicType array_element_basic_type() const;
278 // Create standard type for a ciType:
279 static const Type* get_const_type(ciType* type);
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 }
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 }
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;
308 // Mapping from compiler type to VM BasicType
309 BasicType basic_type() const { return _basic_type[_base]; }
311 // Mapping from CI type system to compiler type:
312 static const Type* get_typeflow_type(ciType* type);
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 };
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
333 static const TypeF *make(float f);
335 virtual bool is_finite() const; // Has a finite value
336 virtual bool is_nan() const; // Is not a number (NaN)
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 };
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
360 static const TypeD *make(double d);
362 virtual bool is_finite() const; // Has a finite value
363 virtual bool is_nan() const; // Is not a number (NaN)
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 };
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
389 static const TypeInt *make(jint lo);
390 // must always specify w
391 static const TypeInt *make(jint lo, jint hi, int w);
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; }
398 virtual bool is_finite() const; // Has a finite value
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 *UBYTE;
419 static const TypeInt *CHAR;
420 static const TypeInt *SHORT;
421 static const TypeInt *POS;
422 static const TypeInt *POS1;
423 static const TypeInt *INT;
424 static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint]
425 #ifndef PRODUCT
426 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
427 #endif
428 };
431 //------------------------------TypeLong---------------------------------------
432 // Class of long integer ranges, the set of integers between a lower bound and
433 // an upper bound, inclusive.
434 class TypeLong : public Type {
435 TypeLong( jlong lo, jlong hi, int w );
436 public:
437 virtual bool eq( const Type *t ) const;
438 virtual int hash() const; // Type specific hashing
439 virtual bool singleton(void) const; // TRUE if type is a singleton
440 virtual bool empty(void) const; // TRUE if type is vacuous
441 public:
442 const jlong _lo, _hi; // Lower bound, upper bound
443 const short _widen; // Limit on times we widen this sucker
445 static const TypeLong *make(jlong lo);
446 // must always specify w
447 static const TypeLong *make(jlong lo, jlong hi, int w);
449 // Check for single integer
450 int is_con() const { return _lo==_hi; }
451 bool is_con(int i) const { return is_con() && _lo == i; }
452 jlong get_con() const { assert( is_con(), "" ); return _lo; }
454 virtual bool is_finite() const; // Has a finite value
456 virtual const Type *xmeet( const Type *t ) const;
457 virtual const Type *xdual() const; // Compute dual right now.
458 virtual const Type *widen( const Type *t ) const;
459 virtual const Type *narrow( const Type *t ) const;
460 // Do not kill _widen bits.
461 virtual const Type *filter( const Type *kills ) const;
462 // Convenience common pre-built types.
463 static const TypeLong *MINUS_1;
464 static const TypeLong *ZERO;
465 static const TypeLong *ONE;
466 static const TypeLong *POS;
467 static const TypeLong *LONG;
468 static const TypeLong *INT; // 32-bit subrange [min_jint..max_jint]
469 static const TypeLong *UINT; // 32-bit unsigned [0..max_juint]
470 #ifndef PRODUCT
471 virtual void dump2( Dict &d, uint, outputStream *st ) const;// Specialized per-Type dumping
472 #endif
473 };
475 //------------------------------TypeTuple--------------------------------------
476 // Class of Tuple Types, essentially type collections for function signatures
477 // and class layouts. It happens to also be a fast cache for the HotSpot
478 // signature types.
479 class TypeTuple : public Type {
480 TypeTuple( uint cnt, const Type **fields ) : Type(Tuple), _cnt(cnt), _fields(fields) { }
481 public:
482 virtual bool eq( const Type *t ) const;
483 virtual int hash() const; // Type specific hashing
484 virtual bool singleton(void) const; // TRUE if type is a singleton
485 virtual bool empty(void) const; // TRUE if type is vacuous
487 public:
488 const uint _cnt; // Count of fields
489 const Type ** const _fields; // Array of field types
491 // Accessors:
492 uint cnt() const { return _cnt; }
493 const Type* field_at(uint i) const {
494 assert(i < _cnt, "oob");
495 return _fields[i];
496 }
497 void set_field_at(uint i, const Type* t) {
498 assert(i < _cnt, "oob");
499 _fields[i] = t;
500 }
502 static const TypeTuple *make( uint cnt, const Type **fields );
503 static const TypeTuple *make_range(ciSignature *sig);
504 static const TypeTuple *make_domain(ciInstanceKlass* recv, ciSignature *sig);
506 // Subroutine call type with space allocated for argument types
507 static const Type **fields( uint arg_cnt );
509 virtual const Type *xmeet( const Type *t ) const;
510 virtual const Type *xdual() const; // Compute dual right now.
511 // Convenience common pre-built types.
512 static const TypeTuple *IFBOTH;
513 static const TypeTuple *IFFALSE;
514 static const TypeTuple *IFTRUE;
515 static const TypeTuple *IFNEITHER;
516 static const TypeTuple *LOOPBODY;
517 static const TypeTuple *MEMBAR;
518 static const TypeTuple *STORECONDITIONAL;
519 static const TypeTuple *START_I2C;
520 static const TypeTuple *INT_PAIR;
521 static const TypeTuple *LONG_PAIR;
522 #ifndef PRODUCT
523 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping
524 #endif
525 };
527 //------------------------------TypeAry----------------------------------------
528 // Class of Array Types
529 class TypeAry : public Type {
530 TypeAry( const Type *elem, const TypeInt *size) : Type(Array),
531 _elem(elem), _size(size) {}
532 public:
533 virtual bool eq( const Type *t ) const;
534 virtual int hash() const; // Type specific hashing
535 virtual bool singleton(void) const; // TRUE if type is a singleton
536 virtual bool empty(void) const; // TRUE if type is vacuous
538 private:
539 const Type *_elem; // Element type of array
540 const TypeInt *_size; // Elements in array
541 friend class TypeAryPtr;
543 public:
544 static const TypeAry *make( const Type *elem, const TypeInt *size);
546 virtual const Type *xmeet( const Type *t ) const;
547 virtual const Type *xdual() const; // Compute dual right now.
548 bool ary_must_be_exact() const; // true if arrays of such are never generic
549 #ifndef PRODUCT
550 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping
551 #endif
552 };
554 //------------------------------TypePtr----------------------------------------
555 // Class of machine Pointer Types: raw data, instances or arrays.
556 // If the _base enum is AnyPtr, then this refers to all of the above.
557 // Otherwise the _base will indicate which subset of pointers is affected,
558 // and the class will be inherited from.
559 class TypePtr : public Type {
560 friend class TypeNarrowOop;
561 public:
562 enum PTR { TopPTR, AnyNull, Constant, Null, NotNull, BotPTR, lastPTR };
563 protected:
564 TypePtr( TYPES t, PTR ptr, int offset ) : Type(t), _ptr(ptr), _offset(offset) {}
565 virtual bool eq( const Type *t ) const;
566 virtual int hash() const; // Type specific hashing
567 static const PTR ptr_meet[lastPTR][lastPTR];
568 static const PTR ptr_dual[lastPTR];
569 static const char * const ptr_msg[lastPTR];
571 public:
572 const int _offset; // Offset into oop, with TOP & BOT
573 const PTR _ptr; // Pointer equivalence class
575 const int offset() const { return _offset; }
576 const PTR ptr() const { return _ptr; }
578 static const TypePtr *make( TYPES t, PTR ptr, int offset );
580 // Return a 'ptr' version of this type
581 virtual const Type *cast_to_ptr_type(PTR ptr) const;
583 virtual intptr_t get_con() const;
585 int xadd_offset( intptr_t offset ) const;
586 virtual const TypePtr *add_offset( intptr_t offset ) const;
588 virtual bool singleton(void) const; // TRUE if type is a singleton
589 virtual bool empty(void) const; // TRUE if type is vacuous
590 virtual const Type *xmeet( const Type *t ) const;
591 int meet_offset( int offset ) const;
592 int dual_offset( ) const;
593 virtual const Type *xdual() const; // Compute dual right now.
595 // meet, dual and join over pointer equivalence sets
596 PTR meet_ptr( const PTR in_ptr ) const { return ptr_meet[in_ptr][ptr()]; }
597 PTR dual_ptr() const { return ptr_dual[ptr()]; }
599 // This is textually confusing unless one recalls that
600 // join(t) == dual()->meet(t->dual())->dual().
601 PTR join_ptr( const PTR in_ptr ) const {
602 return ptr_dual[ ptr_meet[ ptr_dual[in_ptr] ] [ dual_ptr() ] ];
603 }
605 // Tests for relation to centerline of type lattice:
606 static bool above_centerline(PTR ptr) { return (ptr <= AnyNull); }
607 static bool below_centerline(PTR ptr) { return (ptr >= NotNull); }
608 // Convenience common pre-built types.
609 static const TypePtr *NULL_PTR;
610 static const TypePtr *NOTNULL;
611 static const TypePtr *BOTTOM;
612 #ifndef PRODUCT
613 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
614 #endif
615 };
617 //------------------------------TypeRawPtr-------------------------------------
618 // Class of raw pointers, pointers to things other than Oops. Examples
619 // include the stack pointer, top of heap, card-marking area, handles, etc.
620 class TypeRawPtr : public TypePtr {
621 protected:
622 TypeRawPtr( PTR ptr, address bits ) : TypePtr(RawPtr,ptr,0), _bits(bits){}
623 public:
624 virtual bool eq( const Type *t ) const;
625 virtual int hash() const; // Type specific hashing
627 const address _bits; // Constant value, if applicable
629 static const TypeRawPtr *make( PTR ptr );
630 static const TypeRawPtr *make( address bits );
632 // Return a 'ptr' version of this type
633 virtual const Type *cast_to_ptr_type(PTR ptr) const;
635 virtual intptr_t get_con() const;
637 virtual const TypePtr *add_offset( intptr_t offset ) const;
639 virtual const Type *xmeet( const Type *t ) const;
640 virtual const Type *xdual() const; // Compute dual right now.
641 // Convenience common pre-built types.
642 static const TypeRawPtr *BOTTOM;
643 static const TypeRawPtr *NOTNULL;
644 #ifndef PRODUCT
645 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
646 #endif
647 };
649 //------------------------------TypeOopPtr-------------------------------------
650 // Some kind of oop (Java pointer), either klass or instance or array.
651 class TypeOopPtr : public TypePtr {
652 protected:
653 TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id );
654 public:
655 virtual bool eq( const Type *t ) const;
656 virtual int hash() const; // Type specific hashing
657 virtual bool singleton(void) const; // TRUE if type is a singleton
658 enum {
659 InstanceTop = -1, // undefined instance
660 InstanceBot = 0 // any possible instance
661 };
662 protected:
664 // Oop is NULL, unless this is a constant oop.
665 ciObject* _const_oop; // Constant oop
666 // If _klass is NULL, then so is _sig. This is an unloaded klass.
667 ciKlass* _klass; // Klass object
668 // Does the type exclude subclasses of the klass? (Inexact == polymorphic.)
669 bool _klass_is_exact;
670 bool _is_ptr_to_narrowoop;
672 // If not InstanceTop or InstanceBot, indicates that this is
673 // a particular instance of this type which is distinct.
674 // This is the the node index of the allocation node creating this instance.
675 int _instance_id;
677 static const TypeOopPtr* make_from_klass_common(ciKlass* klass, bool klass_change, bool try_for_exact);
679 int dual_instance_id() const;
680 int meet_instance_id(int uid) const;
682 public:
683 // Creates a type given a klass. Correctly handles multi-dimensional arrays
684 // Respects UseUniqueSubclasses.
685 // If the klass is final, the resulting type will be exact.
686 static const TypeOopPtr* make_from_klass(ciKlass* klass) {
687 return make_from_klass_common(klass, true, false);
688 }
689 // Same as before, but will produce an exact type, even if
690 // the klass is not final, as long as it has exactly one implementation.
691 static const TypeOopPtr* make_from_klass_unique(ciKlass* klass) {
692 return make_from_klass_common(klass, true, true);
693 }
694 // Same as before, but does not respects UseUniqueSubclasses.
695 // Use this only for creating array element types.
696 static const TypeOopPtr* make_from_klass_raw(ciKlass* klass) {
697 return make_from_klass_common(klass, false, false);
698 }
699 // Creates a singleton type given an object.
700 static const TypeOopPtr* make_from_constant(ciObject* o);
702 // Make a generic (unclassed) pointer to an oop.
703 static const TypeOopPtr* make(PTR ptr, int offset);
705 ciObject* const_oop() const { return _const_oop; }
706 virtual ciKlass* klass() const { return _klass; }
707 bool klass_is_exact() const { return _klass_is_exact; }
709 // Returns true if this pointer points at memory which contains a
710 // compressed oop references.
711 bool is_ptr_to_narrowoop_nv() const { return _is_ptr_to_narrowoop; }
713 bool is_known_instance() const { return _instance_id > 0; }
714 int instance_id() const { return _instance_id; }
715 bool is_known_instance_field() const { return is_known_instance() && _offset >= 0; }
717 virtual intptr_t get_con() const;
719 virtual const Type *cast_to_ptr_type(PTR ptr) const;
721 virtual const Type *cast_to_exactness(bool klass_is_exact) const;
723 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
725 // corresponding pointer to klass, for a given instance
726 const TypeKlassPtr* as_klass_type() const;
728 virtual const TypePtr *add_offset( intptr_t offset ) const;
730 virtual const Type *xmeet( const Type *t ) const;
731 virtual const Type *xdual() const; // Compute dual right now.
733 // Do not allow interface-vs.-noninterface joins to collapse to top.
734 virtual const Type *filter( const Type *kills ) const;
736 // Convenience common pre-built type.
737 static const TypeOopPtr *BOTTOM;
738 #ifndef PRODUCT
739 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
740 #endif
741 };
743 //------------------------------TypeInstPtr------------------------------------
744 // Class of Java object pointers, pointing either to non-array Java instances
745 // or to a klassOop (including array klasses).
746 class TypeInstPtr : public TypeOopPtr {
747 TypeInstPtr( PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id );
748 virtual bool eq( const Type *t ) const;
749 virtual int hash() const; // Type specific hashing
751 ciSymbol* _name; // class name
753 public:
754 ciSymbol* name() const { return _name; }
756 bool is_loaded() const { return _klass->is_loaded(); }
758 // Make a pointer to a constant oop.
759 static const TypeInstPtr *make(ciObject* o) {
760 return make(TypePtr::Constant, o->klass(), true, o, 0);
761 }
763 // Make a pointer to a constant oop with offset.
764 static const TypeInstPtr *make(ciObject* o, int offset) {
765 return make(TypePtr::Constant, o->klass(), true, o, offset);
766 }
768 // Make a pointer to some value of type klass.
769 static const TypeInstPtr *make(PTR ptr, ciKlass* klass) {
770 return make(ptr, klass, false, NULL, 0);
771 }
773 // Make a pointer to some non-polymorphic value of exactly type klass.
774 static const TypeInstPtr *make_exact(PTR ptr, ciKlass* klass) {
775 return make(ptr, klass, true, NULL, 0);
776 }
778 // Make a pointer to some value of type klass with offset.
779 static const TypeInstPtr *make(PTR ptr, ciKlass* klass, int offset) {
780 return make(ptr, klass, false, NULL, offset);
781 }
783 // Make a pointer to an oop.
784 static const TypeInstPtr *make(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id = InstanceBot );
786 // If this is a java.lang.Class constant, return the type for it or NULL.
787 // Pass to Type::get_const_type to turn it to a type, which will usually
788 // be a TypeInstPtr, but may also be a TypeInt::INT for int.class, etc.
789 ciType* java_mirror_type() const;
791 virtual const Type *cast_to_ptr_type(PTR ptr) const;
793 virtual const Type *cast_to_exactness(bool klass_is_exact) const;
795 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
797 virtual const TypePtr *add_offset( intptr_t offset ) const;
799 virtual const Type *xmeet( const Type *t ) const;
800 virtual const TypeInstPtr *xmeet_unloaded( const TypeInstPtr *t ) const;
801 virtual const Type *xdual() const; // Compute dual right now.
803 // Convenience common pre-built types.
804 static const TypeInstPtr *NOTNULL;
805 static const TypeInstPtr *BOTTOM;
806 static const TypeInstPtr *MIRROR;
807 static const TypeInstPtr *MARK;
808 static const TypeInstPtr *KLASS;
809 #ifndef PRODUCT
810 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
811 #endif
812 };
814 //------------------------------TypeAryPtr-------------------------------------
815 // Class of Java array pointers
816 class TypeAryPtr : public TypeOopPtr {
817 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) {};
818 virtual bool eq( const Type *t ) const;
819 virtual int hash() const; // Type specific hashing
820 const TypeAry *_ary; // Array we point into
822 public:
823 // Accessors
824 ciKlass* klass() const;
825 const TypeAry* ary() const { return _ary; }
826 const Type* elem() const { return _ary->_elem; }
827 const TypeInt* size() const { return _ary->_size; }
829 static const TypeAryPtr *make( PTR ptr, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot);
830 // Constant pointer to array
831 static const TypeAryPtr *make( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot);
833 // Convenience
834 static const TypeAryPtr *make(ciObject* o);
836 // Return a 'ptr' version of this type
837 virtual const Type *cast_to_ptr_type(PTR ptr) const;
839 virtual const Type *cast_to_exactness(bool klass_is_exact) const;
841 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
843 virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const;
844 virtual const TypeInt* narrow_size_type(const TypeInt* size) const;
846 virtual bool empty(void) const; // TRUE if type is vacuous
847 virtual const TypePtr *add_offset( intptr_t offset ) const;
849 virtual const Type *xmeet( const Type *t ) const;
850 virtual const Type *xdual() const; // Compute dual right now.
852 // Convenience common pre-built types.
853 static const TypeAryPtr *RANGE;
854 static const TypeAryPtr *OOPS;
855 static const TypeAryPtr *NARROWOOPS;
856 static const TypeAryPtr *BYTES;
857 static const TypeAryPtr *SHORTS;
858 static const TypeAryPtr *CHARS;
859 static const TypeAryPtr *INTS;
860 static const TypeAryPtr *LONGS;
861 static const TypeAryPtr *FLOATS;
862 static const TypeAryPtr *DOUBLES;
863 // selects one of the above:
864 static const TypeAryPtr *get_array_body_type(BasicType elem) {
865 assert((uint)elem <= T_CONFLICT && _array_body_type[elem] != NULL, "bad elem type");
866 return _array_body_type[elem];
867 }
868 static const TypeAryPtr *_array_body_type[T_CONFLICT+1];
869 // sharpen the type of an int which is used as an array size
870 #ifndef PRODUCT
871 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
872 #endif
873 };
875 //------------------------------TypeKlassPtr-----------------------------------
876 // Class of Java Klass pointers
877 class TypeKlassPtr : public TypeOopPtr {
878 TypeKlassPtr( PTR ptr, ciKlass* klass, int offset );
880 virtual bool eq( const Type *t ) const;
881 virtual int hash() const; // Type specific hashing
883 public:
884 ciSymbol* name() const { return _klass->name(); }
886 bool is_loaded() const { return _klass->is_loaded(); }
888 // ptr to klass 'k'
889 static const TypeKlassPtr *make( ciKlass* k ) { return make( TypePtr::Constant, k, 0); }
890 // ptr to klass 'k' with offset
891 static const TypeKlassPtr *make( ciKlass* k, int offset ) { return make( TypePtr::Constant, k, offset); }
892 // ptr to klass 'k' or sub-klass
893 static const TypeKlassPtr *make( PTR ptr, ciKlass* k, int offset);
895 virtual const Type *cast_to_ptr_type(PTR ptr) const;
897 virtual const Type *cast_to_exactness(bool klass_is_exact) const;
899 // corresponding pointer to instance, for a given class
900 const TypeOopPtr* as_instance_type() const;
902 virtual const TypePtr *add_offset( intptr_t offset ) const;
903 virtual const Type *xmeet( const Type *t ) const;
904 virtual const Type *xdual() const; // Compute dual right now.
906 // Convenience common pre-built types.
907 static const TypeKlassPtr* OBJECT; // Not-null object klass or below
908 static const TypeKlassPtr* OBJECT_OR_NULL; // Maybe-null version of same
909 #ifndef PRODUCT
910 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
911 #endif
912 };
914 //------------------------------TypeNarrowOop----------------------------------
915 // A compressed reference to some kind of Oop. This type wraps around
916 // a preexisting TypeOopPtr and forwards most of it's operations to
917 // the underlying type. It's only real purpose is to track the
918 // oopness of the compressed oop value when we expose the conversion
919 // between the normal and the compressed form.
920 class TypeNarrowOop : public Type {
921 protected:
922 const TypePtr* _ooptype; // Could be TypePtr::NULL_PTR
924 TypeNarrowOop( const TypePtr* ooptype): Type(NarrowOop),
925 _ooptype(ooptype) {
926 assert(ooptype->offset() == 0 ||
927 ooptype->offset() == OffsetBot ||
928 ooptype->offset() == OffsetTop, "no real offsets");
929 }
930 public:
931 virtual bool eq( const Type *t ) const;
932 virtual int hash() const; // Type specific hashing
933 virtual bool singleton(void) const; // TRUE if type is a singleton
935 virtual const Type *xmeet( const Type *t ) const;
936 virtual const Type *xdual() const; // Compute dual right now.
938 virtual intptr_t get_con() const;
940 // Do not allow interface-vs.-noninterface joins to collapse to top.
941 virtual const Type *filter( const Type *kills ) const;
943 virtual bool empty(void) const; // TRUE if type is vacuous
945 static const TypeNarrowOop *make( const TypePtr* type);
947 static const TypeNarrowOop* make_from_constant(ciObject* con) {
948 return make(TypeOopPtr::make_from_constant(con));
949 }
951 // returns the equivalent ptr type for this compressed pointer
952 const TypePtr *make_oopptr() const {
953 return _ooptype;
954 }
956 static const TypeNarrowOop *BOTTOM;
957 static const TypeNarrowOop *NULL_PTR;
959 #ifndef PRODUCT
960 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
961 #endif
962 };
964 //------------------------------TypeFunc---------------------------------------
965 // Class of Array Types
966 class TypeFunc : public Type {
967 TypeFunc( const TypeTuple *domain, const TypeTuple *range ) : Type(Function), _domain(domain), _range(range) {}
968 virtual bool eq( const Type *t ) const;
969 virtual int hash() const; // Type specific hashing
970 virtual bool singleton(void) const; // TRUE if type is a singleton
971 virtual bool empty(void) const; // TRUE if type is vacuous
972 public:
973 // Constants are shared among ADLC and VM
974 enum { Control = AdlcVMDeps::Control,
975 I_O = AdlcVMDeps::I_O,
976 Memory = AdlcVMDeps::Memory,
977 FramePtr = AdlcVMDeps::FramePtr,
978 ReturnAdr = AdlcVMDeps::ReturnAdr,
979 Parms = AdlcVMDeps::Parms
980 };
982 const TypeTuple* const _domain; // Domain of inputs
983 const TypeTuple* const _range; // Range of results
985 // Accessors:
986 const TypeTuple* domain() const { return _domain; }
987 const TypeTuple* range() const { return _range; }
989 static const TypeFunc *make(ciMethod* method);
990 static const TypeFunc *make(ciSignature signature, const Type* extra);
991 static const TypeFunc *make(const TypeTuple* domain, const TypeTuple* range);
993 virtual const Type *xmeet( const Type *t ) const;
994 virtual const Type *xdual() const; // Compute dual right now.
996 BasicType return_type() const;
998 #ifndef PRODUCT
999 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
1000 void print_flattened() const; // Print a 'flattened' signature
1001 #endif
1002 // Convenience common pre-built types.
1003 };
1005 //------------------------------accessors--------------------------------------
1006 inline bool Type::is_ptr_to_narrowoop() const {
1007 #ifdef _LP64
1008 return (isa_oopptr() != NULL && is_oopptr()->is_ptr_to_narrowoop_nv());
1009 #else
1010 return false;
1011 #endif
1012 }
1014 inline float Type::getf() const {
1015 assert( _base == FloatCon, "Not a FloatCon" );
1016 return ((TypeF*)this)->_f;
1017 }
1019 inline double Type::getd() const {
1020 assert( _base == DoubleCon, "Not a DoubleCon" );
1021 return ((TypeD*)this)->_d;
1022 }
1024 inline const TypeF *Type::is_float_constant() const {
1025 assert( _base == FloatCon, "Not a Float" );
1026 return (TypeF*)this;
1027 }
1029 inline const TypeF *Type::isa_float_constant() const {
1030 return ( _base == FloatCon ? (TypeF*)this : NULL);
1031 }
1033 inline const TypeD *Type::is_double_constant() const {
1034 assert( _base == DoubleCon, "Not a Double" );
1035 return (TypeD*)this;
1036 }
1038 inline const TypeD *Type::isa_double_constant() const {
1039 return ( _base == DoubleCon ? (TypeD*)this : NULL);
1040 }
1042 inline const TypeInt *Type::is_int() const {
1043 assert( _base == Int, "Not an Int" );
1044 return (TypeInt*)this;
1045 }
1047 inline const TypeInt *Type::isa_int() const {
1048 return ( _base == Int ? (TypeInt*)this : NULL);
1049 }
1051 inline const TypeLong *Type::is_long() const {
1052 assert( _base == Long, "Not a Long" );
1053 return (TypeLong*)this;
1054 }
1056 inline const TypeLong *Type::isa_long() const {
1057 return ( _base == Long ? (TypeLong*)this : NULL);
1058 }
1060 inline const TypeTuple *Type::is_tuple() const {
1061 assert( _base == Tuple, "Not a Tuple" );
1062 return (TypeTuple*)this;
1063 }
1065 inline const TypeAry *Type::is_ary() const {
1066 assert( _base == Array , "Not an Array" );
1067 return (TypeAry*)this;
1068 }
1070 inline const TypePtr *Type::is_ptr() const {
1071 // AnyPtr is the first Ptr and KlassPtr the last, with no non-ptrs between.
1072 assert(_base >= AnyPtr && _base <= KlassPtr, "Not a pointer");
1073 return (TypePtr*)this;
1074 }
1076 inline const TypePtr *Type::isa_ptr() const {
1077 // AnyPtr is the first Ptr and KlassPtr the last, with no non-ptrs between.
1078 return (_base >= AnyPtr && _base <= KlassPtr) ? (TypePtr*)this : NULL;
1079 }
1081 inline const TypeOopPtr *Type::is_oopptr() const {
1082 // OopPtr is the first and KlassPtr the last, with no non-oops between.
1083 assert(_base >= OopPtr && _base <= KlassPtr, "Not a Java pointer" ) ;
1084 return (TypeOopPtr*)this;
1085 }
1087 inline const TypeOopPtr *Type::isa_oopptr() const {
1088 // OopPtr is the first and KlassPtr the last, with no non-oops between.
1089 return (_base >= OopPtr && _base <= KlassPtr) ? (TypeOopPtr*)this : NULL;
1090 }
1092 inline const TypeRawPtr *Type::isa_rawptr() const {
1093 return (_base == RawPtr) ? (TypeRawPtr*)this : NULL;
1094 }
1096 inline const TypeRawPtr *Type::is_rawptr() const {
1097 assert( _base == RawPtr, "Not a raw pointer" );
1098 return (TypeRawPtr*)this;
1099 }
1101 inline const TypeInstPtr *Type::isa_instptr() const {
1102 return (_base == InstPtr) ? (TypeInstPtr*)this : NULL;
1103 }
1105 inline const TypeInstPtr *Type::is_instptr() const {
1106 assert( _base == InstPtr, "Not an object pointer" );
1107 return (TypeInstPtr*)this;
1108 }
1110 inline const TypeAryPtr *Type::isa_aryptr() const {
1111 return (_base == AryPtr) ? (TypeAryPtr*)this : NULL;
1112 }
1114 inline const TypeAryPtr *Type::is_aryptr() const {
1115 assert( _base == AryPtr, "Not an array pointer" );
1116 return (TypeAryPtr*)this;
1117 }
1119 inline const TypeNarrowOop *Type::is_narrowoop() const {
1120 // OopPtr is the first and KlassPtr the last, with no non-oops between.
1121 assert(_base == NarrowOop, "Not a narrow oop" ) ;
1122 return (TypeNarrowOop*)this;
1123 }
1125 inline const TypeNarrowOop *Type::isa_narrowoop() const {
1126 // OopPtr is the first and KlassPtr the last, with no non-oops between.
1127 return (_base == NarrowOop) ? (TypeNarrowOop*)this : NULL;
1128 }
1130 inline const TypeKlassPtr *Type::isa_klassptr() const {
1131 return (_base == KlassPtr) ? (TypeKlassPtr*)this : NULL;
1132 }
1134 inline const TypeKlassPtr *Type::is_klassptr() const {
1135 assert( _base == KlassPtr, "Not a klass pointer" );
1136 return (TypeKlassPtr*)this;
1137 }
1139 inline const TypePtr* Type::make_ptr() const {
1140 return (_base == NarrowOop) ? is_narrowoop()->make_oopptr() :
1141 (isa_ptr() ? is_ptr() : NULL);
1142 }
1144 inline const TypeNarrowOop* Type::make_narrowoop() const {
1145 return (_base == NarrowOop) ? is_narrowoop() :
1146 (isa_ptr() ? TypeNarrowOop::make(is_ptr()) : NULL);
1147 }
1149 inline bool Type::is_floatingpoint() const {
1150 if( (_base == FloatCon) || (_base == FloatBot) ||
1151 (_base == DoubleCon) || (_base == DoubleBot) )
1152 return true;
1153 return false;
1154 }
1157 // ===============================================================
1158 // Things that need to be 64-bits in the 64-bit build but
1159 // 32-bits in the 32-bit build. Done this way to get full
1160 // optimization AND strong typing.
1161 #ifdef _LP64
1163 // For type queries and asserts
1164 #define is_intptr_t is_long
1165 #define isa_intptr_t isa_long
1166 #define find_intptr_t_type find_long_type
1167 #define find_intptr_t_con find_long_con
1168 #define TypeX TypeLong
1169 #define Type_X Type::Long
1170 #define TypeX_X TypeLong::LONG
1171 #define TypeX_ZERO TypeLong::ZERO
1172 // For 'ideal_reg' machine registers
1173 #define Op_RegX Op_RegL
1174 // For phase->intcon variants
1175 #define MakeConX longcon
1176 #define ConXNode ConLNode
1177 // For array index arithmetic
1178 #define MulXNode MulLNode
1179 #define AndXNode AndLNode
1180 #define OrXNode OrLNode
1181 #define CmpXNode CmpLNode
1182 #define SubXNode SubLNode
1183 #define LShiftXNode LShiftLNode
1184 // For object size computation:
1185 #define AddXNode AddLNode
1186 #define RShiftXNode RShiftLNode
1187 // For card marks and hashcodes
1188 #define URShiftXNode URShiftLNode
1189 // UseOptoBiasInlining
1190 #define XorXNode XorLNode
1191 #define StoreXConditionalNode StoreLConditionalNode
1192 // Opcodes
1193 #define Op_LShiftX Op_LShiftL
1194 #define Op_AndX Op_AndL
1195 #define Op_AddX Op_AddL
1196 #define Op_SubX Op_SubL
1197 // conversions
1198 #define ConvI2X(x) ConvI2L(x)
1199 #define ConvL2X(x) (x)
1200 #define ConvX2I(x) ConvL2I(x)
1201 #define ConvX2L(x) (x)
1203 #else
1205 // For type queries and asserts
1206 #define is_intptr_t is_int
1207 #define isa_intptr_t isa_int
1208 #define find_intptr_t_type find_int_type
1209 #define find_intptr_t_con find_int_con
1210 #define TypeX TypeInt
1211 #define Type_X Type::Int
1212 #define TypeX_X TypeInt::INT
1213 #define TypeX_ZERO TypeInt::ZERO
1214 // For 'ideal_reg' machine registers
1215 #define Op_RegX Op_RegI
1216 // For phase->intcon variants
1217 #define MakeConX intcon
1218 #define ConXNode ConINode
1219 // For array index arithmetic
1220 #define MulXNode MulINode
1221 #define AndXNode AndINode
1222 #define OrXNode OrINode
1223 #define CmpXNode CmpINode
1224 #define SubXNode SubINode
1225 #define LShiftXNode LShiftINode
1226 // For object size computation:
1227 #define AddXNode AddINode
1228 #define RShiftXNode RShiftINode
1229 // For card marks and hashcodes
1230 #define URShiftXNode URShiftINode
1231 // UseOptoBiasInlining
1232 #define XorXNode XorINode
1233 #define StoreXConditionalNode StoreIConditionalNode
1234 // Opcodes
1235 #define Op_LShiftX Op_LShiftI
1236 #define Op_AndX Op_AndI
1237 #define Op_AddX Op_AddI
1238 #define Op_SubX Op_SubI
1239 // conversions
1240 #define ConvI2X(x) (x)
1241 #define ConvL2X(x) ConvL2I(x)
1242 #define ConvX2I(x) (x)
1243 #define ConvX2L(x) ConvI2L(x)
1245 #endif