< prev index next >

src/share/vm/ci/ciValueKlass.hpp

Print this page

        

@@ -24,13 +24,15 @@
 
 #ifndef SHARE_VM_CI_CIVALUEKLASS_HPP
 #define SHARE_VM_CI_CIVALUEKLASS_HPP
 
 #include "ci/ciConstantPoolCache.hpp"
+#include "ci/ciEnv.hpp"
 #include "ci/ciFlags.hpp"
 #include "ci/ciInstanceKlass.hpp"
 #include "ci/ciSymbol.hpp"
+#include "oops/valueKlass.hpp"
 
 // ciValueKlass
 //
 // Specialized ciInstanceKlass for value types.
 class ciValueKlass : public ciInstanceKlass {

@@ -50,10 +52,14 @@
   };
 
   const char* type_string() { return "ciValueKlass"; }
   int compute_field_index_map();
 
+  ValueKlass* get_valueKlass() const {
+    return ValueKlass::cast(get_Klass());
+  }
+
 public:
   bool      is_valuetype() const { return true; }
   bool      flatten_array() const;
   bool      contains_oops() const;
 

@@ -67,8 +73,14 @@
   int       field_offset_by_index(int index);
   ciType*   field_type_by_index(int index);
   int       first_field_offset() const;
 
   int value_arg_slots();
+
+  // Can a value type instance of this type be returned as multiple
+  // returned values?
+  bool can_be_returned_as_fields() const {
+    return this != ciEnv::current()->___Value_klass() && get_valueKlass()->return_regs() != NULL;
+  }
 };
 
 #endif // SHARE_VM_CI_CIVALUEKLASS_HPP
< prev index next >