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

Unified Diff: src/objects.h

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: reverted v8-debugger change Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 387afd602eec1390a71f1de30ac40d28614d946c..ec01ea4e1fcce490e34150471dfbee06ad72ca80 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -145,6 +145,7 @@
// - DebugInfo
// - BreakPointInfo
// - StackFrameInfo
+// - SourcePositionTableWithFrameCache
// - CodeCache
// - PrototypeInfo
// - Module
@@ -1098,7 +1099,8 @@ template <class C> inline bool Is(Object* obj);
V(ObjectHashSet) \
V(WeakHashTable) \
V(OrderedHashTable) \
- V(SloppyArgumentsElements)
+ V(SloppyArgumentsElements) \
+ V(SourcePositionTableWithFrameCache)
#define ODDBALL_LIST(V) \
V(Undefined, undefined_value) \
@@ -3294,8 +3296,10 @@ class BytecodeArray : public FixedArrayBase {
DECL_ACCESSORS(handler_table, FixedArray)
// Accessors for source position table containing mappings between byte code
- // offset and source position.
- DECL_ACCESSORS(source_position_table, ByteArray)
+ // offset and source position or SourcePositionTableWithFrameCache.
+ DECL_ACCESSORS(source_position_table, Object)
+
+ inline ByteArray* SourcePositionTable();
DECLARE_CAST(BytecodeArray)
@@ -3707,8 +3711,11 @@ class Code: public HeapObject {
// [deoptimization_data]: Array containing data for deopt.
DECL_ACCESSORS(deoptimization_data, FixedArray)
- // [source_position_table]: ByteArray for the source positions table.
- DECL_ACCESSORS(source_position_table, ByteArray)
+ // [source_position_table]: ByteArray for the source positions table or
+ // SourcePositionTableWithFrameCache.
+ DECL_ACCESSORS(source_position_table, Object)
+
+ inline ByteArray* SourcePositionTable();
// [trap_handler_index]: An index into the trap handler's master list of code
// objects.
@@ -4240,6 +4247,11 @@ class AbstractCode : public HeapObject {
// Set the source position table.
inline void set_source_position_table(ByteArray* source_position_table);
+ inline Object* stack_frame_cache();
+ static void SetStackFrameCache(Handle<AbstractCode> abstract_code,
+ Handle<UnseededNumberDictionary> cache);
+ void DropStackFrameCache();
+
// Returns the size of instructions and the metadata.
inline int SizeIncludingMetadata();
@@ -10147,6 +10159,22 @@ class StackFrameInfo : public Struct {
DISALLOW_IMPLICIT_CONSTRUCTORS(StackFrameInfo);
};
+class SourcePositionTableWithFrameCache : public Tuple2 {
+ public:
+ DECL_ACCESSORS(source_position_table, ByteArray)
+ DECL_ACCESSORS(stack_frame_cache, UnseededNumberDictionary)
+
+ DECLARE_CAST(SourcePositionTableWithFrameCache)
+
+ static const int kSourcePositionTableIndex = Struct::kHeaderSize;
+ static const int kStackFrameCacheIndex =
+ kSourcePositionTableIndex + kPointerSize;
+ static const int kSize = kStackFrameCacheIndex + kPointerSize;
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(SourcePositionTableWithFrameCache);
+};
+
#define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
V(kStringTable, "string_table", "(Internalized strings)") \
V(kExternalStringsTable, "external_strings_table", "(External strings)") \
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698