diff src/share/vm/graal/graalCompilerToVM.hpp @ 9887:4d5872186e76

Add compressed oops support in Graal/Hotspot site
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Tue, 04 Jun 2013 19:36:16 +0200
parents e522a00b91aa
children 91c16dff3fc1
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.hpp	Tue Jun 04 18:52:22 2013 +0200
+++ b/src/share/vm/graal/graalCompilerToVM.hpp	Tue Jun 04 19:36:16 2013 +0200
@@ -54,7 +54,12 @@
 
   oop next_arg(BasicType expectedType) {
     assert(_index < _args->length(), "out of bounds");
-    oop arg = ((oop*) _args->base(T_OBJECT))[_index++];
+    oop arg;
+    if(UseCompressedOops) {
+      arg = oopDesc::decode_heap_oop(((narrowOop*) _args->base(T_OBJECT))[_index++]);
+    } else {
+      arg = ((oop*) _args->base(T_OBJECT))[_index++];
+    }
     assert(expectedType == T_OBJECT || java_lang_boxing_object::is_instance(arg, expectedType), "arg type mismatch");
     return arg;
   }