Index: src/objects/breakpoints-info.h |
diff --git a/src/objects/breakpoints-info.h b/src/objects/breakpoints-info.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c8b931683ad83bc5b0bf24ad54be54941aa9ca4a |
--- /dev/null |
+++ b/src/objects/breakpoints-info.h |
@@ -0,0 +1,54 @@ |
+// Copyright 2017 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef V8_OBJECTS_BREAKPOINTS_INFO_H_ |
+#define V8_OBJECTS_BREAKPOINTS_INFO_H_ |
+ |
+#include "src/objects.h" |
+ |
+// Has to be the last include (doesn't have include guards): |
+#include "src/objects/object-macros.h" |
+ |
+namespace v8 { |
+namespace internal { |
+ |
+// The BreakPointInfo class holds information for break points set in a |
+// function. The DebugInfo object holds a BreakPointInfo object for each code |
+// position with one or more break points. |
+class BreakPointInfo : public Tuple2 { |
jgruber
2017/05/22 13:31:07
I'm planning on adding a BreakPointsInfo class in
|
+ public: |
+ // The position in the source for the break position. |
+ DECL_INT_ACCESSORS(source_position) |
+ // List of related JavaScript break points. |
+ DECL_ACCESSORS(break_point_objects, Object) |
+ |
+ // Removes a break point. |
+ static void ClearBreakPoint(Handle<BreakPointInfo> info, |
+ Handle<Object> break_point_object); |
+ // Set a break point. |
+ static void SetBreakPoint(Handle<BreakPointInfo> info, |
+ Handle<Object> break_point_object); |
+ // Check if break point info has this break point object. |
+ static bool HasBreakPointObject(Handle<BreakPointInfo> info, |
+ Handle<Object> break_point_object); |
+ // Get the number of break points for this code offset. |
+ int GetBreakPointCount(); |
+ |
+ int GetStatementPosition(Handle<DebugInfo> debug_info); |
+ |
+ DECLARE_CAST(BreakPointInfo) |
+ |
+ static const int kSourcePositionIndex = kValue1Offset; |
+ static const int kBreakPointObjectsIndex = kValue2Offset; |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo); |
+}; |
+ |
+#include "src/objects/object-macros-undef.h" |
+ |
+} // namespace internal |
+} // namespace v8 |
+ |
+#endif // V8_OBJECTS_BREAKPOINTS_INFO_H_ |