@@ -248,6 +248,15 @@ namespace Ark
248248 */
249249 [[nodiscard]] inline ARK_ALWAYS_INLINE Value* loadConstAsPtr (uint16_t id) const ;
250250
251+ /* *
252+ * @brief Find the nearest variable of a given id
253+ *
254+ * @param id the id to find
255+ * @param context
256+ * @return Value*
257+ */
258+ inline ARK_ALWAYS_INLINE Value* findNearestVariable (uint16_t id, internal::ExecutionContext& context) noexcept ;
259+
251260 /* *
252261 * @brief Create a new symbol with an associated value in the current scope
253262 *
@@ -268,9 +277,9 @@ namespace Ark
268277
269278 inline ARK_ALWAYS_INLINE void jump (uint16_t address, internal::ExecutionContext& context);
270279
271- Value getField (Value* closure, uint16_t id, const internal::ExecutionContext& context, bool push_with_env = false );
280+ [[nodiscard]] Value getField (Value* closure, uint16_t id, const internal::ExecutionContext& context, bool push_with_env = false );
272281
273- Value createList (std::size_t count, internal::ExecutionContext& context);
282+ [[nodiscard]] Value createList (std::size_t count, internal::ExecutionContext& context);
274283
275284 void listAppendInPlace (Value* list, std::size_t count, internal::ExecutionContext& context);
276285
@@ -286,6 +295,13 @@ namespace Ark
286295 */
287296 inline ARK_ALWAYS_INLINE Value* pop (internal::ExecutionContext& context);
288297
298+ /* *
299+ * @brief Return a pointer to the top of the stack without consuming it
300+ *
301+ * @param context
302+ * @param offset
303+ * @return Value*
304+ */
289305 inline ARK_ALWAYS_INLINE Value* peek (internal::ExecutionContext& context, std::size_t offset = 0 );
290306
291307 /* *
@@ -329,19 +345,6 @@ namespace Ark
329345 */
330346 inline ARK_ALWAYS_INLINE Value* popAndResolveAsPtr (internal::ExecutionContext& context);
331347
332- // ================================================
333- // locals related
334- // ================================================
335-
336- /* *
337- * @brief Find the nearest variable of a given id
338- *
339- * @param id the id to find
340- * @param context
341- * @return Value*
342- */
343- inline Value* findNearestVariable (uint16_t id, internal::ExecutionContext& context) noexcept ;
344-
345348 // ================================================
346349 // function calls
347350 // ================================================
0 commit comments