MCPcopy Create free account
hub / github.com/ReadyTalk/avian / makeSimpleFrameMapTable

Function makeSimpleFrameMapTable

src/compile.cpp:6726–6757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6724};
6725
6726GcIntArray* makeSimpleFrameMapTable(MyThread* t,
6727 Context* context,
6728 uint8_t* start,
6729 TraceElement** elements,
6730 unsigned elementCount)
6731{
6732 unsigned mapSize = frameMapSizeInBits(t, context->method);
6733 GcIntArray* table = makeIntArray(
6734 t, elementCount + ceilingDivide(elementCount * mapSize, 32));
6735
6736 assertT(t,
6737 table->length()
6738 == elementCount + simpleFrameMapTableSize(t, context->method, table));
6739
6740 for (unsigned i = 0; i < elementCount; ++i) {
6741 TraceElement* p = elements[i];
6742
6743 table->body()[i] = static_cast<intptr_t>(p->address->value())
6744 - reinterpret_cast<intptr_t>(start);
6745
6746 assertT(
6747 t,
6748 elementCount + ceilingDivide((i + 1) * mapSize, 32) <= table->length());
6749
6750 if (mapSize) {
6751 copyFrameMap(
6752 &table->body()[elementCount], p->map, mapSize, i * mapSize, p);
6753 }
6754 }
6755
6756 return table;
6757}
6758
6759void insertCallNode(MyThread* t, GcCallNode* node);
6760

Callers 1

finishFunction · 0.85

Calls 8

frameMapSizeInBitsFunction · 0.85
ceilingDivideFunction · 0.85
assertTFunction · 0.85
simpleFrameMapTableSizeFunction · 0.85
copyFrameMapFunction · 0.85
bodyMethod · 0.80
lengthMethod · 0.65
valueMethod · 0.45

Tested by

no test coverage detected