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

Unified Diff: runtime/vm/isolate.h

Issue 2683633005: Add exception handler cache to isolate (Closed)
Patch Set: Address review commments Created 3 years, 10 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
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 4180ccee69cd841cc4e768be90334f7ae629d26f..88d5211c0445d89eb2b89be8d77a5b86759333ca 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -10,6 +10,8 @@
#include "vm/atomic.h"
#include "vm/base_isolate.h"
#include "vm/class_table.h"
+#include "vm/exceptions.h"
+#include "vm/fixed_cache.h"
#include "vm/handles.h"
#include "vm/megamorphic_cache_table.h"
#include "vm/metrics.h"
@@ -124,6 +126,10 @@ class NoReloadScope : public StackResource {
};
+// Fixed cache for exception handler lookup.
+typedef FixedCache<intptr_t, HandlerInfo, 16> HandlerInfoCache;
+
+
class Isolate : public BaseIsolate {
public:
// Keep both these enums in sync with isolate_patch.dart.
@@ -642,6 +648,8 @@ class Isolate : public BaseIsolate {
return reload_every_n_stack_overflow_checks_;
}
+ HandlerInfoCache* handler_info_cache() { return &handler_info_cache_; }
+
void MaybeIncreaseReloadEveryNStackOverflowChecks();
private:
@@ -836,6 +844,9 @@ class Isolate : public BaseIsolate {
// Should we pause in the debug message loop after this request?
bool should_pause_post_service_request_;
+ HandlerInfoCache handler_info_cache_;
+
Florian Schneider 2017/02/09 19:25:55 Remove extra \n
Dmitry Olshansky 2017/02/10 16:32:14 Done.
+
static Dart_IsolateCreateCallback create_callback_;
static Dart_IsolateShutdownCallback shutdown_callback_;

Powered by Google App Engine
This is Rietveld 408576698