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

Unified Diff: src/objects-inl.h

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: ready for review Created 3 years, 9 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
« src/isolate.cc ('K') | « src/objects-body-descriptors-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index c1a8e223b60c2dd747ef6a35b7f2fa862e1839b6..54d2443b2aa4d88659abc434e992c27f7fc9e838 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4011,6 +4011,7 @@ ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset)
ACCESSORS(BytecodeArray, handler_table, FixedArray, kHandlerTableOffset)
ACCESSORS(BytecodeArray, source_position_table, ByteArray,
kSourcePositionTableOffset)
+ACCESSORS(BytecodeArray, stack_frame_cache, Object, kStackFrameCacheOffset)
Address BytecodeArray::GetFirstBytecodeAddress() {
return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize;
@@ -5237,6 +5238,22 @@ void AbstractCode::set_source_position_table(ByteArray* source_position_table) {
}
}
+Object* AbstractCode::stack_frame_cache() {
+ if (IsCode()) {
+ return GetCode()->stack_frame_cache();
+ } else {
+ return GetBytecodeArray()->stack_frame_cache();
+ }
+}
+
+void AbstractCode::set_stack_frame_cache(Object* stack_frame_cache) {
+ if (IsCode()) {
+ GetCode()->set_stack_frame_cache(stack_frame_cache);
+ } else {
+ GetBytecodeArray()->set_stack_frame_cache(stack_frame_cache);
+ }
+}
+
int AbstractCode::SizeIncludingMetadata() {
if (IsCode()) {
return GetCode()->SizeIncludingMetadata();
@@ -5244,6 +5261,7 @@ int AbstractCode::SizeIncludingMetadata() {
return GetBytecodeArray()->SizeIncludingMetadata();
}
}
+
int AbstractCode::ExecutableSize() {
if (IsCode()) {
return GetCode()->ExecutableSize();
@@ -6628,6 +6646,7 @@ SMI_ACCESSORS(JSMessageObject, error_level, kErrorLevelOffset)
INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset)
INT_ACCESSORS(Code, prologue_offset, kPrologueOffset)
INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset)
+ACCESSORS(Code, stack_frame_cache, Object, kStackFrameCacheOffset)
#define CODE_ACCESSORS(name, type, offset) \
ACCESSORS_CHECKED2(Code, name, type, offset, true, \
!GetHeap()->InNewSpace(value))
@@ -6645,6 +6664,7 @@ void Code::WipeOutHeader() {
WRITE_FIELD(this, kHandlerTableOffset, NULL);
WRITE_FIELD(this, kDeoptimizationDataOffset, NULL);
WRITE_FIELD(this, kSourcePositionTableOffset, NULL);
+ WRITE_FIELD(this, kStackFrameCacheOffset, NULL);
// Do not wipe out major/minor keys on a code stub or IC
if (!READ_FIELD(this, kTypeFeedbackInfoOffset)->IsSmi()) {
WRITE_FIELD(this, kTypeFeedbackInfoOffset, NULL);
« src/isolate.cc ('K') | « src/objects-body-descriptors-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698