--- a/hotspot/src/share/vm/oops/oopsHierarchy.hpp Wed Aug 23 10:25:25 2017 +0200
+++ b/hotspot/src/share/vm/oops/oopsHierarchy.hpp Wed Aug 23 14:01:17 2017 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -25,6 +25,8 @@
#ifndef SHARE_VM_OOPS_OOPSHIERARCHY_HPP
#define SHARE_VM_OOPS_OOPSHIERARCHY_HPP
+#include "metaprogramming/integralConstant.hpp"
+#include "metaprogramming/primitiveConversions.hpp"
#include "runtime/globals.hpp"
#include "utilities/globalDefinitions.hpp"
@@ -142,6 +144,15 @@
operator oop* () const { return (oop *)obj(); }
};
+template<>
+struct PrimitiveConversions::Translate<oop> : public TrueType {
+ typedef oop Value;
+ typedef oopDesc* Decayed;
+
+ static Decayed decay(Value x) { return x.obj(); }
+ static Value recover(Decayed x) { return oop(x); }
+};
+
#define DEF_OOP(type) \
class type##OopDesc; \
class type##Oop : public oop { \