Reviewers: Igor Sheludko,

Description:
Clean up some isolate macros.

[email protected]

Please review this at https://codereview.chromium.org/196983011/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+21, -41 lines):
  M src/isolate.h
  M src/isolate.cc


Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index bb97c931d5f13ff34be97554473f01275850f730..c48e2d350e5247ccac84b16d5451a0b54c23ec02 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1550,7 +1550,6 @@ Isolate::Isolate()
       global_handles_(NULL),
       eternal_handles_(NULL),
       thread_manager_(NULL),
-      fp_stubs_generated_(false),
       has_installed_extensions_(false),
       string_tracker_(NULL),
       regexp_stack_(NULL),
@@ -1570,7 +1569,6 @@ Isolate::Isolate()
       optimizing_compiler_thread_(NULL),
       sweeper_thread_(NULL),
       num_sweeper_threads_(0),
-      max_available_threads_(0),
       stress_deopt_count_(0),
       next_optimization_id_(0) {
   id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1);
@@ -1587,19 +1585,9 @@ Isolate::Isolate()
   thread_manager_ = new ThreadManager();
   thread_manager_->isolate_ = this;

-#if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
-    V8_TARGET_ARCH_A64 && !defined(__aarch64__) || \
-    V8_TARGET_ARCH_MIPS && !defined(__mips__)
-  simulator_initialized_ = false;
-  simulator_i_cache_ = NULL;
-  simulator_redirection_ = NULL;
-#endif
-
 #ifdef DEBUG
   // heap_histograms_ initializes itself.
   memset(&js_spill_information_, 0, sizeof(js_spill_information_));
-  memset(code_kind_statistics_, 0,
-         sizeof(code_kind_statistics_[0]) * Code::NUMBER_OF_KINDS);
 #endif

 #ifdef ENABLE_DEBUGGER_SUPPORT
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 5df84a2e51d1011ec110aba8bba901d048ffccb8..326670af23c397d5d5de2c9dcf9fb0b35319d4d5 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -309,11 +309,28 @@ class ThreadLocalTop BASE_EMBEDDED {

 #endif

+
+#if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
+    V8_TARGET_ARCH_A64 && !defined(__aarch64__) || \
+    V8_TARGET_ARCH_MIPS && !defined(__mips__)
+
+#define ISOLATE_INIT_SIMULATOR_LIST(V) \ + V(bool, simulator_initialized, false) \ + V(HashMap*, simulator_i_cache, NULL) \
+  V(Redirection*, simulator_redirection, NULL)
+#else
+
+#define ISOLATE_INIT_SIMULATOR_LIST(V)
+
+#endif
+
+
 #ifdef DEBUG

#define ISOLATE_INIT_DEBUG_ARRAY_LIST(V) \ V(CommentStatistic, paged_space_comments_statistics, \
-      CommentStatistic::kMaxComments + 1)
+ CommentStatistic::kMaxComments + 1) \
+  V(int, code_kind_statistics, Code::NUMBER_OF_KINDS)
 #else

 #define ISOLATE_INIT_DEBUG_ARRAY_LIST(V)
@@ -365,6 +382,9 @@ typedef List<HeapObject*> DebugObjectCache;
V(HStatistics*, hstatistics, NULL) \ V(HTracer*, htracer, NULL) \ V(CodeTracer*, code_tracer, NULL) \ + V(bool, fp_stubs_generated, false) \ + V(int, max_available_threads, 0) \ + ISOLATE_INIT_SIMULATOR_LIST(V) \
   ISOLATE_DEBUGGER_INIT_LIST(V)

 #define THREAD_LOCAL_TOP_ACCESSOR(type, name)                        \
@@ -937,8 +957,6 @@ class Isolate {

   RuntimeState* runtime_state() { return &runtime_state_; }

-  FIELD_ACCESSOR(bool, fp_stubs_generated);
-
   Builtins* builtins() { return &builtins_; }

   void NotifyExtensionInstalled() {
@@ -984,16 +1002,6 @@ class Isolate {
   JSObject::SpillInformation* js_spill_information() {
     return &js_spill_information_;
   }
-
-  int* code_kind_statistics() { return code_kind_statistics_; }
-#endif
-
-#if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
-    V8_TARGET_ARCH_A64 && !defined(__aarch64__) || \
-    V8_TARGET_ARCH_MIPS && !defined(__mips__)
-  FIELD_ACCESSOR(bool, simulator_initialized)
-  FIELD_ACCESSOR(HashMap*, simulator_i_cache)
-  FIELD_ACCESSOR(Redirection*, simulator_redirection)
 #endif

   Factory* factory() { return reinterpret_cast<Factory*>(this); }
@@ -1063,8 +1071,6 @@ class Isolate {
   bool IsDeferredHandle(Object** location);
 #endif  // DEBUG

-  FIELD_ACCESSOR(int, max_available_threads);
-
   bool concurrent_recompilation_enabled() {
     // Thread is only available with flag enabled.
     ASSERT(optimizing_compiler_thread_ == NULL ||
@@ -1268,7 +1274,6 @@ class Isolate {
   EternalHandles* eternal_handles_;
   ThreadManager* thread_manager_;
   RuntimeState runtime_state_;
-  bool fp_stubs_generated_;
   Builtins builtins_;
   bool has_installed_extensions_;
   StringTracker* string_tracker_;
@@ -1298,19 +1303,10 @@ class Isolate {
   // Time stamp at initialization.
   double time_millis_at_init_;

-#if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
-    V8_TARGET_ARCH_A64 && !defined(__aarch64__) || \
-    V8_TARGET_ARCH_MIPS && !defined(__mips__)
-  bool simulator_initialized_;
-  HashMap* simulator_i_cache_;
-  Redirection* simulator_redirection_;
-#endif
-
 #ifdef DEBUG
   // A static array of histogram info for each type.
   HistogramInfo heap_histograms_[LAST_TYPE + 1];
   JSObject::SpillInformation js_spill_information_;
-  int code_kind_statistics_[Code::NUMBER_OF_KINDS];
 #endif

 #ifdef ENABLE_DEBUGGER_SUPPORT
@@ -1347,10 +1343,6 @@ class Isolate {
   SweeperThread** sweeper_thread_;
   int num_sweeper_threads_;

-  // TODO(yangguo): This will become obsolete once ResourceConstraints
-  // becomes an argument to Isolate constructor.
-  int max_available_threads_;
-
   // Counts deopt points if deopt_every_n_times is enabled.
   unsigned int stress_deopt_count_;



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to