| 9347 | } |
| 9348 | |
| 9349 | GcArray* insertCallNode(MyThread* t, |
| 9350 | GcArray* table, |
| 9351 | unsigned* size, |
| 9352 | GcCallNode* node) |
| 9353 | { |
| 9354 | if (DebugCallTable) { |
| 9355 | fprintf(stderr, |
| 9356 | "insert call node %p\n", |
| 9357 | reinterpret_cast<void*>(node->address())); |
| 9358 | } |
| 9359 | |
| 9360 | PROTECT(t, table); |
| 9361 | PROTECT(t, node); |
| 9362 | |
| 9363 | ++(*size); |
| 9364 | |
| 9365 | if (*size >= table->length() * 2) { |
| 9366 | table = resizeTable(t, table, table->length() * 2); |
| 9367 | } |
| 9368 | |
| 9369 | intptr_t key = node->address(); |
| 9370 | unsigned index = static_cast<uintptr_t>(key) & (table->length() - 1); |
| 9371 | |
| 9372 | node->setNext(t, cast<GcCallNode>(t, table->body()[index])); |
| 9373 | table->setBodyElement(t, index, node); |
| 9374 | |
| 9375 | return table; |
| 9376 | } |
| 9377 | |
| 9378 | GcHashMap* makeClassMap(Thread* t, |
| 9379 | unsigned* table, |
no test coverage detected