This commit is contained in:
Dmitry Vasilev
2023-05-18 23:15:10 +03:00
parent db3166154d
commit 932baf3eed
6 changed files with 35 additions and 65 deletions

View File

@@ -610,6 +610,7 @@ export const find_call = (state, index) => {
if(call != null) {
if(call.has_more_children) {
active_calltree_node = eval_expand_calltree_node(
// TODO copy eval_cxt?
state.eval_cxt,
state.parse_result,
call
@@ -625,6 +626,7 @@ export const find_call = (state, index) => {
}
} else {
const find_result = eval_find_call(
// TODO copy eval_cxt?
state.eval_cxt,
state.parse_result,
state.calltree,

View File

@@ -216,13 +216,6 @@ const io_patch = (path, use_context = false) => {
}
export const apply_io_patches = () => {
// TODO remove, only for dev
// TODO test open_run_window
if(cxt.window.__io_patched) {
throw new Error('illegal state')
}
cxt.window.__io_patched = true
io_patch(['Math', 'random'])
io_patch(['setTimeout'])

View File

@@ -202,7 +202,7 @@ export const do_eval_expand_calltree_node = (cxt, node) => {
synchronous for simplicity
*/
export const do_eval_find_call = (cxt, calltree, location) => {
// TODO remove
// Sanity check
if(cxt.children != null) {
throw new Error('illegal state')
}