MCPcopy Create free account
hub / github.com/anjo76/angelscript / ExtractTryCatchInfo

Method ExtractTryCatchInfo

sdk/angelscript/source/as_bytecode.cpp:1566–1586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1564}
1565
1566void asCByteCode::ExtractTryCatchInfo(asCScriptFunction *outFunc)
1567{
1568 asASSERT(outFunc->scriptData);
1569
1570 unsigned int pos = 0;
1571 asCByteInstruction *instr = first;
1572 while (instr)
1573 {
1574 if (instr->op == asBC_TryBlock)
1575 {
1576 asSTryCatchInfo info;
1577 info.tryPos = pos;
1578 info.catchPos = *ARG_DW(instr->arg);
1579 info.stackSize = asUINT(instr->stackSize);
1580 outFunc->scriptData->tryCatchInfo.PushLast(info);
1581 }
1582
1583 pos += instr->size;
1584 instr = instr->next;
1585 }
1586}
1587
1588int asCByteCode::GetSize()
1589{

Callers 1

FinalizeFunctionMethod · 0.80

Calls 1

PushLastMethod · 0.80

Tested by

no test coverage detected