Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompiler.hpp @ 14052:361acb279104
moved to-constant-pool-index conversion up to Java
author | twisti |
---|---|
date | Tue, 04 Mar 2014 22:23:24 -0800 |
parents | 1f34717ccafa |
children | 2f37b0e442fe |
comparison
equal
deleted
inserted
replaced
14051:e85575f63b60 | 14052:361acb279104 |
---|---|
76 | 76 |
77 void exit(); | 77 void exit(); |
78 | 78 |
79 static BasicType kindToBasicType(jchar ch); | 79 static BasicType kindToBasicType(jchar ch); |
80 | 80 |
81 static int to_cp_index_u2(int index) { | |
82 // Tag. | |
83 return index + ConstantPool::CPCACHE_INDEX_TAG; | |
84 } | |
85 | |
86 static int to_cp_index(int raw_index, Bytecodes::Code bc) { | |
87 int cp_index; | |
88 if (bc == Bytecodes::_invokedynamic) { | |
89 cp_index = raw_index; | |
90 assert(ConstantPool::is_invokedynamic_index(cp_index), "not an invokedynamic constant pool index"); | |
91 } else { | |
92 assert(bc == Bytecodes::_getfield || bc == Bytecodes::_putfield || | |
93 bc == Bytecodes::_getstatic || bc == Bytecodes::_putstatic || | |
94 bc == Bytecodes::_invokeinterface || bc == Bytecodes::_invokevirtual || | |
95 bc == Bytecodes::_invokespecial || bc == Bytecodes::_invokestatic, err_msg("unexpected invoke opcode: %d %s", bc, Bytecodes::name(bc))); | |
96 cp_index = to_cp_index_u2(raw_index); | |
97 } | |
98 return cp_index; | |
99 } | |
100 | |
101 static BufferBlob* initialize_buffer_blob(); | 81 static BufferBlob* initialize_buffer_blob(); |
102 }; | 82 }; |
103 | 83 |
104 // Tracing macros | 84 // Tracing macros |
105 | 85 |