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

Method AdjustStackPosition

sdk/angelscript/source/as_restore.cpp:3734–3750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3732}
3733
3734int asCReader::AdjustStackPosition(int pos)
3735{
3736 if( pos >= (int)adjustByPos.GetLength() )
3737 {
3738 // It can be higher for primitives allocated on top of highest object variable
3739 if( adjustByPos.GetLength() )
3740 pos += (short)adjustByPos[adjustByPos.GetLength()-1];
3741 }
3742 else if( pos >= 0 )
3743 pos += (short)adjustByPos[pos];
3744 else if( -pos >= (int)adjustNegativeStackByPos.GetLength() )
3745 Error(TXT_INVALID_BYTECODE_d);
3746 else
3747 pos += (short)adjustNegativeStackByPos[-pos];
3748
3749 return pos;
3750}
3751
3752int asCReader::AdjustGetOffset(int offset, asCScriptFunction *func, asDWORD programPos)
3753{

Callers

nothing calls this directly

Calls 1

GetLengthMethod · 0.45

Tested by

no test coverage detected