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

Side by Side Diff: src/objects.h

Issue 1703453002: [interpreter, debugger] support debug breaks via bytecode array copy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed last comment 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
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"
11 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
12 #include "src/bailout-reason.h" 11 #include "src/bailout-reason.h"
13 #include "src/base/bits.h" 12 #include "src/base/bits.h"
14 #include "src/base/flags.h" 13 #include "src/base/flags.h"
15 #include "src/base/smart-pointers.h" 14 #include "src/base/smart-pointers.h"
16 #include "src/builtins.h" 15 #include "src/builtins.h"
17 #include "src/checks.h" 16 #include "src/checks.h"
18 #include "src/elements-kind.h" 17 #include "src/elements-kind.h"
19 #include "src/field-index.h" 18 #include "src/field-index.h"
20 #include "src/flags.h" 19 #include "src/flags.h"
(...skipping 4446 matching lines...) Expand 10 before | Expand all | Expand 10 after
4467 inline int instruction_size(); 4466 inline int instruction_size();
4468 4467
4469 int SourcePosition(int offset); 4468 int SourcePosition(int offset);
4470 int SourceStatementPosition(int offset); 4469 int SourceStatementPosition(int offset);
4471 4470
4472 DECLARE_PRINTER(BytecodeArray) 4471 DECLARE_PRINTER(BytecodeArray)
4473 DECLARE_VERIFIER(BytecodeArray) 4472 DECLARE_VERIFIER(BytecodeArray)
4474 4473
4475 void Disassemble(std::ostream& os); 4474 void Disassemble(std::ostream& os);
4476 4475
4476 void CopyTo(BytecodeArray* to);
Michael Starzinger 2016/02/22 09:37:49 nit: Can we call this "CopyBytecodesTo" instead? T
Yang 2016/02/22 12:48:43 Done.
4477
4477 // Layout description. 4478 // Layout description.
4478 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize; 4479 static const int kFrameSizeOffset = FixedArrayBase::kHeaderSize;
4479 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; 4480 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize;
4480 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize; 4481 static const int kConstantPoolOffset = kParameterSizeOffset + kIntSize;
4481 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; 4482 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize;
4482 static const int kSourcePositionTableOffset = 4483 static const int kSourcePositionTableOffset =
4483 kHandlerTableOffset + kPointerSize; 4484 kHandlerTableOffset + kPointerSize;
4484 static const int kHeaderSize = kSourcePositionTableOffset + kPointerSize; 4485 static const int kHeaderSize = kSourcePositionTableOffset + kPointerSize;
4485 4486
4486 // Maximal memory consumption for a single BytecodeArray. 4487 // Maximal memory consumption for a single BytecodeArray.
(...skipping 6149 matching lines...) Expand 10 before | Expand all | Expand 10 after
10636 int source_position, int statement_position, 10637 int source_position, int statement_position,
10637 Handle<Object> break_point_object); 10638 Handle<Object> break_point_object);
10638 // Get the break point objects for a code offset. 10639 // Get the break point objects for a code offset.
10639 Handle<Object> GetBreakPointObjects(int code_offset); 10640 Handle<Object> GetBreakPointObjects(int code_offset);
10640 // Find the break point info holding this break point object. 10641 // Find the break point info holding this break point object.
10641 static Handle<Object> FindBreakPointInfo(Handle<DebugInfo> debug_info, 10642 static Handle<Object> FindBreakPointInfo(Handle<DebugInfo> debug_info,
10642 Handle<Object> break_point_object); 10643 Handle<Object> break_point_object);
10643 // Get the number of break points for this function. 10644 // Get the number of break points for this function.
10644 int GetBreakPointCount(); 10645 int GetBreakPointCount();
10645 10646
10647 static Smi* uninitialized() { return Smi::FromInt(0); }
10648
10649 inline BytecodeArray* original_bytecode_array();
10650
10646 DECLARE_CAST(DebugInfo) 10651 DECLARE_CAST(DebugInfo)
10647 10652
10648 // Dispatched behavior. 10653 // Dispatched behavior.
10649 DECLARE_PRINTER(DebugInfo) 10654 DECLARE_PRINTER(DebugInfo)
10650 DECLARE_VERIFIER(DebugInfo) 10655 DECLARE_VERIFIER(DebugInfo)
10651 10656
10652 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; 10657 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize;
10653 static const int kAbstractCodeIndex = kSharedFunctionInfoIndex + kPointerSize; 10658 static const int kAbstractCodeIndex = kSharedFunctionInfoIndex + kPointerSize;
10654 static const int kBreakPointsStateIndex = kAbstractCodeIndex + kPointerSize; 10659 static const int kBreakPointsStateIndex = kAbstractCodeIndex + kPointerSize;
10655 static const int kSize = kBreakPointsStateIndex + kPointerSize; 10660 static const int kSize = kBreakPointsStateIndex + kPointerSize;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
10830 } 10835 }
10831 return value; 10836 return value;
10832 } 10837 }
10833 }; 10838 };
10834 10839
10835 10840
10836 } // NOLINT, false-positive due to second-order macros. 10841 } // NOLINT, false-positive due to second-order macros.
10837 } // NOLINT, false-positive due to second-order macros. 10842 } // NOLINT, false-positive due to second-order macros.
10838 10843
10839 #endif // V8_OBJECTS_H_ 10844 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698