MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / onVariable

Method onVariable

src/runtime/context.cpp:684–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682 ssw << "--> local variables\n";
683 }
684 virtual void onVariable ( FuncInfo *, LocalVariableInfo * lv, void * addr, bool inScope ) override {
685 ssw << "\t" << lv->name
686 << ": " << debug_type(lv);
687 string location;
688 if ( !inScope ) {
689 } else if ( lv->cmres ) {
690 location = "CMRES";
691 } else if ( lv->isRefValue( ) ) {
692 location = "ref *(sp + " + to_string(lv->stackTop) + ")";
693 } else {
694 location = "sp + " + to_string(lv->stackTop);
695 }
696 if ( addr ) {
697 ssw << " = \t" << debug_value(addr, lv, PrintFlags::stackwalker)
698 << " at " << location
699 << " 0x" << HEX << intptr_t(addr) << DEC
700 << "\n";
701 } else {
702 if ( !inScope ) {
703 ssw << "\t// variable out of scope\n";
704 } else {
705 ssw << "\t// variable was optimized out\n";
706 }
707 }
708 }
709 virtual bool onAfterCall ( Prologue * ) override {
710 return !stackTopOnly;
711 }

Callers 1

dapiReportContextStateFunction · 0.45

Calls 3

debug_typeFunction · 0.85
to_stringFunction · 0.85
debug_valueFunction · 0.85

Tested by

no test coverage detected