| 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 10555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10566 static const int kSize = kTypesOffset + kPointerSize; | 10566 static const int kSize = kTypesOffset + kPointerSize; |
| 10567 }; | 10567 }; |
| 10568 | 10568 |
| 10569 | 10569 |
| 10570 // The DebugInfo class holds additional information for a function being | 10570 // The DebugInfo class holds additional information for a function being |
| 10571 // debugged. | 10571 // debugged. |
| 10572 class DebugInfo: public Struct { | 10572 class DebugInfo: public Struct { |
| 10573 public: | 10573 public: |
| 10574 // The shared function info for the source being debugged. | 10574 // The shared function info for the source being debugged. |
| 10575 DECL_ACCESSORS(shared, SharedFunctionInfo) | 10575 DECL_ACCESSORS(shared, SharedFunctionInfo) |
| 10576 // Code object for the original code. | |
| 10577 DECL_ACCESSORS(original_code, Code) | |
| 10578 // Code object for the patched code. This code object is the code object | 10576 // Code object for the patched code. This code object is the code object |
| 10579 // currently active for the function. | 10577 // currently active for the function. |
| 10580 DECL_ACCESSORS(code, Code) | 10578 DECL_ACCESSORS(code, Code) |
| 10581 // Fixed array holding status information for each active break point. | 10579 // Fixed array holding status information for each active break point. |
| 10582 DECL_ACCESSORS(break_points, FixedArray) | 10580 DECL_ACCESSORS(break_points, FixedArray) |
| 10583 | 10581 |
| 10584 // Check if there is a break point at a code position. | 10582 // Check if there is a break point at a code position. |
| 10585 bool HasBreakPoint(int code_position); | 10583 bool HasBreakPoint(int code_position); |
| 10586 // Get the break point info object for a code position. | 10584 // Get the break point info object for a code position. |
| 10587 Object* GetBreakPointInfo(int code_position); | 10585 Object* GetBreakPointInfo(int code_position); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 10601 // Get the number of break points for this function. | 10599 // Get the number of break points for this function. |
| 10602 int GetBreakPointCount(); | 10600 int GetBreakPointCount(); |
| 10603 | 10601 |
| 10604 DECLARE_CAST(DebugInfo) | 10602 DECLARE_CAST(DebugInfo) |
| 10605 | 10603 |
| 10606 // Dispatched behavior. | 10604 // Dispatched behavior. |
| 10607 DECLARE_PRINTER(DebugInfo) | 10605 DECLARE_PRINTER(DebugInfo) |
| 10608 DECLARE_VERIFIER(DebugInfo) | 10606 DECLARE_VERIFIER(DebugInfo) |
| 10609 | 10607 |
| 10610 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; | 10608 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; |
| 10611 static const int kOriginalCodeIndex = kSharedFunctionInfoIndex + kPointerSize; | 10609 static const int kCodeIndex = kSharedFunctionInfoIndex + kPointerSize; |
| 10612 static const int kPatchedCodeIndex = kOriginalCodeIndex + kPointerSize; | 10610 static const int kBreakPointsStateIndex = kCodeIndex + kPointerSize; |
| 10613 static const int kActiveBreakPointsCountIndex = | |
| 10614 kPatchedCodeIndex + kPointerSize; | |
| 10615 static const int kBreakPointsStateIndex = | |
| 10616 kActiveBreakPointsCountIndex + kPointerSize; | |
| 10617 static const int kSize = kBreakPointsStateIndex + kPointerSize; | 10611 static const int kSize = kBreakPointsStateIndex + kPointerSize; |
| 10618 | 10612 |
| 10619 static const int kEstimatedNofBreakPointsInFunction = 16; | 10613 static const int kEstimatedNofBreakPointsInFunction = 16; |
| 10620 | 10614 |
| 10621 private: | 10615 private: |
| 10622 static const int kNoBreakPointInfo = -1; | 10616 static const int kNoBreakPointInfo = -1; |
| 10623 | 10617 |
| 10624 // Lookup the index in the break_points array for a code position. | 10618 // Lookup the index in the break_points array for a code position. |
| 10625 int GetBreakPointInfoIndex(int code_position); | 10619 int GetBreakPointInfoIndex(int code_position); |
| 10626 | 10620 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10808 } else { | 10802 } else { |
| 10809 value &= ~(1 << bit_position); | 10803 value &= ~(1 << bit_position); |
| 10810 } | 10804 } |
| 10811 return value; | 10805 return value; |
| 10812 } | 10806 } |
| 10813 }; | 10807 }; |
| 10814 | 10808 |
| 10815 } } // namespace v8::internal | 10809 } } // namespace v8::internal |
| 10816 | 10810 |
| 10817 #endif // V8_OBJECTS_H_ | 10811 #endif // V8_OBJECTS_H_ |
| OLD | NEW |