File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ namespace zenkit {
331331 [[nodiscard]] ZKAPI std::string const & pop_string ();
332332 [[nodiscard]] ZKAPI std::tuple<DaedalusSymbol*, std::uint8_t , std::shared_ptr<DaedalusInstance>>
333333 pop_reference ();
334+ [[nodiscard]] ZKAPI bool top_is_reference () const ;
334335
335336 // / \brief Registers a Daedalus external function.
336337 // /
Original file line number Diff line number Diff line change @@ -587,6 +587,14 @@ namespace zenkit {
587587 return {std::get<DaedalusSymbol*>(v.value ), v.index , v.context };
588588 }
589589
590+ bool DaedalusVm::top_is_reference () const {
591+ if (_m_stack_ptr == 0 ) {
592+ throw DaedalusVmException {" popping from empty stack" };
593+ }
594+
595+ return _m_stack[_m_stack_ptr - 1 ].reference ;
596+ }
597+
590598 std::shared_ptr<DaedalusInstance> DaedalusVm::pop_instance () {
591599 if (_m_stack_ptr == 0 ) {
592600 throw DaedalusVmException {" popping instance from empty stack" };
You can’t perform that action at this time.
0 commit comments