| 7375 | } |
| 7376 | |
| 7377 | void findFrameMapInSimpleTable(MyThread* t, |
| 7378 | GcMethod* method, |
| 7379 | GcIntArray* table, |
| 7380 | int32_t offset, |
| 7381 | int32_t** map, |
| 7382 | unsigned* start) |
| 7383 | { |
| 7384 | unsigned tableSize = simpleFrameMapTableSize(t, method, table); |
| 7385 | unsigned indexSize = table->length() - tableSize; |
| 7386 | |
| 7387 | *map = &table->body()[indexSize]; |
| 7388 | |
| 7389 | unsigned bottom = 0; |
| 7390 | unsigned top = indexSize; |
| 7391 | for (unsigned span = top - bottom; span; span = top - bottom) { |
| 7392 | unsigned middle = bottom + (span / 2); |
| 7393 | int32_t v = table->body()[middle]; |
| 7394 | |
| 7395 | if (offset == v) { |
| 7396 | *start = frameMapSizeInBits(t, method) * middle; |
| 7397 | return; |
| 7398 | } else if (offset < v) { |
| 7399 | top = middle; |
| 7400 | } else { |
| 7401 | bottom = middle + 1; |
| 7402 | } |
| 7403 | } |
| 7404 | |
| 7405 | abort(t); |
| 7406 | } |
| 7407 | |
| 7408 | void findFrameMap(MyThread* t, |
| 7409 | void* stack UNUSED, |
no test coverage detected