Skip to content

Commit f088e8c

Browse files
committed
Drop unimplemented run context stubs
Run context stubs have been lingering in the code base for almost a year but they have never been more than unimplemented ideas. Moreover, they are guarded by a macro that's nowhere defined, thus the code is never compiled or tested. Should contexts be implemented in the future, they may or may not be implemented the way they are sketched now. Thus, it's safe to remove this dead code from the sources. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
1 parent a0bedaa commit f088e8c

File tree

2 files changed

+1
-73
lines changed

2 files changed

+1
-73
lines changed

jerry-core/jerry.c

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,6 +1751,7 @@ jerry_run (void)
17511751

17521752
return vm_run_global ();
17531753
} /* jerry_run */
1754+
17541755
/**
17551756
* Simple jerry runner
17561757
*
@@ -1783,58 +1784,6 @@ jerry_run_simple (const jerry_api_char_t *script_source, /**< script source */
17831784
return ret_code;
17841785
} /* jerry_run_simple */
17851786

1786-
#ifdef CONFIG_JERRY_ENABLE_CONTEXTS
1787-
/**
1788-
* Allocate new run context
1789-
*
1790-
* @return run context
1791-
*/
1792-
jerry_ctx_t *
1793-
jerry_new_ctx (void)
1794-
{
1795-
jerry_assert_api_available ();
1796-
1797-
JERRY_UNIMPLEMENTED ("Run contexts are not implemented");
1798-
} /* jerry_new_ctx */
1799-
1800-
/**
1801-
* Cleanup resources associated with specified run context
1802-
*/
1803-
void
1804-
jerry_cleanup_ctx (jerry_ctx_t *ctx_p) /**< run context */
1805-
{
1806-
jerry_assert_api_available ();
1807-
1808-
JERRY_UNIMPLEMENTED_REF_UNUSED_VARS ("Run contexts are not implemented", ctx_p);
1809-
} /* jerry_cleanup_ctx */
1810-
1811-
/**
1812-
* Activate context and push it to contexts' stack
1813-
*/
1814-
void
1815-
jerry_push_ctx (jerry_ctx_t *ctx_p) /**< run context */
1816-
{
1817-
jerry_assert_api_available ();
1818-
1819-
JERRY_UNIMPLEMENTED_REF_UNUSED_VARS ("Run contexts are not implemented", ctx_p);
1820-
} /* jerry_push_ctx */
1821-
1822-
/**
1823-
* Pop from contexts' stack and activate new stack's top
1824-
*
1825-
* Note:
1826-
* default context (most placed on bottom of stack) cannot be popped
1827-
*/
1828-
void
1829-
jerry_pop_ctx (void)
1830-
{
1831-
jerry_assert_api_available ();
1832-
1833-
JERRY_UNIMPLEMENTED ("Run contexts are not implemented");
1834-
} /* jerry_pop_ctx */
1835-
#endif /* CONFIG_JERRY_ENABLE_CONTEXTS */
1836-
1837-
18381787
/**
18391788
* Register external magic string array
18401789
*/

jerry-core/jerry.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -97,27 +97,6 @@ bool jerry_parse (const jerry_api_char_t *, size_t);
9797
jerry_completion_code_t jerry_run (void);
9898
jerry_completion_code_t jerry_run_simple (const jerry_api_char_t *, size_t, jerry_flag_t);
9999

100-
#ifdef CONFIG_JERRY_ENABLE_CONTEXTS
101-
/** \addtogroup jerry Jerry run contexts-related interface
102-
* @{
103-
*/
104-
105-
/**
106-
* Jerry run context descriptor
107-
*/
108-
typedef struct jerry_ctx_t jerry_ctx_t;
109-
110-
jerry_ctx_t *jerry_new_ctx (void);
111-
void jerry_cleanup_ctx (jerry_ctx_t *);
112-
113-
void jerry_push_ctx (jerry_ctx_t *);
114-
void jerry_pop_ctx (void);
115-
116-
/**
117-
* @}
118-
*/
119-
#endif /* CONFIG_JERRY_ENABLE_CONTEXTS */
120-
121100
/**
122101
* @}
123102
*/

0 commit comments

Comments
 (0)