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

Method AddInstructionFirst

sdk/angelscript/source/as_bytecode.cpp:1648–1669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1646}
1647
1648int asCByteCode::AddInstructionFirst()
1649{
1650 void *ptr = engine->memoryMgr.AllocByteInstruction();
1651 if( ptr == 0 )
1652 {
1653 // Out of memory
1654 return 0;
1655 }
1656
1657 asCByteInstruction *instr = new(ptr) asCByteInstruction();
1658 if( first == 0 )
1659 {
1660 first = last = instr;
1661 }
1662 else
1663 {
1664 first->AddBefore(instr);
1665 first = instr;
1666 }
1667
1668 return 0;
1669}
1670
1671void asCByteCode::Call(asEBCInstr instr, int funcID, int pop)
1672{

Callers

nothing calls this directly

Calls 2

AllocByteInstructionMethod · 0.80
AddBeforeMethod · 0.80

Tested by

no test coverage detected