equal
deleted
inserted
replaced
261 } |
261 } |
262 |
262 |
263 static StackValue* create_stack_value_from_oop_map(const InterpreterOopMap& oop_mask, |
263 static StackValue* create_stack_value_from_oop_map(const InterpreterOopMap& oop_mask, |
264 int index, |
264 int index, |
265 const intptr_t* const addr) { |
265 const intptr_t* const addr) { |
|
266 |
|
267 assert(index >= 0 && |
|
268 index < oop_mask.number_of_entries(), "invariant"); |
|
269 |
266 // categorize using oop_mask |
270 // categorize using oop_mask |
267 if (oop_mask.is_oop(index)) { |
271 if (oop_mask.is_oop(index)) { |
268 // reference (oop) "r" |
272 // reference (oop) "r" |
269 Handle h(addr != NULL ? (*(oop*)addr) : (oop)NULL); |
273 Handle h(addr != NULL ? (*(oop*)addr) : (oop)NULL); |
270 return new StackValue(h); |
274 return new StackValue(h); |
305 } |
309 } |
306 } |
310 } |
307 |
311 |
308 static void stack_expressions(StackValueCollection* result, |
312 static void stack_expressions(StackValueCollection* result, |
309 int length, |
313 int length, |
|
314 int max_locals, |
310 const InterpreterOopMap& oop_mask, |
315 const InterpreterOopMap& oop_mask, |
311 const frame& fr) { |
316 const frame& fr) { |
312 |
317 |
313 assert(result != NULL, "invariant"); |
318 assert(result != NULL, "invariant"); |
314 |
319 |
317 assert(addr != NULL, "invariant"); |
322 assert(addr != NULL, "invariant"); |
318 if (!is_in_expression_stack(fr, addr)) { |
323 if (!is_in_expression_stack(fr, addr)) { |
319 // Need to ensure no bogus escapes. |
324 // Need to ensure no bogus escapes. |
320 addr = NULL; |
325 addr = NULL; |
321 } |
326 } |
322 StackValue* const sv = create_stack_value_from_oop_map(oop_mask, i, addr); |
327 |
|
328 StackValue* const sv = create_stack_value_from_oop_map(oop_mask, |
|
329 i + max_locals, |
|
330 addr); |
323 assert(sv != NULL, "sanity check"); |
331 assert(sv != NULL, "sanity check"); |
324 |
332 |
325 result->add(sv); |
333 result->add(sv); |
326 } |
334 } |
327 } |
335 } |
373 if (0 == length) { |
381 if (0 == length) { |
374 return result; |
382 return result; |
375 } |
383 } |
376 |
384 |
377 if (expressions) { |
385 if (expressions) { |
378 stack_expressions(result, length, oop_mask, fr()); |
386 stack_expressions(result, length, max_locals, oop_mask, fr()); |
379 } else { |
387 } else { |
380 stack_locals(result, length, oop_mask, fr()); |
388 stack_locals(result, length, oop_mask, fr()); |
381 } |
389 } |
382 |
390 |
383 assert(length == result->size(), "invariant"); |
391 assert(length == result->size(), "invariant"); |