| 1468 | } |
| 1469 | |
| 1470 | void BfModule::StartExtension() |
| 1471 | { |
| 1472 | BF_ASSERT(!mIsModuleMutable); |
| 1473 | |
| 1474 | BfLogSysM("Extension started of module %p\n", this); |
| 1475 | |
| 1476 | mExtensionCount++; |
| 1477 | |
| 1478 | if (mBfIRBuilder != NULL) |
| 1479 | mPrevIRBuilders.push_back(mBfIRBuilder); |
| 1480 | mBfIRBuilder = NULL; |
| 1481 | mWantsIRIgnoreWrites = false; |
| 1482 | |
| 1483 | mFuncReferences.Clear(); |
| 1484 | mClassVDataRefs.Clear(); |
| 1485 | mClassVDataExtRefs.Clear(); |
| 1486 | for (auto& kv : mTypeDataRefs) |
| 1487 | kv.mValue = BfIRValue(); |
| 1488 | mDbgRawAllocDataRefs.Clear(); |
| 1489 | mStringCharPtrPool.Clear(); |
| 1490 | mStringObjectPool.Clear(); |
| 1491 | mStaticFieldRefs.Clear(); |
| 1492 | for (auto& kv : mInterfaceSlotRefs) |
| 1493 | kv.mValue = BfIRValue(); |
| 1494 | for (auto& pairVal : mDeferredMethodCallData) |
| 1495 | delete pairVal.mValue; |
| 1496 | mDeferredMethodCallData.Clear(); |
| 1497 | mDeferredMethodIds.Clear(); |
| 1498 | |
| 1499 | DisownMethods(); |
| 1500 | |
| 1501 | BfLogSysM("Mod:%p StartExtension: %s\n", this, mModuleName.c_str()); |
| 1502 | |
| 1503 | bool wasAwaitingInitFinish = mAwaitingInitFinish; |
| 1504 | int prevOnDemandMethodCount = mOnDemandMethodCount; |
| 1505 | Init(false); |
| 1506 | if (!wasAwaitingInitFinish) |
| 1507 | FinishInit(); |
| 1508 | mOnDemandMethodCount = prevOnDemandMethodCount; |
| 1509 | } |
| 1510 | |
| 1511 | void BfModule::GetConstClassValueParam(BfIRValue classVData, SizedArrayImpl<BfIRValue>& typeValueParams) |
| 1512 | { |