Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_OBJECTS_BREAKPOINTS_INFO_H_ | |
| 6 #define V8_OBJECTS_BREAKPOINTS_INFO_H_ | |
| 7 | |
| 8 #include "src/objects.h" | |
| 9 | |
| 10 // Has to be the last include (doesn't have include guards): | |
| 11 #include "src/objects/object-macros.h" | |
| 12 | |
| 13 namespace v8 { | |
| 14 namespace internal { | |
| 15 | |
| 16 // The BreakPointInfo class holds information for break points set in a | |
| 17 // function. The DebugInfo object holds a BreakPointInfo object for each code | |
| 18 // position with one or more break points. | |
| 19 class BreakPointInfo : public Tuple2 { | |
|
jgruber
2017/05/22 13:31:07
I'm planning on adding a BreakPointsInfo class in
| |
| 20 public: | |
| 21 // The position in the source for the break position. | |
| 22 DECL_INT_ACCESSORS(source_position) | |
| 23 // List of related JavaScript break points. | |
| 24 DECL_ACCESSORS(break_point_objects, Object) | |
| 25 | |
| 26 // Removes a break point. | |
| 27 static void ClearBreakPoint(Handle<BreakPointInfo> info, | |
| 28 Handle<Object> break_point_object); | |
| 29 // Set a break point. | |
| 30 static void SetBreakPoint(Handle<BreakPointInfo> info, | |
| 31 Handle<Object> break_point_object); | |
| 32 // Check if break point info has this break point object. | |
| 33 static bool HasBreakPointObject(Handle<BreakPointInfo> info, | |
| 34 Handle<Object> break_point_object); | |
| 35 // Get the number of break points for this code offset. | |
| 36 int GetBreakPointCount(); | |
| 37 | |
| 38 int GetStatementPosition(Handle<DebugInfo> debug_info); | |
| 39 | |
| 40 DECLARE_CAST(BreakPointInfo) | |
| 41 | |
| 42 static const int kSourcePositionIndex = kValue1Offset; | |
| 43 static const int kBreakPointObjectsIndex = kValue2Offset; | |
| 44 | |
| 45 private: | |
| 46 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo); | |
| 47 }; | |
| 48 | |
| 49 #include "src/objects/object-macros-undef.h" | |
| 50 | |
| 51 } // namespace internal | |
| 52 } // namespace v8 | |
| 53 | |
| 54 #endif // V8_OBJECTS_BREAKPOINTS_INFO_H_ | |
| OLD | NEW |