Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/rewriter.hpp @ 3404:2d4b2b833d29
7033141: assert(has_cp_cache(i)) failed: oob
Summary: Unrewrite bytecodes for OOM error allocating the constant pool cache.
Reviewed-by: dcubed, acorn, never
author | coleenp |
---|---|
date | Fri, 27 May 2011 15:04:48 -0700 |
parents | f95d63e2154a |
children | 1d7922586cf6 |
comparison
equal
deleted
inserted
replaced
3403:7db2b9499c36 | 3404:2d4b2b833d29 |
---|---|
83 // All the work goes in here: | 83 // All the work goes in here: |
84 Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS); | 84 Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS); |
85 | 85 |
86 void compute_index_maps(); | 86 void compute_index_maps(); |
87 void make_constant_pool_cache(TRAPS); | 87 void make_constant_pool_cache(TRAPS); |
88 void scan_method(methodOop m); | 88 void scan_method(methodOop m, bool reverse = false); |
89 methodHandle rewrite_jsrs(methodHandle m, TRAPS); | |
90 void rewrite_Object_init(methodHandle m, TRAPS); | 89 void rewrite_Object_init(methodHandle m, TRAPS); |
91 void rewrite_member_reference(address bcp, int offset); | 90 void rewrite_member_reference(address bcp, int offset, bool reverse = false); |
92 void rewrite_invokedynamic(address bcp, int offset); | 91 void rewrite_invokedynamic(address bcp, int offset, bool reverse = false); |
93 void maybe_rewrite_ldc(address bcp, int offset, bool is_wide); | 92 void maybe_rewrite_ldc(address bcp, int offset, bool is_wide, bool reverse = false); |
93 // Revert bytecodes in case of an exception. | |
94 void restore_bytecodes(); | |
94 | 95 |
96 static methodHandle rewrite_jsrs(methodHandle m, TRAPS); | |
95 public: | 97 public: |
96 // Driver routine: | 98 // Driver routine: |
97 static void rewrite(instanceKlassHandle klass, TRAPS); | 99 static void rewrite(instanceKlassHandle klass, TRAPS); |
98 static void rewrite(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS); | 100 static void rewrite(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS); |
99 | 101 |
100 enum { | 102 enum { |
101 _secondary_entry_tag = nth_bit(30) | 103 _secondary_entry_tag = nth_bit(30) |
102 }; | 104 }; |
105 | |
106 // Second pass, not gated by is_rewritten flag | |
107 static void relocate_and_link(instanceKlassHandle klass, TRAPS); | |
108 // JSR292 version to call with it's own methods. | |
109 static void relocate_and_link(instanceKlassHandle klass, | |
110 objArrayHandle methods, TRAPS); | |
111 | |
103 }; | 112 }; |
104 | 113 |
105 #endif // SHARE_VM_INTERPRETER_REWRITER_HPP | 114 #endif // SHARE_VM_INTERPRETER_REWRITER_HPP |