MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / exit_function

Method exit_function

modules/gdscript/gdscript.h:528–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526 }
527
528 _FORCE_INLINE_ void exit_function() {
529 if (!track_call_stack) {
530 return;
531 }
532
533#ifdef DEBUG_ENABLED
534 ScriptDebugger *script_debugger = EngineDebugger::get_script_debugger();
535 if (script_debugger && script_debugger->get_lines_left() > 0 && script_debugger->get_depth() >= 0) {
536 script_debugger->set_depth(script_debugger->get_depth() - 1);
537 }
538#endif
539
540 if (unlikely(_call_stack_size == 0)) {
541#ifdef DEBUG_ENABLED
542 if (script_debugger) {
543 _debug_error = "Stack Underflow (Engine Bug)";
544 script_debugger->debug(this);
545 } else {
546 ERR_PRINT("Stack underflow! (Engine Bug)");
547 }
548#else // !DEBUG_ENABLED
549 ERR_PRINT("Stack underflow! (Engine Bug)");
550#endif
551 return;
552 }
553
554 _call_stack_size--;
555 _call_stack = _call_stack->prev;
556 }
557
558 virtual Vector<StackInfo> debug_get_current_stack_info() override {
559 Vector<StackInfo> csi;

Callers 1

gdscript_vm.cppFile · 0.80

Calls 4

get_lines_leftMethod · 0.45
get_depthMethod · 0.45
set_depthMethod · 0.45
debugMethod · 0.45

Tested by

no test coverage detected