Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: src/objects.h

Issue 1682853003: [debugger] introduce abstract interface for break location. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revert stray edit Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips64/assembler-mips64-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 4437 matching lines...) Expand 10 before | Expand all | Expand 10 after
4448 DECL_ACCESSORS(source_position_table, FixedArray) 4448 DECL_ACCESSORS(source_position_table, FixedArray)
4449 4449
4450 DECLARE_CAST(BytecodeArray) 4450 DECLARE_CAST(BytecodeArray)
4451 4451
4452 // Dispatched behavior. 4452 // Dispatched behavior.
4453 inline int BytecodeArraySize(); 4453 inline int BytecodeArraySize();
4454 4454
4455 inline int instruction_size(); 4455 inline int instruction_size();
4456 4456
4457 int SourcePosition(int offset); 4457 int SourcePosition(int offset);
4458 int SourceStatementPosition(int offset);
4458 4459
4459 DECLARE_PRINTER(BytecodeArray) 4460 DECLARE_PRINTER(BytecodeArray)
4460 DECLARE_VERIFIER(BytecodeArray) 4461 DECLARE_VERIFIER(BytecodeArray)
4461 4462
4462 void Disassemble(std::ostream& os); 4463 void Disassemble(std::ostream& os);
4463 4464
4464 // Layout description. 4465 // Layout description.
4465 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; 4466 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize;
4466 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; 4467 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize;
4467 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; 4468 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize;
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
5374 static void PatchPlatformCodeAge(Isolate* isolate, 5375 static void PatchPlatformCodeAge(Isolate* isolate,
5375 byte* sequence, Age age, 5376 byte* sequence, Age age,
5376 MarkingParity parity); 5377 MarkingParity parity);
5377 5378
5378 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); 5379 DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
5379 }; 5380 };
5380 5381
5381 class AbstractCode : public HeapObject { 5382 class AbstractCode : public HeapObject {
5382 public: 5383 public:
5383 int SourcePosition(int offset); 5384 int SourcePosition(int offset);
5385 int SourceStatementPosition(int offset);
5384 5386
5385 DECLARE_CAST(AbstractCode) 5387 DECLARE_CAST(AbstractCode)
5388 inline int Size();
5386 inline Code* GetCode(); 5389 inline Code* GetCode();
5387 inline BytecodeArray* GetBytecodeArray(); 5390 inline BytecodeArray* GetBytecodeArray();
5388 }; 5391 };
5389 5392
5390 // Dependent code is a singly linked list of fixed arrays. Each array contains 5393 // Dependent code is a singly linked list of fixed arrays. Each array contains
5391 // code objects in weak cells for one dependent group. The suffix of the array 5394 // code objects in weak cells for one dependent group. The suffix of the array
5392 // can be filled with the undefined value if the number of codes is less than 5395 // can be filled with the undefined value if the number of codes is less than
5393 // the length of the array. 5396 // the length of the array.
5394 // 5397 //
5395 // +------+-----------------+--------+--------+-----+--------+-----------+-----+ 5398 // +------+-----------------+--------+--------+-----+--------+-----------+-----+
(...skipping 5186 matching lines...) Expand 10 before | Expand all | Expand 10 after
10582 10585
10583 10586
10584 // The DebugInfo class holds additional information for a function being 10587 // The DebugInfo class holds additional information for a function being
10585 // debugged. 10588 // debugged.
10586 class DebugInfo: public Struct { 10589 class DebugInfo: public Struct {
10587 public: 10590 public:
10588 // The shared function info for the source being debugged. 10591 // The shared function info for the source being debugged.
10589 DECL_ACCESSORS(shared, SharedFunctionInfo) 10592 DECL_ACCESSORS(shared, SharedFunctionInfo)
10590 // Code object for the patched code. This code object is the code object 10593 // Code object for the patched code. This code object is the code object
10591 // currently active for the function. 10594 // currently active for the function.
10592 DECL_ACCESSORS(code, Code) 10595 DECL_ACCESSORS(abstract_code, AbstractCode)
10593 // Fixed array holding status information for each active break point. 10596 // Fixed array holding status information for each active break point.
10594 DECL_ACCESSORS(break_points, FixedArray) 10597 DECL_ACCESSORS(break_points, FixedArray)
10595 10598
10596 // Check if there is a break point at a code offset. 10599 // Check if there is a break point at a code offset.
10597 bool HasBreakPoint(int code_offset); 10600 bool HasBreakPoint(int code_offset);
10598 // Get the break point info object for a code offset. 10601 // Get the break point info object for a code offset.
10599 Object* GetBreakPointInfo(int code_offset); 10602 Object* GetBreakPointInfo(int code_offset);
10600 // Clear a break point. 10603 // Clear a break point.
10601 static void ClearBreakPoint(Handle<DebugInfo> debug_info, int code_offset, 10604 static void ClearBreakPoint(Handle<DebugInfo> debug_info, int code_offset,
10602 Handle<Object> break_point_object); 10605 Handle<Object> break_point_object);
10603 // Set a break point. 10606 // Set a break point.
10604 static void SetBreakPoint(Handle<DebugInfo> debug_info, int code_offset, 10607 static void SetBreakPoint(Handle<DebugInfo> debug_info, int code_offset,
10605 int source_position, int statement_position, 10608 int source_position, int statement_position,
10606 Handle<Object> break_point_object); 10609 Handle<Object> break_point_object);
10607 // Get the break point objects for a code offset. 10610 // Get the break point objects for a code offset.
10608 Handle<Object> GetBreakPointObjects(int code_offset); 10611 Handle<Object> GetBreakPointObjects(int code_offset);
10609 // Find the break point info holding this break point object. 10612 // Find the break point info holding this break point object.
10610 static Handle<Object> FindBreakPointInfo(Handle<DebugInfo> debug_info, 10613 static Handle<Object> FindBreakPointInfo(Handle<DebugInfo> debug_info,
10611 Handle<Object> break_point_object); 10614 Handle<Object> break_point_object);
10612 // Get the number of break points for this function. 10615 // Get the number of break points for this function.
10613 int GetBreakPointCount(); 10616 int GetBreakPointCount();
10614 10617
10615 DECLARE_CAST(DebugInfo) 10618 DECLARE_CAST(DebugInfo)
10616 10619
10617 // Dispatched behavior. 10620 // Dispatched behavior.
10618 DECLARE_PRINTER(DebugInfo) 10621 DECLARE_PRINTER(DebugInfo)
10619 DECLARE_VERIFIER(DebugInfo) 10622 DECLARE_VERIFIER(DebugInfo)
10620 10623
10621 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; 10624 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize;
10622 static const int kCodeIndex = kSharedFunctionInfoIndex + kPointerSize; 10625 static const int kAbstractCodeIndex = kSharedFunctionInfoIndex + kPointerSize;
10623 static const int kBreakPointsStateIndex = kCodeIndex + kPointerSize; 10626 static const int kBreakPointsStateIndex = kAbstractCodeIndex + kPointerSize;
10624 static const int kSize = kBreakPointsStateIndex + kPointerSize; 10627 static const int kSize = kBreakPointsStateIndex + kPointerSize;
10625 10628
10626 static const int kEstimatedNofBreakPointsInFunction = 16; 10629 static const int kEstimatedNofBreakPointsInFunction = 16;
10627 10630
10628 private: 10631 private:
10629 static const int kNoBreakPointInfo = -1; 10632 static const int kNoBreakPointInfo = -1;
10630 10633
10631 // Lookup the index in the break_points array for a code offset. 10634 // Lookup the index in the break_points array for a code offset.
10632 int GetBreakPointInfoIndex(int code_offset); 10635 int GetBreakPointInfoIndex(int code_offset);
10633 10636
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
10799 } 10802 }
10800 return value; 10803 return value;
10801 } 10804 }
10802 }; 10805 };
10803 10806
10804 10807
10805 } // NOLINT, false-positive due to second-order macros. 10808 } // NOLINT, false-positive due to second-order macros.
10806 } // NOLINT, false-positive due to second-order macros. 10809 } // NOLINT, false-positive due to second-order macros.
10807 10810
10808 #endif // V8_OBJECTS_H_ 10811 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698