Skip to content

Drop unimplemented run context stubs #907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 1 addition & 52 deletions jerry-core/jerry.c
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,7 @@ jerry_run (void)

return vm_run_global ();
} /* jerry_run */

/**
* Simple jerry runner
*
Expand Down Expand Up @@ -1783,58 +1784,6 @@ jerry_run_simple (const jerry_api_char_t *script_source, /**< script source */
return ret_code;
} /* jerry_run_simple */

#ifdef CONFIG_JERRY_ENABLE_CONTEXTS
/**
* Allocate new run context
*
* @return run context
*/
jerry_ctx_t *
jerry_new_ctx (void)
{
jerry_assert_api_available ();

JERRY_UNIMPLEMENTED ("Run contexts are not implemented");
} /* jerry_new_ctx */

/**
* Cleanup resources associated with specified run context
*/
void
jerry_cleanup_ctx (jerry_ctx_t *ctx_p) /**< run context */
{
jerry_assert_api_available ();

JERRY_UNIMPLEMENTED_REF_UNUSED_VARS ("Run contexts are not implemented", ctx_p);
} /* jerry_cleanup_ctx */

/**
* Activate context and push it to contexts' stack
*/
void
jerry_push_ctx (jerry_ctx_t *ctx_p) /**< run context */
{
jerry_assert_api_available ();

JERRY_UNIMPLEMENTED_REF_UNUSED_VARS ("Run contexts are not implemented", ctx_p);
} /* jerry_push_ctx */

/**
* Pop from contexts' stack and activate new stack's top
*
* Note:
* default context (most placed on bottom of stack) cannot be popped
*/
void
jerry_pop_ctx (void)
{
jerry_assert_api_available ();

JERRY_UNIMPLEMENTED ("Run contexts are not implemented");
} /* jerry_pop_ctx */
#endif /* CONFIG_JERRY_ENABLE_CONTEXTS */


/**
* Register external magic string array
*/
Expand Down
21 changes: 0 additions & 21 deletions jerry-core/jerry.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,27 +97,6 @@ bool jerry_parse (const jerry_api_char_t *, size_t);
jerry_completion_code_t jerry_run (void);
jerry_completion_code_t jerry_run_simple (const jerry_api_char_t *, size_t, jerry_flag_t);

#ifdef CONFIG_JERRY_ENABLE_CONTEXTS
/** \addtogroup jerry Jerry run contexts-related interface
* @{
*/

/**
* Jerry run context descriptor
*/
typedef struct jerry_ctx_t jerry_ctx_t;

jerry_ctx_t *jerry_new_ctx (void);
void jerry_cleanup_ctx (jerry_ctx_t *);

void jerry_push_ctx (jerry_ctx_t *);
void jerry_pop_ctx (void);

/**
* @}
*/
#endif /* CONFIG_JERRY_ENABLE_CONTEXTS */

/**
* @}
*/
Expand Down