Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/rewriter.cpp @ 2460:ed69575596ac
6981791: remove experimental code for JSR 292
Reviewed-by: twisti
author | jrose |
---|---|
date | Thu, 07 Apr 2011 17:02:30 -0700 |
parents | c5a923563727 |
children | 0654ee04b214 2d4b2b833d29 |
comparison
equal
deleted
inserted
replaced
2459:55973726c600 | 2460:ed69575596ac |
---|---|
50 case JVM_CONSTANT_Fieldref : // fall through | 50 case JVM_CONSTANT_Fieldref : // fall through |
51 case JVM_CONSTANT_Methodref : // fall through | 51 case JVM_CONSTANT_Methodref : // fall through |
52 case JVM_CONSTANT_MethodHandle : // fall through | 52 case JVM_CONSTANT_MethodHandle : // fall through |
53 case JVM_CONSTANT_MethodType : // fall through | 53 case JVM_CONSTANT_MethodType : // fall through |
54 case JVM_CONSTANT_InvokeDynamic : // fall through | 54 case JVM_CONSTANT_InvokeDynamic : // fall through |
55 case JVM_CONSTANT_InvokeDynamicTrans: // fall through | |
56 add_cp_cache_entry(i); | 55 add_cp_cache_entry(i); |
57 break; | 56 break; |
58 } | 57 } |
59 } | 58 } |
60 | 59 |
61 guarantee((int)_cp_cache_map.length()-1 <= (int)((u2)-1), | 60 guarantee((int)_cp_cache_map.length()-1 <= (int)((u2)-1), |
62 "all cp cache indexes fit in a u2"); | 61 "all cp cache indexes fit in a u2"); |
63 | 62 |
64 _have_invoke_dynamic = ((tag_mask & (1 << JVM_CONSTANT_InvokeDynamic)) != 0); | 63 _have_invoke_dynamic = ((tag_mask & (1 << JVM_CONSTANT_InvokeDynamic)) != 0); |
65 _have_invoke_dynamic |= ((tag_mask & (1 << JVM_CONSTANT_InvokeDynamicTrans)) != 0); | |
66 } | 64 } |
67 | 65 |
68 | 66 |
69 // Creates a constant pool cache given a CPC map | 67 // Creates a constant pool cache given a CPC map |
70 void Rewriter::make_constant_pool_cache(TRAPS) { | 68 void Rewriter::make_constant_pool_cache(TRAPS) { |
79 for (int i = 0; i < length; i++) { | 77 for (int i = 0; i < length; i++) { |
80 int pool_index = cp_cache_entry_pool_index(i); | 78 int pool_index = cp_cache_entry_pool_index(i); |
81 if (pool_index >= 0 && | 79 if (pool_index >= 0 && |
82 _pool->tag_at(pool_index).is_invoke_dynamic()) { | 80 _pool->tag_at(pool_index).is_invoke_dynamic()) { |
83 int bsm_index = _pool->invoke_dynamic_bootstrap_method_ref_index_at(pool_index); | 81 int bsm_index = _pool->invoke_dynamic_bootstrap_method_ref_index_at(pool_index); |
84 if (bsm_index != 0) { | 82 assert(_pool->tag_at(bsm_index).is_method_handle(), "must be a MH constant"); |
85 assert(_pool->tag_at(bsm_index).is_method_handle(), "must be a MH constant"); | 83 // There is a CP cache entry holding the BSM for these calls. |
86 // There is a CP cache entry holding the BSM for these calls. | 84 int bsm_cache_index = cp_entry_to_cp_cache(bsm_index); |
87 int bsm_cache_index = cp_entry_to_cp_cache(bsm_index); | 85 cache->entry_at(i)->initialize_bootstrap_method_index_in_cache(bsm_cache_index); |
88 cache->entry_at(i)->initialize_bootstrap_method_index_in_cache(bsm_cache_index); | |
89 } else { | |
90 // There is no CP cache entry holding the BSM for these calls. | |
91 // We will need to look for a class-global BSM, later. | |
92 guarantee(AllowTransitionalJSR292, ""); | |
93 } | |
94 } | 86 } |
95 } | 87 } |
96 } | 88 } |
97 | 89 |
98 _pool->set_cache(cache); | 90 _pool->set_cache(cache); |