Compiler - Input default value instruction
This commit is contained in:
parent
673b73c42d
commit
e877f3f391
3 changed files with 21 additions and 0 deletions
|
@ -67,6 +67,7 @@ enum E_OpType
|
|||
//
|
||||
OP_UI_PENTER ,
|
||||
OP_UI_PEXIT ,
|
||||
OP_UI_INPUT_DFT ,
|
||||
};
|
||||
|
||||
M_LSHIFT_OP( T_StringBuilder , E_OpType );
|
||||
|
|
19
opcomp.cc
19
opcomp.cc
|
@ -615,6 +615,25 @@ bool T_CompilerImpl_::compileNode(
|
|||
}
|
||||
break;
|
||||
|
||||
case A_Node::OP_INPUT:
|
||||
if ( exit ) {
|
||||
auto& in( (T_InputInstrNode&) node );
|
||||
T_OpValue value;
|
||||
value.f = in.defValue( );
|
||||
|
||||
addInstruction( OP_FP_LOAD ,
|
||||
constants.indexOf( value.u ) + 3 ,
|
||||
in.defValueLocation( ) );
|
||||
addInstruction( OP_PUSH , in.defValueLocation( ) );
|
||||
addInstruction( OP_FP_SSTORE_INT , 0 , in.defValueLocation( ) );
|
||||
|
||||
addInstruction( OP_CONST , output->inputs.indexOf( in.id( ) ) , in.idLocation( ) );
|
||||
addInstruction( OP_PUSH , in.defValueLocation( ) );
|
||||
|
||||
addInstruction( OP_UI_INPUT_DFT , node.location( ) );
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
//- EXPRESSIONS - ARGUMENTS -----------------------------------------------------------
|
||||
|
||||
|
|
1
ops.cc
1
ops.cc
|
@ -139,6 +139,7 @@ static T_KeyValueTable< E_OpType , T_OpInfo > OpInfoTable_{ ([]() {
|
|||
//
|
||||
infos.add( E_OpType::OP_UI_PENTER , T_OpInfo{ "ui-prof-enter" , 1 } );
|
||||
infos.add( E_OpType::OP_UI_PEXIT , T_OpInfo{ "ui-prof-exit" } );
|
||||
infos.add( E_OpType::OP_UI_INPUT_DFT , T_OpInfo{ "ui-input-default" , 0 , OpStackMain{ -2 } } );
|
||||
|
||||
return infos;
|
||||
})( ) };
|
||||
|
|
Loading…
Reference in a new issue