diff src/share/vm/graal/graalCompilerToVM.cpp @ 8960:0ba33199edc0

invokedynamic: constant fold call site target with assumption; minor fixes
author Andreas Woess <andreas.woess@jku.at>
date Tue, 09 Apr 2013 20:37:06 +0200
parents 7ef66078d837
children 6d86ce1297bc
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp	Tue Apr 09 19:25:20 2013 +0200
+++ b/src/share/vm/graal/graalCompilerToVM.cpp	Tue Apr 09 20:37:06 2013 +0200
@@ -463,7 +463,7 @@
   if (opcode != Bytecodes::_checkcast && opcode != Bytecodes::_instanceof && opcode != Bytecodes::_new && opcode != Bytecodes::_anewarray
       && opcode != Bytecodes::_multianewarray && opcode != Bytecodes::_ldc && opcode != Bytecodes::_ldc_w && opcode != Bytecodes::_ldc2_w)
   {
-    index = cp->remap_instruction_operand_from_cache(GraalCompiler::to_cp_index_u2(index));
+    index = cp->remap_instruction_operand_from_cache((opcode == Bytecodes::_invokedynamic) ? GraalCompiler::to_index_u4(index) : GraalCompiler::to_cp_index_u2(index));
   }
   constantTag tag = cp->tag_at(index);
   if (tag.is_field_or_method()) {