Mercurial > hg > graal-compiler
comparison src/share/vm/ci/bcEscapeAnalyzer.cpp @ 4122:cc81b9c09bbb
7112478: after 7105605 JRuby bench_define_method_methods.rb fails with NPE
Summary: Fixed several EA issues with Connection Graph construction.
Reviewed-by: never, twisti
author | kvn |
---|---|
date | Mon, 28 Nov 2011 15:46:31 -0800 |
parents | 548597e74aa4 |
children | 5ed8f599a788 |
comparison
equal
deleted
inserted
replaced
4121:db2e64ca2d5a | 4122:cc81b9c09bbb |
---|---|
148 | 148 |
149 void BCEscapeAnalyzer::set_method_escape(ArgumentMap vars) { | 149 void BCEscapeAnalyzer::set_method_escape(ArgumentMap vars) { |
150 clear_bits(vars, _arg_local); | 150 clear_bits(vars, _arg_local); |
151 } | 151 } |
152 | 152 |
153 void BCEscapeAnalyzer::set_global_escape(ArgumentMap vars) { | 153 void BCEscapeAnalyzer::set_global_escape(ArgumentMap vars, bool merge) { |
154 clear_bits(vars, _arg_local); | 154 clear_bits(vars, _arg_local); |
155 clear_bits(vars, _arg_stack); | 155 clear_bits(vars, _arg_stack); |
156 if (vars.contains_allocated()) | 156 if (vars.contains_allocated()) |
157 _allocated_escapes = true; | 157 _allocated_escapes = true; |
158 | |
159 if (merge && !vars.is_empty()) { | |
160 // Merge new state into already processed block. | |
161 // New state is not taken into account and | |
162 // it may invalidate set_returned() result. | |
163 if (vars.contains_unknown() || vars.contains_allocated()) { | |
164 _return_local = false; | |
165 } | |
166 if (vars.contains_unknown() || vars.contains_vars()) { | |
167 _return_allocated = false; | |
168 } | |
169 } | |
158 } | 170 } |
159 | 171 |
160 void BCEscapeAnalyzer::set_dirty(ArgumentMap vars) { | 172 void BCEscapeAnalyzer::set_dirty(ArgumentMap vars) { |
161 clear_bits(vars, _dirty); | 173 clear_bits(vars, _dirty); |
162 } | 174 } |
997 t.clear(); | 1009 t.clear(); |
998 t = s_state->_stack[i]; | 1010 t = s_state->_stack[i]; |
999 t.set_difference(d_state->_stack[i]); | 1011 t.set_difference(d_state->_stack[i]); |
1000 extra_vars.set_union(t); | 1012 extra_vars.set_union(t); |
1001 } | 1013 } |
1002 set_global_escape(extra_vars); | 1014 set_global_escape(extra_vars, true); |
1003 } | 1015 } |
1004 } | 1016 } |
1005 | 1017 |
1006 void BCEscapeAnalyzer::iterate_blocks(Arena *arena) { | 1018 void BCEscapeAnalyzer::iterate_blocks(Arena *arena) { |
1007 int numblocks = _methodBlocks->num_blocks(); | 1019 int numblocks = _methodBlocks->num_blocks(); |