comparison src/share/vm/graal/graalCompiler.hpp @ 9011:23762f2438b6

support for compiling LambdaForm invocations (invokevirtual instructions that were rewritten to invokehandle instructions)
author Doug Simon <doug.simon@oracle.com>
date Thu, 11 Apr 2013 21:43:14 +0200
parents 7ef66078d837
children 4720f96a15b7
comparison
equal deleted inserted replaced
9010:08a16c26907f 9011:23762f2438b6
96 static int to_index_u4(int index) { 96 static int to_index_u4(int index) {
97 // Swap. 97 // Swap.
98 return ((index & 0xFF) << 24) | ((index & 0xFF00) << 8) | ((index & 0xFF0000) >> 8) | ((index & 0xFF000000) >> 24); 98 return ((index & 0xFF) << 24) | ((index & 0xFF00) << 8) | ((index & 0xFF0000) >> 8) | ((index & 0xFF000000) >> 24);
99 } 99 }
100 100
101 static int to_cp_index(int raw_index, Bytecodes::Code bc) {
102 int cp_index;
103 if (bc == Bytecodes::_invokedynamic) {
104 cp_index = to_index_u4(raw_index);
105 assert(ConstantPool::is_invokedynamic_index(raw_index), "not an invokedynamic constant pool index");
106 } else {
107 assert(bc == Bytecodes::_getfield || bc == Bytecodes::_putfield ||
108 bc == Bytecodes::_getstatic || bc == Bytecodes::_putstatic ||
109 bc == Bytecodes::_invokeinterface || bc == Bytecodes::_invokevirtual ||
110 bc == Bytecodes::_invokespecial || bc == Bytecodes::_invokestatic, err_msg("unexpected invoke opcode: %d %s", bc, Bytecodes::name(bc)));
111 cp_index = to_cp_index_u2(raw_index);
112 }
113 return cp_index;
114 }
115
101 static void initialize_buffer_blob(); 116 static void initialize_buffer_blob();
102 }; 117 };
103 118
104 // Tracing macros 119 // Tracing macros
105 120