Skip to content
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

call to rethrow should be qualified in exception stack lowering #29853

Merged
merged 1 commit into from
Oct 30, 2018
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
2 changes: 1 addition & 1 deletion src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ typedef struct {

// Exception stack data
typedef struct {
jl_excstack_t *s; // Stack of exceptions
jl_excstack_t *s; // Stack of exceptions
size_t itr; // Iterator into exception stack
size_t i; // Iterator into backtrace data for exception
} gc_mark_excstack_t;
Expand Down
3 changes: 1 addition & 2 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3744,7 +3744,6 @@ f(x) = yt(x)
(endl (make-label))
(last-finally-handler finally-handler)
(finally (if (eq? (car e) 'tryfinally) (new-mutable-var) #f))
(finally-exception (if (eq? (car e) 'tryfinally) (new-mutable-var) #f))
(my-finally-handler #f))
;; handler block entry
(emit `(= ,handler-token (enter ,catch)))
Expand All @@ -3767,7 +3766,7 @@ f(x) = yt(x)
(mark-label catch)
(emit `(leave 1))
(if finally
(begin (leave-finally-block '(call rethrow) #f)
(begin (leave-finally-block '(call (top rethrow)) #f)
(if endl (mark-label endl))
(set! finally-handler last-finally-handler)
(compile (caddr e) break-labels #f #f)
Expand Down
10 changes: 5 additions & 5 deletions src/julia_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,14 +670,14 @@ typedef struct _jl_excstack_t {
// uintptr_t data[]; // Access with jl_excstack_raw
} jl_excstack_t;

STATIC_INLINE uintptr_t *jl_excstack_raw(jl_excstack_t* stack) JL_NOTSAFEPOINT
STATIC_INLINE uintptr_t *jl_excstack_raw(jl_excstack_t *stack) JL_NOTSAFEPOINT
{
return (uintptr_t*)(stack + 1);
}

// Exception stack access
STATIC_INLINE jl_value_t *jl_excstack_exception(jl_excstack_t *stack JL_PROPAGATES_ROOT,
size_t itr) JL_NOTSAFEPOINT
size_t itr) JL_NOTSAFEPOINT
{
return (jl_value_t*)(jl_excstack_raw(stack)[itr-1]);
}
Expand All @@ -696,10 +696,10 @@ STATIC_INLINE size_t jl_excstack_next(jl_excstack_t *stack, size_t itr) JL_NOTSA
}
// Exception stack manipulation
void jl_reserve_excstack(jl_excstack_t **stack JL_REQUIRE_ROOTED_SLOT,
size_t reserved_size);
size_t reserved_size);
void jl_push_excstack(jl_excstack_t **stack JL_REQUIRE_ROOTED_SLOT JL_ROOTING_ARGUMENT,
jl_value_t *exception JL_ROOTED_ARGUMENT,
uintptr_t *bt_data, size_t bt_size);
jl_value_t *exception JL_ROOTED_ARGUMENT,
uintptr_t *bt_data, size_t bt_size);
void jl_copy_excstack(jl_excstack_t *dest, jl_excstack_t *src) JL_NOTSAFEPOINT;

// timers
Expand Down