OLD | NEW |
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 4452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4473 inline int instruction_size(); | 4472 inline int instruction_size(); |
4474 | 4473 |
4475 int SourcePosition(int offset); | 4474 int SourcePosition(int offset); |
4476 int SourceStatementPosition(int offset); | 4475 int SourceStatementPosition(int offset); |
4477 | 4476 |
4478 DECLARE_PRINTER(BytecodeArray) | 4477 DECLARE_PRINTER(BytecodeArray) |
4479 DECLARE_VERIFIER(BytecodeArray) | 4478 DECLARE_VERIFIER(BytecodeArray) |
4480 | 4479 |
4481 void Disassemble(std::ostream& os); | 4480 void Disassemble(std::ostream& os); |
4482 | 4481 |
| 4482 void CopyBytecodesTo(BytecodeArray* to); |
| 4483 |
4483 // Layout description. | 4484 // Layout description. |
4484 static const int kConstantPoolOffset = FixedArrayBase::kHeaderSize; | 4485 static const int kConstantPoolOffset = FixedArrayBase::kHeaderSize; |
4485 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; | 4486 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; |
4486 static const int kSourcePositionTableOffset = | 4487 static const int kSourcePositionTableOffset = |
4487 kHandlerTableOffset + kPointerSize; | 4488 kHandlerTableOffset + kPointerSize; |
4488 static const int kFrameSizeOffset = kSourcePositionTableOffset + kPointerSize; | 4489 static const int kFrameSizeOffset = kSourcePositionTableOffset + kPointerSize; |
4489 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; | 4490 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; |
4490 static const int kInterruptBudgetOffset = kParameterSizeOffset + kIntSize; | 4491 static const int kInterruptBudgetOffset = kParameterSizeOffset + kIntSize; |
4491 static const int kHeaderSize = kInterruptBudgetOffset + kIntSize; | 4492 static const int kHeaderSize = kInterruptBudgetOffset + kIntSize; |
4492 | 4493 |
(...skipping 6150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10643 int source_position, int statement_position, | 10644 int source_position, int statement_position, |
10644 Handle<Object> break_point_object); | 10645 Handle<Object> break_point_object); |
10645 // Get the break point objects for a code offset. | 10646 // Get the break point objects for a code offset. |
10646 Handle<Object> GetBreakPointObjects(int code_offset); | 10647 Handle<Object> GetBreakPointObjects(int code_offset); |
10647 // Find the break point info holding this break point object. | 10648 // Find the break point info holding this break point object. |
10648 static Handle<Object> FindBreakPointInfo(Handle<DebugInfo> debug_info, | 10649 static Handle<Object> FindBreakPointInfo(Handle<DebugInfo> debug_info, |
10649 Handle<Object> break_point_object); | 10650 Handle<Object> break_point_object); |
10650 // Get the number of break points for this function. | 10651 // Get the number of break points for this function. |
10651 int GetBreakPointCount(); | 10652 int GetBreakPointCount(); |
10652 | 10653 |
| 10654 static Smi* uninitialized() { return Smi::FromInt(0); } |
| 10655 |
| 10656 inline BytecodeArray* original_bytecode_array(); |
| 10657 |
10653 DECLARE_CAST(DebugInfo) | 10658 DECLARE_CAST(DebugInfo) |
10654 | 10659 |
10655 // Dispatched behavior. | 10660 // Dispatched behavior. |
10656 DECLARE_PRINTER(DebugInfo) | 10661 DECLARE_PRINTER(DebugInfo) |
10657 DECLARE_VERIFIER(DebugInfo) | 10662 DECLARE_VERIFIER(DebugInfo) |
10658 | 10663 |
10659 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; | 10664 static const int kSharedFunctionInfoIndex = Struct::kHeaderSize; |
10660 static const int kAbstractCodeIndex = kSharedFunctionInfoIndex + kPointerSize; | 10665 static const int kAbstractCodeIndex = kSharedFunctionInfoIndex + kPointerSize; |
10661 static const int kBreakPointsStateIndex = kAbstractCodeIndex + kPointerSize; | 10666 static const int kBreakPointsStateIndex = kAbstractCodeIndex + kPointerSize; |
10662 static const int kSize = kBreakPointsStateIndex + kPointerSize; | 10667 static const int kSize = kBreakPointsStateIndex + kPointerSize; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10837 } | 10842 } |
10838 return value; | 10843 return value; |
10839 } | 10844 } |
10840 }; | 10845 }; |
10841 | 10846 |
10842 | 10847 |
10843 } // NOLINT, false-positive due to second-order macros. | 10848 } // NOLINT, false-positive due to second-order macros. |
10844 } // NOLINT, false-positive due to second-order macros. | 10849 } // NOLINT, false-positive due to second-order macros. |
10845 | 10850 |
10846 #endif // V8_OBJECTS_H_ | 10851 #endif // V8_OBJECTS_H_ |
OLD | NEW |