Qore Programming Language 2.3.0
Loading...
Searching...
No Matches
RuntimeConfigStackHelper Class Reference

RAII helper to push/pop stack location in RuntimeConfig and sync to TLS. More...

#include <RuntimeConfig.h>

Public Member Methods

DLLLOCAL RuntimeConfigStackHelper (RuntimeConfig &rc, QoreStackLocation *stack_loc)
 Push a new stack location.
 
DLLLOCAL ~RuntimeConfigStackHelper ()
 Pop the stack location and restore previous.
 

Detailed Description

RAII helper to push/pop stack location in RuntimeConfig and sync to TLS.

This helper maintains the call stack in both RuntimeConfig (for fast access) and TLS (for cross-thread stack access via get_all_thread_call_stacks()).

Benefits:

  • Exception reporting can use rc.getStackLocation() directly (avoids TLS read)
  • Future JIT can keep stack_loc in register
  • Cross-thread stack access still works via TLS sync

Constructor & Destructor Documentation

◆ RuntimeConfigStackHelper()

DLLLOCAL RuntimeConfigStackHelper::RuntimeConfigStackHelper ( RuntimeConfig rc,
QoreStackLocation stack_loc 
)

Push a new stack location.

Parameters
rcRuntimeConfig to update
stack_locThe stack location to push (must outlive this helper)

The documentation for this class was generated from the following file: