Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 11b51bff19635998672ae906886ba531cd081573..7cb56832a068c3d6f2effe96434b89cc10f2d8a5 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -10870,20 +10870,18 @@ class DebugInfo: public Struct { |
| public: |
| // The shared function info for the source being debugged. |
| DECL_ACCESSORS(shared, SharedFunctionInfo) |
| - // Code object for the patched code. This code object is the code object |
| - // currently active for the function. |
| - DECL_ACCESSORS(abstract_code, AbstractCode) |
| + |
| + DECL_ACCESSORS(debug_bytecode_array, Object) |
| // Fixed array holding status information for each active break point. |
| DECL_ACCESSORS(break_points, FixedArray) |
| // Check if there is a break point at a source position. |
| bool HasBreakPoint(int source_position); |
| - // Clear a break point. |
| - static void ClearBreakPoint(Handle<DebugInfo> debug_info, int source_position, |
| + // Attempt to clear a break point. Return true if successful. |
| + static bool ClearBreakPoint(Handle<DebugInfo> debug_info, |
| Handle<Object> break_point_object); |
| // Set a break point. |
| static void SetBreakPoint(Handle<DebugInfo> debug_info, int source_position, |
| - int statement_position, |
| Handle<Object> break_point_object); |
| // Get the break point objects for a source position. |
| Handle<Object> GetBreakPointObjects(int source_position); |
| @@ -10895,7 +10893,12 @@ class DebugInfo: public Struct { |
| static Smi* uninitialized() { return Smi::FromInt(0); } |
| - inline BytecodeArray* original_bytecode_array(); |
| + inline bool HasDebugBytecodeArray(); |
| + inline bool HasDebugCode(); |
| + |
| + inline BytecodeArray* OriginalBytecodeArray(); |
| + inline BytecodeArray* DebugBytecodeArray(); |
| + inline Code* DebugCode(); |
| DECLARE_CAST(DebugInfo) |
| @@ -10904,10 +10907,14 @@ class DebugInfo: public Struct { |
| DECLARE_VERIFIER(DebugInfo) |
| static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; |
| - static const int kAbstractCodeIndex = kSharedFunctionInfoIndex + kPointerSize; |
| - static const int kBreakPointsStateIndex = kAbstractCodeIndex + kPointerSize; |
| + static const int kDebugBytecodeArrayIndex = |
| + kSharedFunctionInfoIndex + kPointerSize; |
| + static const int kBreakPointsStateIndex = |
| + kDebugBytecodeArrayIndex + kPointerSize; |
| static const int kSize = kBreakPointsStateIndex + kPointerSize; |
| + static const int kAbstractCodeIndex = kSharedFunctionInfoIndex + kPointerSize; |
|
jgruber
2016/08/11 14:28:13
Is this still used anywhere?
Yang
2016/08/12 05:33:46
Good catch. Removed.
|
| + |
| static const int kEstimatedNofBreakPointsInFunction = 16; |
| private: |
| @@ -10940,6 +10947,8 @@ class BreakPointInfo: public Struct { |
| // Get the number of break points for this code offset. |
| int GetBreakPointCount(); |
| + int GetStatementPosition(Handle<DebugInfo> debug_info); |
| + |
| DECLARE_CAST(BreakPointInfo) |
| // Dispatched behavior. |