< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


1474 
1475 class java_nio_Buffer: AllStatic {
1476  private:
1477   static int _limit_offset;
1478 
1479  public:
1480   static int  limit_offset();
1481   static void compute_offsets();
1482   static void serialize(SerializeClosure* f) NOT_CDS_RETURN;
1483 };
1484 
1485 class java_util_concurrent_locks_AbstractOwnableSynchronizer : AllStatic {
1486  private:
1487   static int  _owner_offset;
1488  public:
1489   static void compute_offsets();
1490   static oop  get_owner_threadObj(oop obj);
1491   static void serialize(SerializeClosure* f) NOT_CDS_RETURN;
1492 };
1493 












































































































1494 // Use to declare fields that need to be injected into Java classes
1495 // for the JVM to use.  The name_index and signature_index are
1496 // declared in vmSymbols.  The may_be_java flag is used to declare
1497 // fields that might already exist in Java but should be injected if
1498 // they don't.  Otherwise the field is unconditionally injected and
1499 // the JVM uses the injected one.  This is to ensure that name
1500 // collisions don't occur.  In general may_be_java should be false
1501 // unless there's a good reason.
1502 
1503 class InjectedField {
1504  public:
1505   const SystemDictionary::WKID klass_id;
1506   const vmSymbols::SID name_index;
1507   const vmSymbols::SID signature_index;
1508   const bool           may_be_java;
1509 
1510 
1511   Klass* klass() const    { return SystemDictionary::well_known_klass(klass_id); }
1512   Symbol* name() const      { return lookup_symbol(name_index); }
1513   Symbol* signature() const { return lookup_symbol(signature_index); }


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2015-2018, Azul Systems, Inc. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


1475 
1476 class java_nio_Buffer: AllStatic {
1477  private:
1478   static int _limit_offset;
1479 
1480  public:
1481   static int  limit_offset();
1482   static void compute_offsets();
1483   static void serialize(SerializeClosure* f) NOT_CDS_RETURN;
1484 };
1485 
1486 class java_util_concurrent_locks_AbstractOwnableSynchronizer : AllStatic {
1487  private:
1488   static int  _owner_offset;
1489  public:
1490   static void compute_offsets();
1491   static oop  get_owner_threadObj(oop obj);
1492   static void serialize(SerializeClosure* f) NOT_CDS_RETURN;
1493 };
1494 
1495 #ifdef AARCH32
1496 class com_sun_crypto_provider_AESCrypt: AllStatic {
1497  public:
1498   static int _K_offset;
1499   enum {
1500    hc_ROUND_12_offset       = 0,
1501    hc_ROUND_14_offset       = 1,
1502    hc_sessionK_offset       = 2,
1503    hc_K_offset              = 3,
1504    hc_lastKey_offset        = 4,
1505    hc_limit                 = 5
1506   };
1507 
1508   static int  K_offset();
1509   static void compute_offsets();
1510 };
1511 
1512 class com_sun_crypto_provider_FeedbackCipher: AllStatic {
1513  public:
1514   static int _embeddedCipher_offset;
1515   enum {
1516    hc_blockSize_offset            = 0,
1517    hc_embeddedCipher_offset       = 1,
1518    hc_iv_offset
1519   };
1520 
1521   static int  embeddedCipher_offset();
1522   static void compute_offsets();
1523 };
1524 
1525 class com_sun_crypto_provider_CipherBlockChaining:
1526                             public com_sun_crypto_provider_FeedbackCipher {
1527  public:
1528   static int _r_offset;
1529   enum {
1530    hc_r_offset       = hc_iv_offset+1,
1531    hc_k_offset
1532   };
1533 
1534   static int  r_offset();
1535   static void compute_offsets();
1536 };
1537 
1538 class java_security_MessageDigestSpi {
1539 public:
1540   enum {
1541    hc_tempArray = 0
1542   };
1543 };
1544 
1545 class sun_security_provider_DigestBase: java_security_MessageDigestSpi {
1546 public:
1547   enum {
1548     hc_digestLength = hc_tempArray + 1,
1549     hc_bytesProcessed_low,
1550     hc_bytesProcessed_high,
1551     hc_blockSize,
1552     hc_bufOfs,
1553     hc_oneByte,
1554     hc_algorithm,
1555     hc_buffer
1556   };
1557 };
1558 
1559 class sun_security_provider_SHA:
1560                             public sun_security_provider_DigestBase {
1561  public:
1562   static int _state_offset;
1563   enum {
1564     hc_W  = hc_buffer + 1,
1565     hc_state,
1566     hc_init_hashes
1567   };
1568 
1569   static int state_offset();
1570   static void compute_offsets();
1571 };
1572 
1573 
1574 class sun_security_provider_SHA2:
1575                             public sun_security_provider_DigestBase {
1576  public:
1577   static int _state_offset;
1578   enum {
1579     hc_W  = hc_buffer + 1,
1580     hc_state,
1581     hc_init_hashes
1582   };
1583 
1584   static int state_offset();
1585   static void compute_offsets();
1586 };
1587 
1588 class sun_security_provider_SHA5:
1589                             public sun_security_provider_DigestBase {
1590  public:
1591   static int _state_offset;
1592   enum {
1593     hc_W  = hc_buffer + 1,
1594     hc_state,
1595     hc_init_hashes
1596   };
1597 
1598   static int state_offset();
1599   static void compute_offsets();
1600 };
1601 #endif
1602 
1603 // Use to declare fields that need to be injected into Java classes
1604 // for the JVM to use.  The name_index and signature_index are
1605 // declared in vmSymbols.  The may_be_java flag is used to declare
1606 // fields that might already exist in Java but should be injected if
1607 // they don't.  Otherwise the field is unconditionally injected and
1608 // the JVM uses the injected one.  This is to ensure that name
1609 // collisions don't occur.  In general may_be_java should be false
1610 // unless there's a good reason.
1611 
1612 class InjectedField {
1613  public:
1614   const SystemDictionary::WKID klass_id;
1615   const vmSymbols::SID name_index;
1616   const vmSymbols::SID signature_index;
1617   const bool           may_be_java;
1618 
1619 
1620   Klass* klass() const    { return SystemDictionary::well_known_klass(klass_id); }
1621   Symbol* name() const      { return lookup_symbol(name_index); }
1622   Symbol* signature() const { return lookup_symbol(signature_index); }


< prev index next >