Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index d3fe58a7cad02e99b5209f14eb8cb83401e790ef..7d43c5705057f6932c9e6088818bbf3cb6c60705 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -73,7 +73,7 @@ class UserTag; |
class PendingLazyDeopt { |
public: |
- PendingLazyDeopt(uword fp, uword pc) : fp_(fp), pc_(pc) { } |
+ PendingLazyDeopt(uword fp, uword pc) : fp_(fp), pc_(pc) {} |
uword fp() { return fp_; } |
uword pc() { return pc_; } |
void set_pc(uword pc) { pc_ = pc; } |
@@ -101,6 +101,7 @@ class NoOOBMessageScope : public StackResource { |
public: |
explicit NoOOBMessageScope(Thread* thread); |
~NoOOBMessageScope(); |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(NoOOBMessageScope); |
}; |
@@ -206,8 +207,7 @@ class Isolate : public BaseIsolate { |
} |
Dart_Port origin_id() const { return origin_id_; } |
void set_origin_id(Dart_Port id) { |
- ASSERT((id == main_port_ && origin_id_ == 0) || |
- (origin_id_ == main_port_)); |
+ ASSERT((id == main_port_ && origin_id_ == 0) || (origin_id_ == main_port_)); |
origin_id_ = id; |
} |
void set_pause_capability(uint64_t value) { pause_capability_ = value; } |
@@ -231,12 +231,8 @@ class Isolate : public BaseIsolate { |
ApiState* api_state() const { return api_state_; } |
void set_api_state(ApiState* value) { api_state_ = value; } |
- void set_init_callback_data(void* value) { |
- init_callback_data_ = value; |
- } |
- void* init_callback_data() const { |
- return init_callback_data_; |
- } |
+ void set_init_callback_data(void* value) { init_callback_data_ = value; } |
+ void* init_callback_data() const { return init_callback_data_; } |
Dart_EnvironmentCallback environment_callback() const { |
return environment_callback_; |
@@ -254,8 +250,7 @@ class Isolate : public BaseIsolate { |
void SetupInstructionsSnapshotPage( |
const uint8_t* instructions_snapshot_buffer); |
- void SetupDataSnapshotPage( |
- const uint8_t* instructions_snapshot_buffer); |
+ void SetupDataSnapshotPage(const uint8_t* instructions_snapshot_buffer); |
void ScheduleMessageInterrupts(); |
@@ -294,9 +289,7 @@ class Isolate : public BaseIsolate { |
Mutex* constant_canonicalization_mutex() const { |
return constant_canonicalization_mutex_; |
} |
- Mutex* megamorphic_lookup_mutex() const { |
- return megamorphic_lookup_mutex_; |
- } |
+ Mutex* megamorphic_lookup_mutex() const { return megamorphic_lookup_mutex_; } |
Debugger* debugger() const { |
if (!FLAG_support_debugger) { |
@@ -325,9 +318,7 @@ class Isolate : public BaseIsolate { |
last_resume_timestamp_ = OS::GetCurrentTimeMillis(); |
} |
- int64_t last_resume_timestamp() const { |
- return last_resume_timestamp_; |
- } |
+ int64_t last_resume_timestamp() const { return last_resume_timestamp_; } |
// Returns whether the vm service has requested that the debugger |
// resume execution. |
@@ -399,12 +390,8 @@ class Isolate : public BaseIsolate { |
return shutdown_callback_; |
} |
- void set_object_id_ring(ObjectIdRing* ring) { |
- object_id_ring_ = ring; |
- } |
- ObjectIdRing* object_id_ring() { |
- return object_id_ring_; |
- } |
+ void set_object_id_ring(ObjectIdRing* ring) { object_id_ring_ = ring; } |
+ ObjectIdRing* object_id_ring() { return object_id_ring_; } |
void AddPendingDeopt(uword fp, uword pc); |
uword FindPendingDeopt(uword fp) const; |
@@ -431,14 +418,13 @@ class Isolate : public BaseIsolate { |
void enable_background_compiler() { |
background_compiler_disabled_depth_--; |
if (background_compiler_disabled_depth_ < 0) { |
- FATAL("Mismatched number of calls to disable_background_compiler and " |
- "enable_background_compiler."); |
+ FATAL( |
+ "Mismatched number of calls to disable_background_compiler and " |
+ "enable_background_compiler."); |
} |
} |
- void disable_background_compiler() { |
- background_compiler_disabled_depth_++; |
- } |
+ void disable_background_compiler() { background_compiler_disabled_depth_++; } |
bool is_background_compiler_disabled() const { |
return background_compiler_disabled_depth_ > 0; |
@@ -485,32 +471,22 @@ class Isolate : public BaseIsolate { |
return mutator_thread()->compiler_stats(); |
} |
- VMTagCounters* vm_tag_counters() { |
- return &vm_tag_counters_; |
- } |
+ VMTagCounters* vm_tag_counters() { return &vm_tag_counters_; } |
- bool IsReloading() const { |
- return reload_context_ != NULL; |
- } |
+ bool IsReloading() const { return reload_context_ != NULL; } |
- IsolateReloadContext* reload_context() { |
- return reload_context_; |
- } |
+ IsolateReloadContext* reload_context() { return reload_context_; } |
void DeleteReloadContext(); |
- bool HasAttemptedReload() const { |
- return has_attempted_reload_; |
- } |
+ bool HasAttemptedReload() const { return has_attempted_reload_; } |
bool CanReload() const; |
void set_last_reload_timestamp(int64_t value) { |
last_reload_timestamp_ = value; |
} |
- int64_t last_reload_timestamp() const { |
- return last_reload_timestamp_; |
- } |
+ int64_t last_reload_timestamp() const { return last_reload_timestamp_; } |
bool IsPaused() const; |
@@ -524,12 +500,8 @@ class Isolate : public BaseIsolate { |
void PausePostRequest(); |
- uword user_tag() const { |
- return user_tag_; |
- } |
- static intptr_t user_tag_offset() { |
- return OFFSET_OF(Isolate, user_tag_); |
- } |
+ uword user_tag() const { return user_tag_; } |
+ static intptr_t user_tag_offset() { return OFFSET_OF(Isolate, user_tag_); } |
static intptr_t current_tag_offset() { |
return OFFSET_OF(Isolate, current_tag_); |
} |
@@ -555,13 +527,9 @@ class Isolate : public BaseIsolate { |
void set_ic_miss_code(const Code& code); |
- Metric* metrics_list_head() { |
- return metrics_list_head_; |
- } |
+ Metric* metrics_list_head() { return metrics_list_head_; } |
- void set_metrics_list_head(Metric* metric) { |
- metrics_list_head_ = metric; |
- } |
+ void set_metrics_list_head(Metric* metric) { metrics_list_head_ = metric; } |
RawGrowableObjectArray* deoptimized_code_array() const { |
return deoptimized_code_array_; |
@@ -576,15 +544,11 @@ class Isolate : public BaseIsolate { |
void clear_sticky_error(); |
bool compilation_allowed() const { return compilation_allowed_; } |
- void set_compilation_allowed(bool allowed) { |
- compilation_allowed_ = allowed; |
- } |
+ void set_compilation_allowed(bool allowed) { compilation_allowed_ = allowed; } |
// In precompilation we finalize all regular classes before compiling. |
bool all_classes_finalized() const { return all_classes_finalized_; } |
- void set_all_classes_finalized(bool value) { |
- all_classes_finalized_ = value; |
- } |
+ void set_all_classes_finalized(bool value) { all_classes_finalized_ = value; } |
// True during top level parsing. |
bool IsTopLevelParsing() { |
@@ -622,11 +586,11 @@ class Isolate : public BaseIsolate { |
#ifndef PRODUCT |
RawObject* InvokePendingServiceExtensionCalls(); |
void AppendServiceExtensionCall(const Instance& closure, |
- const String& method_name, |
- const Array& parameter_keys, |
- const Array& parameter_values, |
- const Instance& reply_port, |
- const Instance& id); |
+ const String& method_name, |
+ const Array& parameter_keys, |
+ const Array& parameter_values, |
+ const Instance& reply_port, |
+ const Instance& id); |
void RegisterServiceExtensionHandler(const String& name, |
const Instance& closure); |
RawInstance* LookupServiceExtensionHandler(const String& name); |
@@ -655,7 +619,7 @@ class Isolate : public BaseIsolate { |
bool asserts() const { return FLAG_enable_asserts; } |
bool error_on_bad_type() const { return FLAG_error_on_bad_type; } |
bool error_on_bad_override() const { return FLAG_error_on_bad_override; } |
-#else // defined(PRODUCT) |
+#else // defined(PRODUCT) |
bool type_checks() const { return type_checks_; } |
bool asserts() const { return asserts_; } |
bool error_on_bad_type() const { return error_on_bad_type_; } |
@@ -678,7 +642,7 @@ class Isolate : public BaseIsolate { |
void MaybeIncreaseReloadEveryNStackOverflowChecks(); |
private: |
- friend class Dart; // Init, InitOnce, Shutdown. |
+ friend class Dart; // Init, InitOnce, Shutdown. |
friend class IsolateKillerVisitor; // Kill(). |
explicit Isolate(const Dart_IsolateFlags& api_flags); |
@@ -702,9 +666,7 @@ class Isolate : public BaseIsolate { |
// running, and the visitor must not allocate. |
void VisitObjectPointers(ObjectPointerVisitor* visitor, bool validate_frames); |
- void set_user_tag(uword tag) { |
- user_tag_ = tag; |
- } |
+ void set_user_tag(uword tag) { user_tag_ = tag; } |
RawGrowableObjectArray* GetAndClearPendingServiceExtensionCalls(); |
RawGrowableObjectArray* pending_service_extension_calls() const { |
@@ -719,8 +681,9 @@ class Isolate : public BaseIsolate { |
Monitor* threads_lock() const; |
Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false); |
- void UnscheduleThread( |
- Thread* thread, bool is_mutator, bool bypass_safepoint = false); |
+ void UnscheduleThread(Thread* thread, |
+ bool is_mutator, |
+ bool bypass_safepoint = false); |
// DEPRECATED: Use Thread's methods instead. During migration, these default |
// to using the mutator thread (which must also be the current thread). |
@@ -761,9 +724,9 @@ class Isolate : public BaseIsolate { |
bool has_compiled_code_; // Can check that no compilation occured. |
Random random_; |
Simulator* simulator_; |
- Mutex* mutex_; // Protects compiler stats. |
+ Mutex* mutex_; // Protects compiler stats. |
Mutex* symbols_mutex_; // Protects concurrent access to the symbol table. |
- Mutex* type_canonicalization_mutex_; // Protects type canonicalization. |
+ Mutex* type_canonicalization_mutex_; // Protects type canonicalization. |
Mutex* constant_canonicalization_mutex_; // Protects const canonicalization. |
Mutex* megamorphic_lookup_mutex_; // Protects megamorphic table lookup. |
MessageHandler* message_handler_; |
@@ -777,13 +740,13 @@ class Isolate : public BaseIsolate { |
bool is_service_isolate_; |
- // Isolate-specific flags. |
- NOT_IN_PRODUCT( |
- bool type_checks_; |
- bool asserts_; |
- bool error_on_bad_type_; |
- bool error_on_bad_override_; |
- ) |
+// Isolate-specific flags. |
+#if !defined(PRODUCT) |
+ bool type_checks_; |
+ bool asserts_; |
+ bool error_on_bad_type_; |
+ bool error_on_bad_override_; |
+#endif // !defined(PRODUCT) |
// Timestamps of last operation via service. |
int64_t last_allocationprofile_accumulator_reset_timestamp_; |
@@ -881,10 +844,10 @@ class Isolate : public BaseIsolate { |
#define REUSABLE_FRIEND_DECLARATION(name) \ |
friend class Reusable##name##HandleScope; |
-REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) |
+ REUSABLE_HANDLE_LIST(REUSABLE_FRIEND_DECLARATION) |
#undef REUSABLE_FRIEND_DECLARATION |
- friend class Become; // VisitObjectPointers |
+ friend class Become; // VisitObjectPointers |
friend class GCMarker; // VisitObjectPointers |
friend class SafepointHandler; |
friend class Scavenger; // VisitObjectPointers |