OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_DEBUG_DEBUG_H_ | 5 #ifndef V8_DEBUG_DEBUG_H_ |
6 #define V8_DEBUG_DEBUG_H_ | 6 #define V8_DEBUG_DEBUG_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/base/atomicops.h" | 10 #include "src/base/atomicops.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 bool CheckExecutionState() { | 372 bool CheckExecutionState() { |
373 return is_active() && !debug_context().is_null() && break_id() != 0; | 373 return is_active() && !debug_context().is_null() && break_id() != 0; |
374 } | 374 } |
375 | 375 |
376 bool PerformSideEffectCheck(Handle<JSFunction> function); | 376 bool PerformSideEffectCheck(Handle<JSFunction> function); |
377 bool PerformSideEffectCheckForCallback(Address function); | 377 bool PerformSideEffectCheckForCallback(Address function); |
378 | 378 |
379 // Flags and states. | 379 // Flags and states. |
380 DebugScope* debugger_entry() { | 380 DebugScope* debugger_entry() { |
381 return reinterpret_cast<DebugScope*>( | 381 return reinterpret_cast<DebugScope*>( |
382 base::NoBarrier_Load(&thread_local_.current_debug_scope_)); | 382 base::Relaxed_Load(&thread_local_.current_debug_scope_)); |
383 } | 383 } |
384 inline Handle<Context> debug_context() { return debug_context_; } | 384 inline Handle<Context> debug_context() { return debug_context_; } |
385 | 385 |
386 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } | 386 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } |
387 bool live_edit_enabled() const { | 387 bool live_edit_enabled() const { |
388 return FLAG_enable_liveedit && live_edit_enabled_; | 388 return FLAG_enable_liveedit && live_edit_enabled_; |
389 } | 389 } |
390 | 390 |
391 inline bool is_active() const { return is_active_; } | 391 inline bool is_active() const { return is_active_; } |
392 inline bool is_loaded() const { return !debug_context_.is_null(); } | 392 inline bool is_loaded() const { return !debug_context_.is_null(); } |
393 inline bool in_debug_scope() const { | 393 inline bool in_debug_scope() const { |
394 return !!base::NoBarrier_Load(&thread_local_.current_debug_scope_); | 394 return !!base::Relaxed_Load(&thread_local_.current_debug_scope_); |
395 } | 395 } |
396 void set_break_points_active(bool v) { break_points_active_ = v; } | 396 void set_break_points_active(bool v) { break_points_active_ = v; } |
397 bool break_points_active() const { return break_points_active_; } | 397 bool break_points_active() const { return break_points_active_; } |
398 | 398 |
399 StackFrame::Id break_frame_id() { return thread_local_.break_frame_id_; } | 399 StackFrame::Id break_frame_id() { return thread_local_.break_frame_id_; } |
400 int break_id() { return thread_local_.break_id_; } | 400 int break_id() { return thread_local_.break_id_; } |
401 | 401 |
402 Handle<Object> return_value_handle() { | 402 Handle<Object> return_value_handle() { |
403 return handle(thread_local_.return_value_, isolate_); | 403 return handle(thread_local_.return_value_, isolate_); |
404 } | 404 } |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 Handle<Code> code); | 804 Handle<Code> code); |
805 static bool DebugBreakSlotIsPatched(Address pc); | 805 static bool DebugBreakSlotIsPatched(Address pc); |
806 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 806 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
807 }; | 807 }; |
808 | 808 |
809 | 809 |
810 } // namespace internal | 810 } // namespace internal |
811 } // namespace v8 | 811 } // namespace v8 |
812 | 812 |
813 #endif // V8_DEBUG_DEBUG_H_ | 813 #endif // V8_DEBUG_DEBUG_H_ |
OLD | NEW |