Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: src/isolate.h

Issue 1010883002: Switch full-codegen from StackHandlers to handler table. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-isolate-dead-code
Patch Set: Fix debugger-pause-on-promise-rejection. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index fcb629eb3febf3eee8f5e997b3e09837895fb602..80c3daea746f6c6704c88ef58386cd469b4dacc8 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -687,7 +687,7 @@ class Isolate {
bool OptionalRescheduleException(bool is_bottom_call);
// Push and pop a promise and the current try-catch handler.
- void PushPromise(Handle<JSObject> promise);
+ void PushPromise(Handle<JSObject> promise, Handle<JSFunction> function);
void PopPromise();
Handle<Object> GetPromiseOnStackOnThrow();
@@ -764,11 +764,12 @@ class Isolate {
// clears and returns the current pending exception.
Object* FindHandler();
- // Tries to predict whether the exception will be caught. Note that this can
+ // Tries to predict whether an exception will be caught. Note that this can
// only produce an estimate, because it is undecidable whether a finally
// clause will consume or re-throw an exception. We conservatively assume any
// finally clause will behave as if the exception were consumed.
- bool PredictWhetherExceptionIsCaught(Object* exception);
+ enum CatchType { NOT_CAUGHT, CAUGHT_BY_JAVASCRIPT, CAUGHT_BY_EXTERNAL };
+ CatchType PredictExceptionCatcher();
void ScheduleThrow(Object* exception);
// Re-set pending message, script and positions reported to the TryCatch
@@ -1370,15 +1371,15 @@ class Isolate {
class PromiseOnStack {
public:
- PromiseOnStack(StackHandler* handler, Handle<JSObject> promise,
+ PromiseOnStack(Handle<JSFunction> function, Handle<JSObject> promise,
PromiseOnStack* prev)
- : handler_(handler), promise_(promise), prev_(prev) {}
- StackHandler* handler() { return handler_; }
+ : function_(function), promise_(promise), prev_(prev) {}
+ Handle<JSFunction> function() { return function_; }
Handle<JSObject> promise() { return promise_; }
PromiseOnStack* prev() { return prev_; }
private:
- StackHandler* handler_;
+ Handle<JSFunction> function_;
Handle<JSObject> promise_;
PromiseOnStack* prev_;
};
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698