Mercurial > hg > graal-compiler
comparison src/share/vm/interpreter/rewriter.cpp @ 2011:dad31fc330cd
7001379: bootstrap method data needs to be moved from constant pool to a classfile attribute
Reviewed-by: twisti
author | jrose |
---|---|
date | Fri, 03 Dec 2010 15:53:57 -0800 |
parents | f95d63e2154a |
children | 06f017f7daa7 8012aa3ccede |
comparison
equal
deleted
inserted
replaced
2010:7601ab0e1e33 | 2011:dad31fc330cd |
---|---|
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 | |
55 add_cp_cache_entry(i); | 56 add_cp_cache_entry(i); |
56 break; | 57 break; |
57 } | 58 } |
58 } | 59 } |
59 | 60 |
60 guarantee((int)_cp_cache_map.length()-1 <= (int)((u2)-1), | 61 guarantee((int)_cp_cache_map.length()-1 <= (int)((u2)-1), |
61 "all cp cache indexes fit in a u2"); | 62 "all cp cache indexes fit in a u2"); |
62 | 63 |
63 _have_invoke_dynamic = ((tag_mask & (1 << JVM_CONSTANT_InvokeDynamic)) != 0); | 64 _have_invoke_dynamic = ((tag_mask & (1 << JVM_CONSTANT_InvokeDynamic)) != 0); |
65 _have_invoke_dynamic |= ((tag_mask & (1 << JVM_CONSTANT_InvokeDynamicTrans)) != 0); | |
64 } | 66 } |
65 | 67 |
66 | 68 |
67 // Creates a constant pool cache given a CPC map | 69 // Creates a constant pool cache given a CPC map |
68 // This creates the constant pool cache initially in a state | 70 // This creates the constant pool cache initially in a state |
72 const int length = _cp_cache_map.length(); | 74 const int length = _cp_cache_map.length(); |
73 constantPoolCacheOop cache = | 75 constantPoolCacheOop cache = |
74 oopFactory::new_constantPoolCache(length, methodOopDesc::IsUnsafeConc, CHECK); | 76 oopFactory::new_constantPoolCache(length, methodOopDesc::IsUnsafeConc, CHECK); |
75 cache->initialize(_cp_cache_map); | 77 cache->initialize(_cp_cache_map); |
76 | 78 |
77 // Don't bother to the next pass if there is no JVM_CONSTANT_InvokeDynamic. | 79 // Don't bother with the next pass if there is no JVM_CONSTANT_InvokeDynamic. |
78 if (_have_invoke_dynamic) { | 80 if (_have_invoke_dynamic) { |
79 for (int i = 0; i < length; i++) { | 81 for (int i = 0; i < length; i++) { |
80 int pool_index = cp_cache_entry_pool_index(i); | 82 int pool_index = cp_cache_entry_pool_index(i); |
81 if (pool_index >= 0 && | 83 if (pool_index >= 0 && |
82 _pool->tag_at(pool_index).is_invoke_dynamic()) { | 84 _pool->tag_at(pool_index).is_invoke_dynamic()) { |