Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/templateTable.hpp @ 1565:ab102d5d923e
6939207: refactor constant pool index processing
Summary: Factored cleanup of instruction decode which prepares for enhanced ldc semantics.
Reviewed-by: twisti
author | jrose |
---|---|
date | Sun, 23 May 2010 01:38:26 -0700 |
parents | bd02caa94611 |
children | e9ff18c4ace7 |
comparison
equal
deleted
inserted
replaced
1564:61b2245abf36 | 1565:ab102d5d923e |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
71 | 71 |
72 class TemplateTable: AllStatic { | 72 class TemplateTable: AllStatic { |
73 public: | 73 public: |
74 enum Operation { add, sub, mul, div, rem, _and, _or, _xor, shl, shr, ushr }; | 74 enum Operation { add, sub, mul, div, rem, _and, _or, _xor, shl, shr, ushr }; |
75 enum Condition { equal, not_equal, less, less_equal, greater, greater_equal }; | 75 enum Condition { equal, not_equal, less, less_equal, greater, greater_equal }; |
76 enum CacheByte { f1_byte = 1, f2_byte = 2, f1_oop = 0x11 }; // byte_no codes | |
76 | 77 |
77 private: | 78 private: |
78 static bool _is_initialized; // true if TemplateTable has been initialized | 79 static bool _is_initialized; // true if TemplateTable has been initialized |
79 static Template _template_table [Bytecodes::number_of_codes]; | 80 static Template _template_table [Bytecodes::number_of_codes]; |
80 static Template _template_table_wide[Bytecodes::number_of_codes]; | 81 static Template _template_table_wide[Bytecodes::number_of_codes]; |
242 static void fast_linearswitch(); | 243 static void fast_linearswitch(); |
243 static void fast_binaryswitch(); | 244 static void fast_binaryswitch(); |
244 | 245 |
245 static void _return(TosState state); | 246 static void _return(TosState state); |
246 | 247 |
247 static void resolve_cache_and_index(int byte_no, Register cache, Register index); | 248 static void resolve_cache_and_index(int byte_no, // one of 1,2,11 |
249 Register result , // either noreg or output for f1/f2 | |
250 Register cache, // output for CP cache | |
251 Register index, // output for CP index | |
252 size_t index_size); // one of 1,2,4 | |
248 static void load_invoke_cp_cache_entry(int byte_no, | 253 static void load_invoke_cp_cache_entry(int byte_no, |
249 Register method, | 254 Register method, |
250 Register itable_index, | 255 Register itable_index, |
251 Register flags, | 256 Register flags, |
252 bool is_invokevirtual = false, | 257 bool is_invokevirtual, |
253 bool is_virtual_final = false); | 258 bool is_virtual_final, |
259 bool is_invokedynamic); | |
254 static void load_field_cp_cache_entry(Register obj, | 260 static void load_field_cp_cache_entry(Register obj, |
255 Register cache, | 261 Register cache, |
256 Register index, | 262 Register index, |
257 Register offset, | 263 Register offset, |
258 Register flags, | 264 Register flags, |