Mercurial > hg > truffle
comparison src/share/vm/ci/bcEscapeAnalyzer.cpp @ 11198:1e6d5dec4a4e
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Aug 2013 13:20:06 +0200 |
parents | c90c698831d7 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
11197:3479ab380552 | 11198:1e6d5dec4a4e |
---|---|
136 return true; | 136 return true; |
137 } | 137 } |
138 return false; | 138 return false; |
139 } | 139 } |
140 | 140 |
141 // return true if all argument elements of vars are returned | |
142 bool BCEscapeAnalyzer::returns_all(ArgumentMap vars) { | |
143 for (int i = 0; i < _arg_size; i++) { | |
144 if (vars.contains(i) && !_arg_returned.test(i)) { | |
145 return false; | |
146 } | |
147 } | |
148 return true; | |
149 } | |
150 | |
141 void BCEscapeAnalyzer::clear_bits(ArgumentMap vars, VectorSet &bm) { | 151 void BCEscapeAnalyzer::clear_bits(ArgumentMap vars, VectorSet &bm) { |
142 for (int i = 0; i < _arg_size; i++) { | 152 for (int i = 0; i < _arg_size; i++) { |
143 if (vars.contains(i)) { | 153 if (vars.contains(i)) { |
144 bm >>= i; | 154 bm >>= i; |
145 } | 155 } |
163 if (vars.contains_unknown() || vars.contains_allocated()) { | 173 if (vars.contains_unknown() || vars.contains_allocated()) { |
164 _return_local = false; | 174 _return_local = false; |
165 } | 175 } |
166 if (vars.contains_unknown() || vars.contains_vars()) { | 176 if (vars.contains_unknown() || vars.contains_vars()) { |
167 _return_allocated = false; | 177 _return_allocated = false; |
178 } | |
179 if (_return_local && vars.contains_vars() && !returns_all(vars)) { | |
180 // Return result should be invalidated if args in new | |
181 // state are not recorded in return state. | |
182 _return_local = false; | |
168 } | 183 } |
169 } | 184 } |
170 } | 185 } |
171 | 186 |
172 void BCEscapeAnalyzer::set_dirty(ArgumentMap vars) { | 187 void BCEscapeAnalyzer::set_dirty(ArgumentMap vars) { |