Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index ef3f31df4793aefb3cdfbc7012a9c889589b8fb7..998517b30c1c767a51b68ed97a56a00036cdc0cb 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -168,6 +168,8 @@ |
namespace v8 { |
namespace internal { |
+struct InliningPosition; |
+ |
enum KeyedAccessStoreMode { |
STANDARD_STORE, |
STORE_TRANSITION_TO_OBJECT, |
@@ -4955,6 +4957,25 @@ class ByteArray: public FixedArrayBase { |
DISALLOW_IMPLICIT_CONSTRUCTORS(ByteArray); |
}; |
+template <class T> |
+class PodArray : public ByteArray { |
+ public: |
+ T get(int index) { |
+ STATIC_ASSERT(std::is_pod<T>::value); |
+ T result; |
+ copy_out(index * sizeof(T), reinterpret_cast<byte*>(&result), sizeof(T)); |
+ return result; |
+ } |
+ void set(int index, const T& value) { |
+ copy_in(index * sizeof(T), reinterpret_cast<const byte*>(&value), |
+ sizeof(T)); |
+ } |
+ int length() { return ByteArray::length() / sizeof(T); } |
+ DECLARE_CAST(PodArray<T>); |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PodArray<T>); |
+}; |
// BytecodeArray represents a sequence of interpreter bytecodes. |
class BytecodeArray : public FixedArrayBase { |
@@ -5187,7 +5208,6 @@ TYPED_ARRAYS(FIXED_TYPED_ARRAY_TRAITS) |
#undef FIXED_TYPED_ARRAY_TRAITS |
- |
// DeoptimizationInputData is a fixed array used to hold the deoptimization |
// data for code generated by the Hydrogen/Lithium compiler. It also |
// contains information about functions that were inlined. If N different |
@@ -5206,7 +5226,8 @@ class DeoptimizationInputData: public FixedArray { |
static const int kOptimizationIdIndex = 5; |
static const int kSharedFunctionInfoIndex = 6; |
static const int kWeakCellCacheIndex = 7; |
- static const int kFirstDeoptEntryIndex = 8; |
+ static const int kInliningPositionsIndex = 8; |
+ static const int kFirstDeoptEntryIndex = 9; |
// Offsets of deopt entry elements relative to the start of the entry. |
static const int kAstIdRawOffset = 0; |
@@ -5228,6 +5249,7 @@ class DeoptimizationInputData: public FixedArray { |
DECLARE_ELEMENT_ACCESSORS(OptimizationId, Smi) |
DECLARE_ELEMENT_ACCESSORS(SharedFunctionInfo, Object) |
DECLARE_ELEMENT_ACCESSORS(WeakCellCache, Object) |
+ DECLARE_ELEMENT_ACCESSORS(InliningPositions, PodArray<InliningPosition>) |
#undef DECLARE_ELEMENT_ACCESSORS |
@@ -5269,7 +5291,6 @@ class DeoptimizationInputData: public FixedArray { |
static int LengthFor(int entry_count) { return IndexForEntry(entry_count); } |
}; |
- |
// DeoptimizationOutputData is a fixed array used to hold the deoptimization |
// data for code generated by the full compiler. |
// The format of the these objects is |