< prev index next >

src/hotspot/share/classfile/verificationType.hpp

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -66,13 +66,13 @@
        ITEM_Long_2nd, ITEM_Double_2nd
      };
  
      // Enum for the _data field
      enum : uint {
-       // Bottom two bits determine if the type is a reference, primitive,
-       // uninitialized or a query-type.
-       TypeMask           = 0x00000003,
+       // Bottom three bits determine if the type is a reference, inline type,
+       // primitive, uninitialized or a query-type.
+       TypeMask           = 0x00000007,
  
        // Topmost types encoding
        Reference          = 0x0,        // _sym contains the name
        Primitive          = 0x1,        // see below for primitive list
        Uninitialized      = 0x2,        // 0x00ffff00 contains bci

@@ -154,11 +154,11 @@
    static VerificationType category2_2nd_check()
      { return VerificationType(Category2_2ndQuery); }
  
    // For reference types, store the actual Symbol
    static VerificationType reference_type(Symbol* sh) {
-       assert(((uintptr_t)sh & 0x3) == 0, "Symbols must be aligned");
+       assert(((uintptr_t)sh & TypeMask) == 0, "Symbols must be aligned");
        // If the above assert fails in the future because oop* isn't aligned,
        // then this type encoding system will have to change to have a tag value
        // to discriminate between oops and primitives.
        return VerificationType((uintptr_t)sh);
    }

@@ -183,12 +183,12 @@
    bool is_long2() const     { return (_u._data == Long_2nd); }
    bool is_double2() const   { return (_u._data == Double_2nd); }
    bool is_reference() const { return ((_u._data & TypeMask) == Reference); }
    bool is_category1() const {
      // This should return true for all one-word types, which are category1
-     // primitives, and references (including uninitialized refs).  Though
-     // the 'query' types should technically return 'false' here, if we
+     // primitives, references (including uninitialized refs) and inline types.
+     // Though the 'query' types should technically return 'false' here, if we
      // allow this to return true, we can perform the test using only
      // 2 operations rather than 8 (3 masks, 3 compares and 2 logical 'ands').
      // Since no one should call this on a query type anyway, this is ok.
      assert(!is_check(), "Must not be a check type (wrong value returned)");
      return ((_u._data & Category1) != Primitive);

@@ -218,10 +218,12 @@
    bool is_double_array() const { return is_x_array(JVM_SIGNATURE_DOUBLE); }
    bool is_object_array() const { return is_x_array(JVM_SIGNATURE_CLASS); }
    bool is_array_array() const { return is_x_array(JVM_SIGNATURE_ARRAY); }
    bool is_reference_array() const
      { return is_object_array() || is_array_array(); }
+   bool is_nonscalar_array() const
+     { return is_object_array() || is_array_array(); }
    bool is_object() const
      { return (is_reference() && !is_null() && name()->utf8_length() >= 1 &&
                name()->char_at(0) != JVM_SIGNATURE_ARRAY); }
    bool is_array() const
      { return (is_reference() && !is_null() && name()->utf8_length() >= 2 &&
< prev index next >