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

Method AddInstruction

sdk/angelscript/source/as_bytecode.cpp:1625–1646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1623}
1624
1625int asCByteCode::AddInstruction()
1626{
1627 void *ptr = engine->memoryMgr.AllocByteInstruction();
1628 if( ptr == 0 )
1629 {
1630 // Out of memory
1631 return 0;
1632 }
1633
1634 asCByteInstruction *instr = new(ptr) asCByteInstruction();
1635 if( first == 0 )
1636 {
1637 first = last = instr;
1638 }
1639 else
1640 {
1641 last->AddAfter(instr);
1642 last = instr;
1643 }
1644
1645 return 0;
1646}
1647
1648int asCByteCode::AddInstructionFirst()
1649{

Callers

nothing calls this directly

Calls 2

AllocByteInstructionMethod · 0.80
AddAfterMethod · 0.80

Tested by

no test coverage detected