#include <as_bytecode.h>
Definition at line 56 of file as_bytecode.h.
| BEGIN_AS_NAMESPACE asCByteCode::asCByteCode | ( | asCScriptEngine * | engine | ) |
Definition at line 50 of file as_bytecode.cpp.
References first, largestStackUsed, and last.
| asCByteCode::~asCByteCode | ( | ) |
Definition at line 59 of file as_bytecode.cpp.
References ClearAll().
| void asCByteCode::AddCode | ( | asCByteCode * | bc | ) |
Definition at line 1068 of file as_bytecode.cpp.
References first, last, cByteInstruction::next, and cByteInstruction::prev.
Referenced by asCCompiler::CallDefaultConstructor(), asCCompiler::CompileCase(), asCCompiler::CompileConstructCall(), asCCompiler::CompileDeclaration(), asCCompiler::CompileDoWhileStatement(), asCCompiler::CompileExpressionPostOp(), asCCompiler::CompileExpressionStatement(), asCCompiler::CompileForStatement(), asCCompiler::CompileFunction(), asCCompiler::CompileGlobalVariable(), asCBuilder::CompileGlobalVariables(), asCCompiler::CompileIfStatement(), asCCompiler::CompileInitList(), asCCompiler::CompileReturnStatement(), asCCompiler::CompileStatementBlock(), asCCompiler::CompileSwitchStatement(), asCCompiler::CompileWhileStatement(), asCCompiler::ConvertToTempVariable(), asCCompiler::ConvertToTempVariableNotIn(), asCCompiler::ImplicitConvObjectToObject(), asCCompiler::MakeFunctionCall(), asCCompiler::MergeExprContexts(), asCCompiler::PerformAssignment(), asCCompiler::PrepareArgument(), asCCompiler::PrepareArgument2(), and asCCompiler::PrepareFunctionCall().
| int asCByteCode::AddInstruction | ( | ) | [protected] |
Definition at line 1090 of file as_bytecode.cpp.
References cByteInstruction::AddAfter(), asCMemoryMgr::AllocByteInstruction(), engine, first, last, and asCScriptEngine::memoryMgr.
Referenced by Alloc(), Call(), Instr(), InstrDOUBLE(), InstrDWORD(), InstrFLOAT(), InstrINT(), InstrPTR(), InstrQWORD(), InstrSHORT(), InstrSHORT_B(), InstrSHORT_DW(), InstrSHORT_QW(), InstrSHORT_W(), InstrW_DW(), InstrW_FLOAT(), InstrW_QW(), InstrW_W(), InstrW_W_W(), InstrWORD(), JmpP(), Label(), Line(), Pop(), Push(), and Ret().
| int asCByteCode::AddInstructionFirst | ( | ) | [protected] |
Definition at line 1106 of file as_bytecode.cpp.
References cByteInstruction::AddBefore(), asCMemoryMgr::AllocByteInstruction(), engine, first, last, and asCScriptEngine::memoryMgr.
Referenced by InsertFirstInstrDWORD(), and InsertFirstInstrQWORD().
| void asCByteCode::AddPath | ( | asCArray< cByteInstruction * > & | paths, | |
| cByteInstruction * | instr, | |||
| int | stackSize | |||
| ) |
Definition at line 226 of file as_bytecode.cpp.
References asASSERT, cByteInstruction::marked, asCArray< T >::PushLast(), and cByteInstruction::stackSize.
Referenced by PostProcess().
Definition at line 1139 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, ARG_PTR, AS_PTR_SIZE, asASSERT, asPTRWORD, InstrWORD(), last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::CallDefaultConstructor(), asCCompiler::CompileFactory(), and asCCompiler::PerformFunctionCall().
Definition at line 1122 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, InstrWORD(), last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFunction(), asCCompiler::CompileInitList(), asCCompiler::CompileTemplateFactoryStub(), asCCompiler::PerformAssignment(), and asCCompiler::PerformFunctionCall().
| bool asCByteCode::CanBeSwapped | ( | cByteInstruction * | curr | ) | [protected] |
Definition at line 314 of file as_bytecode.cpp.
References cByteInstruction::next, and cByteInstruction::op.
Referenced by Optimize().
| cByteInstruction * asCByteCode::ChangeFirstDeleteNext | ( | cByteInstruction * | curr, | |
| asEBCInstr | bc | |||
| ) | [protected] |
Definition at line 260 of file as_bytecode.cpp.
References DeleteInstruction(), cByteInstruction::next, cByteInstruction::op, and cByteInstruction::prev.
Referenced by Optimize().
| void asCByteCode::ClearAll | ( | ) |
Definition at line 80 of file as_bytecode.cpp.
References engine, first, asCMemoryMgr::FreeByteInstruction(), largestStackUsed, last, lineNumbers, asCScriptEngine::memoryMgr, cByteInstruction::next, asCArray< T >::SetLength(), and temporaryVariables.
Referenced by asCCompiler::Reset(), and ~asCByteCode().
| void asCByteCode::DebugOutput | ( | const char * | name, | |
| asCModule * | module, | |||
| asCScriptEngine * | engine | |||
| ) |
Definition at line 1497 of file as_bytecode.cpp.
Referenced by asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFunction(), and asCBuilder::CompileGlobalVariables().
| void asCByteCode::DefineTemporaryVariable | ( | int | varOffset | ) |
Definition at line 2165 of file as_bytecode.cpp.
References asCArray< T >::PushLast(), and temporaryVariables.
Referenced by asCCompiler::CompileFunction().
| cByteInstruction * asCByteCode::DeleteFirstChangeNext | ( | cByteInstruction * | curr, | |
| asEBCInstr | bc | |||
| ) | [protected] |
Definition at line 273 of file as_bytecode.cpp.
References asASSERT, DeleteInstruction(), cByteInstruction::next, cByteInstruction::op, and cByteInstruction::prev.
Referenced by Optimize().
| cByteInstruction * asCByteCode::DeleteInstruction | ( | cByteInstruction * | instr | ) | [protected] |
Definition at line 1297 of file as_bytecode.cpp.
References engine, asCMemoryMgr::FreeByteInstruction(), asCScriptEngine::memoryMgr, cByteInstruction::next, cByteInstruction::prev, and RemoveInstruction().
Referenced by ChangeFirstDeleteNext(), DeleteFirstChangeNext(), ExtractLineNumbers(), Optimize(), PostProcess(), and RemoveUnusedValue().
Definition at line 183 of file as_bytecode.cpp.
References first, cByteInstruction::next, cByteInstruction::op, and cByteInstruction::wArg.
Referenced by asCCompiler::DoAssignment(), and asCCompiler::MakeFunctionCall().
| void asCByteCode::ExtractLineNumbers | ( | ) |
Definition at line 1014 of file as_bytecode.cpp.
References cByteInstruction::arg, ARG_DW, asCScriptEngine::buildWithoutLineCues, DeleteInstruction(), engine, asCScriptEngine::ep, first, lineNumbers, cByteInstruction::next, cByteInstruction::op, asCArray< T >::PopLast(), asCArray< T >::PushLast(), and cByteInstruction::size.
Referenced by Finalize().
| void asCByteCode::Finalize | ( | ) |
Definition at line 64 of file as_bytecode.cpp.
References engine, asCScriptEngine::ep, ExtractLineNumbers(), Optimize(), asCScriptEngine::optimizeByteCode, PostProcess(), and ResolveJumpAddresses().
Referenced by asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFactory(), asCCompiler::CompileFunction(), asCBuilder::CompileGlobalVariables(), and asCCompiler::CompileTemplateFactoryStub().
| int asCByteCode::FindLabel | ( | int | label, | |
| cByteInstruction * | from, | |||
| cByteInstruction ** | dest, | |||
| int * | positionDelta | |||
| ) |
Definition at line 1217 of file as_bytecode.cpp.
References cByteInstruction::GetSize(), cByteInstruction::next, cByteInstruction::op, cByteInstruction::prev, and cByteInstruction::wArg.
Referenced by IsTempVarRead(), PostProcess(), and ResolveJumpAddresses().
| int asCByteCode::GetLastInstr | ( | ) |
Definition at line 2129 of file as_bytecode.cpp.
References last, and cByteInstruction::op.
Referenced by asCCompiler::CompileConstructCall(), asCCompiler::CompileExpressionTerm(), asCCompiler::CompileExpressionValue(), and asCCompiler::CompilePostFixExpression().
| asDWORD asCByteCode::GetLastInstrValueDW | ( | ) |
Definition at line 2158 of file as_bytecode.cpp.
References cByteInstruction::arg, ARG_DW, and last.
| int asCByteCode::GetSize | ( | ) |
Definition at line 1054 of file as_bytecode.cpp.
References first, cByteInstruction::GetSize(), and cByteInstruction::next.
Referenced by asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFactory(), asCCompiler::CompileFunction(), asCBuilder::CompileGlobalVariables(), and asCCompiler::CompileTemplateFactoryStub().
Definition at line 107 of file as_bytecode.cpp.
References first, InsertIfNotExists(), cByteInstruction::next, cByteInstruction::op, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileBitwiseOperator(), asCCompiler::CompileBooleanOperator(), asCCompiler::CompileComparisonOperator(), asCCompiler::CompileCondition(), asCCompiler::CompileMathOperator(), asCCompiler::CompileOverloadedDualOperator(), asCCompiler::ConvertToTempVariable(), asCCompiler::ConvertToTempVariableNotIn(), asCCompiler::ConvertToVariableNotIn(), asCCompiler::DoAssignment(), asCCompiler::MakeFunctionCall(), asCCompiler::PrepareArgument(), asCCompiler::PrepareForAssignment(), and asCCompiler::PrepareFunctionCall().
| cByteInstruction * asCByteCode::GoBack | ( | cByteInstruction * | curr | ) | [protected] |
Definition at line 334 of file as_bytecode.cpp.
References cByteInstruction::prev.
Referenced by Optimize(), PostponeInitOfTemp(), and RemoveUnusedValue().
| void asCByteCode::InsertBefore | ( | cByteInstruction * | before, | |
| cByteInstruction * | instr | |||
| ) | [protected] |
Definition at line 289 of file as_bytecode.cpp.
References asASSERT, first, cByteInstruction::next, and cByteInstruction::prev.
Referenced by Optimize(), and PostponeInitOfTemp().
| int asCByteCode::InsertFirstInstrDWORD | ( | asEBCInstr | bc, | |
| asDWORD | param | |||
| ) |
Definition at line 1775 of file as_bytecode.cpp.
References AddInstructionFirst(), cByteInstruction::arg, ARG_DW, asASSERT, first, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
| int asCByteCode::InsertFirstInstrQWORD | ( | asEBCInstr | bc, | |
| asQWORD | param | |||
| ) |
Definition at line 1791 of file as_bytecode.cpp.
References AddInstructionFirst(), cByteInstruction::arg, ARG_QW, asASSERT, first, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Definition at line 101 of file as_bytecode.cpp.
References asCArray< T >::Exists(), and asCArray< T >::PushLast().
Referenced by GetVarsUsed().
| int asCByteCode::Instr | ( | asEBCInstr | bc | ) |
Definition at line 1807 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::CallDefaultConstructor(), asCCompiler::CompileBooleanOperator(), asCCompiler::CompileComparisonOperator(), asCCompiler::CompileCondition(), asCCompiler::CompileDeclaration(), asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileDoWhileStatement(), asCCompiler::CompileExpressionPostOp(), asCCompiler::CompileExpressionValue(), asCCompiler::CompileForStatement(), asCCompiler::CompileFunction(), asCCompiler::CompileGlobalVariable(), asCCompiler::CompileIfStatement(), asCCompiler::CompileInitList(), asCCompiler::CompileOverloadedDualOperator(), asCCompiler::CompileWhileStatement(), asCCompiler::Dereference(), asCCompiler::ImplicitConvObjectToObject(), asCCompiler::PerformAssignment(), asCCompiler::PerformFunctionCall(), asCCompiler::PrepareArgument(), and asCCompiler::PushVariableOnStack().
Definition at line 2113 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_QW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
| int asCByteCode::InstrDWORD | ( | asEBCInstr | bc, | |
| asDWORD | param | |||
| ) |
Definition at line 2031 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::CompileBooleanOperator(), asCCompiler::CompileCondition(), asCCompiler::CompileDoWhileStatement(), asCCompiler::CompileExpressionValue(), asCCompiler::CompileForStatement(), asCCompiler::CompileIfStatement(), asCCompiler::CompileInitList(), asCCompiler::CompileRefCast(), asCCompiler::CompileSwitchStatement(), asCCompiler::CompileWhileStatement(), and asCCompiler::PrepareArgument().
Definition at line 2097 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Definition at line 2015 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::CompileBooleanOperator(), asCCompiler::CompileBreakStatement(), asCCompiler::CompileCondition(), asCCompiler::CompileContinueStatement(), asCCompiler::CompileExpressionPostOp(), asCCompiler::CompileExpressionValue(), asCCompiler::CompileForStatement(), asCCompiler::CompileGlobalVariable(), asCCompiler::CompileIfStatement(), asCCompiler::CompileReturnStatement(), asCCompiler::CompileSwitchStatement(), and asCCompiler::CompileWhileStatement().
| int asCByteCode::InstrPTR | ( | asEBCInstr | bc, | |
| void * | param | |||
| ) |
Definition at line 2047 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_PTR, asASSERT, asPTRWORD, last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::CallDefaultConstructor(), asCCompiler::CallDestructor(), asCCompiler::CompileFunction(), asCCompiler::CompileGlobalVariable(), asCCompiler::CompileInitList(), asCCompiler::CompileTemplateFactoryStub(), asCCompiler::ConvertToVariableNotIn(), asCCompiler::PerformAssignment(), and asCCompiler::PrepareArgument().
| int asCByteCode::InstrQWORD | ( | asEBCInstr | bc, | |
| asQWORD | param | |||
| ) |
Definition at line 2063 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_QW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::CompileExpressionValue().
| int asCByteCode::InstrSHORT | ( | asEBCInstr | bc, | |
| short | param | |||
| ) |
Definition at line 1997 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CallDefaultConstructor(), asCCompiler::CallDestructor(), asCCompiler::CompileBooleanOperator(), asCCompiler::CompileComparisonOperator(), asCCompiler::CompileCondition(), asCCompiler::CompileConstructCall(), asCCompiler::CompileDeclaration(), asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileDoWhileStatement(), asCCompiler::CompileExpressionPreOp(), asCCompiler::CompileExpressionValue(), asCCompiler::CompileFactory(), asCCompiler::CompileForStatement(), asCCompiler::CompileFunction(), asCCompiler::CompileIfStatement(), asCCompiler::CompileInitList(), asCCompiler::CompileOverloadedDualOperator(), asCCompiler::CompileRefCast(), asCCompiler::CompileReturnStatement(), asCCompiler::CompileWhileStatement(), asCCompiler::ConvertToReference(), asCCompiler::ConvertToTempVariable(), asCCompiler::ConvertToTempVariableNotIn(), asCCompiler::ConvertToVariableNotIn(), asCCompiler::ImplicitConvObjectToObject(), asCCompiler::ImplicitConvPrimitiveToPrimitive(), asCCompiler::PerformAssignment(), asCCompiler::PerformFunctionCall(), asCCompiler::PrepareArgument(), asCCompiler::PrepareTemporaryObject(), asCCompiler::ProcessDeferredParams(), and asCCompiler::PushVariableOnStack().
| int asCByteCode::InstrSHORT_B | ( | asEBCInstr | bc, | |
| short | a, | |||
| asBYTE | b | |||
| ) |
Definition at line 1876 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileBooleanOperator(), and asCCompiler::ConvertToVariableNotIn().
| int asCByteCode::InstrSHORT_DW | ( | asEBCInstr | bc, | |
| short | a, | |||
| asDWORD | b | |||
| ) |
Definition at line 1928 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileBooleanOperator(), asCCompiler::CompileSwitchStatement(), and asCCompiler::ConvertToVariableNotIn().
| int asCByteCode::InstrSHORT_QW | ( | asEBCInstr | bc, | |
| short | a, | |||
| asQWORD | b | |||
| ) |
Definition at line 1963 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_QW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::ConvertToVariableNotIn().
| int asCByteCode::InstrSHORT_W | ( | asEBCInstr | bc, | |
| short | a, | |||
| asWORD | b | |||
| ) |
Definition at line 1903 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::ConvertToVariableNotIn().
| int asCByteCode::InstrW_DW | ( | asEBCInstr | bc, | |
| asWORD | a, | |||
| asDWORD | b | |||
| ) |
Definition at line 1858 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileBooleanOperator(), and asCCompiler::CompileOverloadedDualOperator().
Definition at line 1980 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
| int asCByteCode::InstrW_QW | ( | asEBCInstr | bc, | |
| asWORD | a, | |||
| asQWORD | b | |||
| ) |
Definition at line 1946 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_QW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Definition at line 1840 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileBooleanOperator(), asCCompiler::CompileComparisonOperator(), asCCompiler::CompileSwitchStatement(), asCCompiler::ConvertToTempVariable(), asCCompiler::ConvertToTempVariableNotIn(), asCCompiler::ImplicitConvPrimitiveToPrimitive(), and asCCompiler::PerformAssignment().
Definition at line 1822 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileBitwiseOperator(), asCCompiler::CompileBooleanOperator(), asCCompiler::CompileMathOperator(), and asCCompiler::CompileSwitchStatement().
| int asCByteCode::InstrWORD | ( | asEBCInstr | bc, | |
| asWORD | param | |||
| ) |
Definition at line 2079 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by Alloc(), Call(), asCCompiler::CallDefaultConstructor(), asCCompiler::CompileBooleanOperator(), asCCompiler::CompileComparisonOperator(), asCCompiler::CompileConstructCall(), asCCompiler::CompileDeclaration(), asCCompiler::CompileDoWhileStatement(), asCCompiler::CompileExpressionPostOp(), asCCompiler::CompileExpressionValue(), asCCompiler::CompileForStatement(), asCCompiler::CompileFunction(), asCCompiler::CompileGlobalVariable(), asCCompiler::CompileInitList(), asCCompiler::CompileWhileStatement(), asCCompiler::DoAssignment(), Line(), asCCompiler::MoveArgsToStack(), asCCompiler::PerformAssignment(), and asCCompiler::PrepareArgument().
| bool asCByteCode::IsCombination | ( | cByteInstruction * | curr, | |
| asEBCInstr | bc1, | |||
| asEBCInstr | bc2, | |||
| asEBCInstr | bc3 | |||
| ) | [protected] |
Definition at line 250 of file as_bytecode.cpp.
References cByteInstruction::next, and cByteInstruction::op.
| bool asCByteCode::IsCombination | ( | cByteInstruction * | curr, | |
| asEBCInstr | bc1, | |||
| asEBCInstr | bc2 | |||
| ) | [protected] |
Definition at line 242 of file as_bytecode.cpp.
References cByteInstruction::next, and cByteInstruction::op.
Referenced by Optimize().
| bool asCByteCode::IsInstrJmpOrLabel | ( | cByteInstruction * | curr | ) | [protected] |
Definition at line 841 of file as_bytecode.cpp.
References cByteInstruction::op.
Referenced by PostponeInitOfTemp().
| bool asCByteCode::IsTemporary | ( | short | offset | ) | [protected] |
Definition at line 566 of file as_bytecode.cpp.
References asCArray< T >::GetLength(), n, and temporaryVariables.
Referenced by PostponeInitOfTemp(), and RemoveUnusedValue().
| bool asCByteCode::IsTempRegUsed | ( | cByteInstruction * | curr | ) | [protected] |
Definition at line 931 of file as_bytecode.cpp.
References cByteInstruction::next, and cByteInstruction::op.
Referenced by Optimize(), and RemoveUnusedValue().
| bool asCByteCode::IsTempVarOverwrittenByInstr | ( | cByteInstruction * | curr, | |
| int | var | |||
| ) | [protected] |
Definition at line 857 of file as_bytecode.cpp.
References cByteInstruction::op, and cByteInstruction::wArg.
Referenced by IsTempVarRead(), and PostponeInitOfTemp().
| bool asCByteCode::IsTempVarRead | ( | cByteInstruction * | curr, | |
| int | offset | |||
| ) | [protected] |
Definition at line 876 of file as_bytecode.cpp.
References cByteInstruction::arg, ARG_DW, asASSERT, asCArray< T >::Exists(), FindLabel(), asCArray< T >::GetLength(), IsTempVarOverwrittenByInstr(), IsTempVarReadByInstr(), cByteInstruction::next, cByteInstruction::op, asCArray< T >::PopLast(), asCArray< T >::PushLast(), and UNUSED_VAR.
Referenced by RemoveUnusedValue().
| bool asCByteCode::IsTempVarReadByInstr | ( | cByteInstruction * | curr, | |
| int | var | |||
| ) | [protected] |
Definition at line 819 of file as_bytecode.cpp.
References cByteInstruction::op, and cByteInstruction::wArg.
Referenced by IsTempVarRead(), and PostponeInitOfTemp().
Definition at line 143 of file as_bytecode.cpp.
References first, cByteInstruction::next, cByteInstruction::op, and cByteInstruction::wArg.
Referenced by asCCompiler::DoAssignment(), and asCCompiler::MakeFunctionCall().
| void asCByteCode::JmpP | ( | int | var, | |
| asDWORD | max | |||
| ) |
Definition at line 1170 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileSwitchStatement().
| void asCByteCode::Label | ( | short | label | ) |
Definition at line 1186 of file as_bytecode.cpp.
References AddInstruction(), last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileBooleanOperator(), asCCompiler::CompileCondition(), asCCompiler::CompileDoWhileStatement(), asCCompiler::CompileForStatement(), asCCompiler::CompileFunction(), asCCompiler::CompileIfStatement(), asCCompiler::CompileSwitchStatement(), and asCCompiler::CompileWhileStatement().
Definition at line 1197 of file as_bytecode.cpp.
References AddInstruction(), cByteInstruction::arg, ARG_DW, asCScriptEngine::buildWithoutLineCues, engine, asCScriptEngine::ep, InstrWORD(), last, cByteInstruction::op, cByteInstruction::size, and cByteInstruction::stackInc.
Referenced by asCCompiler::LineInstr().
| int asCByteCode::Optimize | ( | ) |
Definition at line 575 of file as_bytecode.cpp.
References cByteInstruction::arg, ARG_DW, AS_PTR_SIZE, asASSERT, CanBeSwapped(), ChangeFirstDeleteNext(), DeleteFirstChangeNext(), DeleteInstruction(), engine, asCScriptEngine::ep, first, GoBack(), asCScriptEngine::includeJitInstructions, InsertBefore(), IsCombination(), IsTempRegUsed(), cByteInstruction::next, cByteInstruction::op, PostponeInitOfTemp(), RemoveInstruction(), RemoveUnusedValue(), cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by Finalize().
| void asCByteCode::Output | ( | asDWORD * | array | ) |
Definition at line 1310 of file as_bytecode.cpp.
References cByteInstruction::arg, asASSERT, first, cByteInstruction::GetSize(), cByteInstruction::next, cByteInstruction::op, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFactory(), asCCompiler::CompileFunction(), asCBuilder::CompileGlobalVariables(), and asCCompiler::CompileTemplateFactoryStub().
Definition at line 1743 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CallDefaultConstructor(), asCCompiler::CompileCondition(), asCCompiler::CompileDeclaration(), asCCompiler::CompileExpressionStatement(), asCCompiler::CompileFactory(), asCCompiler::CompileFunction(), asCCompiler::CompileGlobalVariable(), asCCompiler::CompileInitList(), asCCompiler::CompileReturnStatement(), asCCompiler::ConvertToVariableNotIn(), asCCompiler::ImplicitConvObjectToObject(), asCCompiler::PrepareArgument(), asCCompiler::PrepareTemporaryObject(), and asCCompiler::ProcessDeferredParams().
| bool asCByteCode::PostponeInitOfTemp | ( | cByteInstruction * | curr, | |
| cByteInstruction ** | next | |||
| ) | [protected] |
Definition at line 343 of file as_bytecode.cpp.
References GoBack(), InsertBefore(), IsInstrJmpOrLabel(), IsTemporary(), IsTempVarOverwrittenByInstr(), IsTempVarReadByInstr(), cByteInstruction::next, cByteInstruction::op, cByteInstruction::prev, RemoveInstruction(), RemoveUnusedValue(), and cByteInstruction::wArg.
Referenced by Optimize().
| void asCByteCode::PostProcess | ( | ) |
Definition at line 1384 of file as_bytecode.cpp.
References AddPath(), cByteInstruction::arg, ARG_DW, asASSERT, DeleteInstruction(), FindLabel(), first, asCArray< T >::GetLength(), largestStackUsed, cByteInstruction::marked, n, cByteInstruction::next, cByteInstruction::op, cByteInstruction::stackInc, cByteInstruction::stackSize, UNUSED_VAR, and cByteInstruction::wArg.
Referenced by Finalize().
Definition at line 1759 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileFactory(), and asCCompiler::CompileFunction().
| void asCByteCode::RemoveInstruction | ( | cByteInstruction * | instr | ) | [protected] |
Definition at line 302 of file as_bytecode.cpp.
References first, last, cByteInstruction::next, and cByteInstruction::prev.
Referenced by DeleteInstruction(), Optimize(), and PostponeInitOfTemp().
| int asCByteCode::RemoveLastInstr | ( | ) |
Definition at line 2136 of file as_bytecode.cpp.
References first, asCMemoryMgr::FreeByteInstruction(), last, asCScriptEngine::memoryMgr, cByteInstruction::prev, and cByteInstruction::Remove().
Referenced by asCCompiler::CompileConstructCall().
| bool asCByteCode::RemoveUnusedValue | ( | cByteInstruction * | curr, | |
| cByteInstruction ** | next | |||
| ) | [protected] |
Definition at line 388 of file as_bytecode.cpp.
References cByteInstruction::arg, DeleteInstruction(), GoBack(), IsTemporary(), IsTempRegUsed(), IsTempVarRead(), cByteInstruction::next, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by Optimize(), and PostponeInitOfTemp().
| int asCByteCode::ResolveJumpAddresses | ( | ) |
Definition at line 1267 of file as_bytecode.cpp.
References cByteInstruction::arg, ARG_DW, FindLabel(), first, cByteInstruction::GetSize(), cByteInstruction::next, and cByteInstruction::op.
Referenced by Finalize().
| void asCByteCode::Ret | ( | int | pop | ) |
Definition at line 1157 of file as_bytecode.cpp.
References AddInstruction(), asASSERT, last, cByteInstruction::op, cByteInstruction::size, cByteInstruction::stackInc, and cByteInstruction::wArg.
Referenced by asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFactory(), asCCompiler::CompileFunction(), asCBuilder::CompileGlobalVariables(), and asCCompiler::CompileTemplateFactoryStub().
asCScriptEngine* asCByteCode::engine [protected] |
Definition at line 154 of file as_bytecode.h.
Referenced by AddInstruction(), AddInstructionFirst(), ClearAll(), DeleteInstruction(), ExtractLineNumbers(), Finalize(), Line(), and Optimize().
cByteInstruction* asCByteCode::first [protected] |
Definition at line 149 of file as_bytecode.h.
Referenced by AddCode(), AddInstruction(), AddInstructionFirst(), asCByteCode(), ClearAll(), ExchangeVar(), ExtractLineNumbers(), GetSize(), GetVarsUsed(), InsertBefore(), InsertFirstInstrDWORD(), InsertFirstInstrQWORD(), IsVarUsed(), Optimize(), Output(), PostProcess(), RemoveInstruction(), RemoveLastInstr(), and ResolveJumpAddresses().
Definition at line 122 of file as_bytecode.h.
Referenced by asCByteCode(), ClearAll(), asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFactory(), asCCompiler::CompileFunction(), asCBuilder::CompileGlobalVariables(), asCCompiler::CompileTemplateFactoryStub(), and PostProcess().
cByteInstruction* asCByteCode::last [protected] |
Definition at line 150 of file as_bytecode.h.
Referenced by AddCode(), AddInstruction(), AddInstructionFirst(), Alloc(), asCByteCode(), Call(), ClearAll(), GetLastInstr(), GetLastInstrValueDW(), Instr(), InstrDOUBLE(), InstrDWORD(), InstrFLOAT(), InstrINT(), InstrPTR(), InstrQWORD(), InstrSHORT(), InstrSHORT_B(), InstrSHORT_DW(), InstrSHORT_QW(), InstrSHORT_W(), InstrW_DW(), InstrW_FLOAT(), InstrW_QW(), InstrW_W(), InstrW_W_W(), InstrWORD(), JmpP(), Label(), Line(), Pop(), Push(), RemoveInstruction(), RemoveLastInstr(), and Ret().
Definition at line 121 of file as_bytecode.h.
Referenced by ClearAll(), asCCompiler::CompileDefaultConstructor(), asCCompiler::CompileFactory(), asCCompiler::CompileFunction(), asCCompiler::CompileTemplateFactoryStub(), and ExtractLineNumbers().
asCArray<int> asCByteCode::temporaryVariables [protected] |
Definition at line 152 of file as_bytecode.h.
Referenced by ClearAll(), DefineTemporaryVariable(), and IsTemporary().
1.6.1