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

Method IsSimpleExpression

sdk/angelscript/source/as_bytecode.cpp:1430–1453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1428}
1429
1430bool asCByteCode::IsSimpleExpression()
1431{
1432 // A simple expression is one that cannot be suspended at any time, i.e.
1433 // it doesn't have any calls to other routines, and doesn't have any suspend instructions
1434 asCByteInstruction *instr = first;
1435 while( instr )
1436 {
1437 if( instr->op == asBC_ALLOC ||
1438 instr->op == asBC_CALL ||
1439 instr->op == asBC_CALLSYS ||
1440 instr->op == asBC_SUSPEND ||
1441 instr->op == asBC_LINE ||
1442 instr->op == asBC_FREE ||
1443 instr->op == asBC_CallPtr ||
1444 instr->op == asBC_CALLINTF ||
1445 instr->op == asBC_CALLBND ||
1446 instr->op == asBC_Thiscall1 )
1447 return false;
1448
1449 instr = instr->next;
1450 }
1451
1452 return true;
1453}
1454
1455void asCByteCode::ExtractLineNumbers()
1456{

Callers 2

CompileInitializationMethod · 0.80
DoAssignmentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected