Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
c42f committed Aug 25, 2018
1 parent 1f0c5cb commit af0afe3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3709,14 +3709,14 @@ f(x) = yt(x)
(m (or m (let ((l (make-label)))
(put! label-map (cadr e) l)
l))))
(emit `(null)) ;; save space for `leave` and `pop_exc` that might be needed
(emit `(null)) ;; save space for `leave` that might be needed
(emit `(goto ,m))
(set! handler-goto-fixups
(cons (list code handler-level catch-token-stack (cadr e)) handler-goto-fixups))
#f))

;; exception handlers are lowered using
;; (= tok (enter L)) - push handler with catch block at label L
;; (= tok (enter L)) - push handler with catch block at label L, yielding token
;; (leave n) - pop N exception handlers
;; (pop_exc tok) - pop exception stack back to state of associated enter
((trycatch tryfinally)
Expand Down
3 changes: 1 addition & 2 deletions src/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ static void NOINLINE JL_NORETURN JL_USED_FUNC start_task(void)
res = jl_apply(&t->start, 1);
}
JL_CATCH {
// FIXME: Persist exception stack into `exception`?
// Refactor with jl_push_exc_stack above?
// TODO: Persist exception stack as above?
res = jl_current_exception();
t->exception = res;
jl_gc_wb(t, res);
Expand Down
2 changes: 1 addition & 1 deletion src/threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static void ti_initthread(int16_t tid)
}
memset(bt_data, 0, sizeof(uintptr_t) * (JL_MAX_BT_SIZE + 1));
ptls->bt_data = (uintptr_t*)bt_data;
ptls->exc_stack = 0;
ptls->exc_stack = NULL;
jl_reserve_exc_stack(&ptls->exc_stack, JL_MAX_BT_SIZE + 2);
ptls->sig_exception = NULL;
#ifdef _OS_WINDOWS_
Expand Down

0 comments on commit af0afe3

Please sign in to comment.