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

Unified Diff: src/isolate.h

Issue 1785403002: [runtime] split up loops with HandleScopes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing comment Created 4 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/builtins.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 c51caf3212529b3a593b456dca8a88b436662f9f..28d07d1197bf3e4caa2d65ef2e8bda4c684393d7 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -178,6 +178,20 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
C(ExternalCaughtException, external_caught_exception) \
C(JSEntrySP, js_entry_sp)
+#define FOR_WITH_HANDLE_SCOPE(isolate, loop_var_type, init, loop_var, \
+ limit_check, increment, body) \
+ do { \
+ loop_var_type init; \
+ loop_var_type for_with_handle_limit = loop_var; \
+ Isolate* for_with_handle_isolate = isolate; \
+ while (limit_check) { \
+ for_with_handle_limit += 1024; \
+ HandleScope loop_scope(for_with_handle_isolate); \
+ for (; limit_check && loop_var < for_with_handle_limit; increment) { \
+ body \
+ } \
+ } \
+ } while (false)
// Platform-independent, reliable thread identifier.
class ThreadId {
« no previous file with comments | « src/builtins.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698