Mercurial > hg > truffle
comparison src/share/vm/utilities/globalDefinitions.hpp @ 6848:8e47bac5643a
7054512: Compress class pointers after perm gen removal
Summary: support of compress class pointers in the compilers.
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Tue, 09 Oct 2012 10:11:38 +0200 |
parents | da91efe96a93 |
children | e522a00b91aa e4f764ddb06a |
comparison
equal
deleted
inserted
replaced
6847:65d07d9ee446 | 6848:8e47bac5643a |
---|---|
345 extern int MinObjAlignmentInBytesMask; | 345 extern int MinObjAlignmentInBytesMask; |
346 | 346 |
347 extern int LogMinObjAlignment; | 347 extern int LogMinObjAlignment; |
348 extern int LogMinObjAlignmentInBytes; | 348 extern int LogMinObjAlignmentInBytes; |
349 | 349 |
350 const int LogKlassAlignmentInBytes = 3; | |
351 const int LogKlassAlignment = LogKlassAlignmentInBytes - LogHeapWordSize; | |
352 const int KlassAlignmentInBytes = 1 << LogKlassAlignmentInBytes; | |
353 const int KlassAlignment = KlassAlignmentInBytes / HeapWordSize; | |
354 | |
355 // Klass encoding metaspace max size | |
356 const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlassAlignmentInBytes; | |
357 | |
350 // Machine dependent stuff | 358 // Machine dependent stuff |
351 | 359 |
352 #ifdef TARGET_ARCH_x86 | 360 #ifdef TARGET_ARCH_x86 |
353 # include "globalDefinitions_x86.hpp" | 361 # include "globalDefinitions_x86.hpp" |
354 #endif | 362 #endif |
479 void basic_types_init(); // cannot define here; uses assert | 487 void basic_types_init(); // cannot define here; uses assert |
480 | 488 |
481 | 489 |
482 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java | 490 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java |
483 enum BasicType { | 491 enum BasicType { |
484 T_BOOLEAN = 4, | 492 T_BOOLEAN = 4, |
485 T_CHAR = 5, | 493 T_CHAR = 5, |
486 T_FLOAT = 6, | 494 T_FLOAT = 6, |
487 T_DOUBLE = 7, | 495 T_DOUBLE = 7, |
488 T_BYTE = 8, | 496 T_BYTE = 8, |
489 T_SHORT = 9, | 497 T_SHORT = 9, |
490 T_INT = 10, | 498 T_INT = 10, |
491 T_LONG = 11, | 499 T_LONG = 11, |
492 T_OBJECT = 12, | 500 T_OBJECT = 12, |
493 T_ARRAY = 13, | 501 T_ARRAY = 13, |
494 T_VOID = 14, | 502 T_VOID = 14, |
495 T_ADDRESS = 15, | 503 T_ADDRESS = 15, |
496 T_NARROWOOP= 16, | 504 T_NARROWOOP = 16, |
497 T_METADATA = 17, | 505 T_METADATA = 17, |
498 T_CONFLICT = 18, // for stack value type with conflicting contents | 506 T_NARROWKLASS = 18, |
499 T_ILLEGAL = 99 | 507 T_CONFLICT = 19, // for stack value type with conflicting contents |
508 T_ILLEGAL = 99 | |
500 }; | 509 }; |
501 | 510 |
502 inline bool is_java_primitive(BasicType t) { | 511 inline bool is_java_primitive(BasicType t) { |
503 return T_BOOLEAN <= t && t <= T_LONG; | 512 return T_BOOLEAN <= t && t <= T_LONG; |
504 } | 513 } |
542 extern size_t lcm(size_t a, size_t b); | 551 extern size_t lcm(size_t a, size_t b); |
543 | 552 |
544 | 553 |
545 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java | 554 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java |
546 enum BasicTypeSize { | 555 enum BasicTypeSize { |
547 T_BOOLEAN_size = 1, | 556 T_BOOLEAN_size = 1, |
548 T_CHAR_size = 1, | 557 T_CHAR_size = 1, |
549 T_FLOAT_size = 1, | 558 T_FLOAT_size = 1, |
550 T_DOUBLE_size = 2, | 559 T_DOUBLE_size = 2, |
551 T_BYTE_size = 1, | 560 T_BYTE_size = 1, |
552 T_SHORT_size = 1, | 561 T_SHORT_size = 1, |
553 T_INT_size = 1, | 562 T_INT_size = 1, |
554 T_LONG_size = 2, | 563 T_LONG_size = 2, |
555 T_OBJECT_size = 1, | 564 T_OBJECT_size = 1, |
556 T_ARRAY_size = 1, | 565 T_ARRAY_size = 1, |
557 T_NARROWOOP_size = 1, | 566 T_NARROWOOP_size = 1, |
558 T_VOID_size = 0 | 567 T_NARROWKLASS_size = 1, |
568 T_VOID_size = 0 | |
559 }; | 569 }; |
560 | 570 |
561 | 571 |
562 // maps a BasicType to its instance field storage type: | 572 // maps a BasicType to its instance field storage type: |
563 // all sub-word integral types are widened to T_INT | 573 // all sub-word integral types are widened to T_INT |
565 extern BasicType type2wfield[T_CONFLICT+1]; | 575 extern BasicType type2wfield[T_CONFLICT+1]; |
566 | 576 |
567 | 577 |
568 // size in bytes | 578 // size in bytes |
569 enum ArrayElementSize { | 579 enum ArrayElementSize { |
570 T_BOOLEAN_aelem_bytes = 1, | 580 T_BOOLEAN_aelem_bytes = 1, |
571 T_CHAR_aelem_bytes = 2, | 581 T_CHAR_aelem_bytes = 2, |
572 T_FLOAT_aelem_bytes = 4, | 582 T_FLOAT_aelem_bytes = 4, |
573 T_DOUBLE_aelem_bytes = 8, | 583 T_DOUBLE_aelem_bytes = 8, |
574 T_BYTE_aelem_bytes = 1, | 584 T_BYTE_aelem_bytes = 1, |
575 T_SHORT_aelem_bytes = 2, | 585 T_SHORT_aelem_bytes = 2, |
576 T_INT_aelem_bytes = 4, | 586 T_INT_aelem_bytes = 4, |
577 T_LONG_aelem_bytes = 8, | 587 T_LONG_aelem_bytes = 8, |
578 #ifdef _LP64 | 588 #ifdef _LP64 |
579 T_OBJECT_aelem_bytes = 8, | 589 T_OBJECT_aelem_bytes = 8, |
580 T_ARRAY_aelem_bytes = 8, | 590 T_ARRAY_aelem_bytes = 8, |
581 #else | 591 #else |
582 T_OBJECT_aelem_bytes = 4, | 592 T_OBJECT_aelem_bytes = 4, |
583 T_ARRAY_aelem_bytes = 4, | 593 T_ARRAY_aelem_bytes = 4, |
584 #endif | 594 #endif |
585 T_NARROWOOP_aelem_bytes = 4, | 595 T_NARROWOOP_aelem_bytes = 4, |
586 T_VOID_aelem_bytes = 0 | 596 T_NARROWKLASS_aelem_bytes = 4, |
597 T_VOID_aelem_bytes = 0 | |
587 }; | 598 }; |
588 | 599 |
589 extern int _type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element | 600 extern int _type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element |
590 #ifdef ASSERT | 601 #ifdef ASSERT |
591 extern int type2aelembytes(BasicType t, bool allow_address = false); // asserts | 602 extern int type2aelembytes(BasicType t, bool allow_address = false); // asserts |