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

Side by Side Diff: src/objects.h

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: ready for review 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 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 #include <memory> 9 #include <memory>
10 10
(...skipping 4239 matching lines...) Expand 10 before | Expand all | Expand 10 after
4250 // Accessors for the constant pool. 4250 // Accessors for the constant pool.
4251 DECL_ACCESSORS(constant_pool, FixedArray) 4251 DECL_ACCESSORS(constant_pool, FixedArray)
4252 4252
4253 // Accessors for handler table containing offsets of exception handlers. 4253 // Accessors for handler table containing offsets of exception handlers.
4254 DECL_ACCESSORS(handler_table, FixedArray) 4254 DECL_ACCESSORS(handler_table, FixedArray)
4255 4255
4256 // Accessors for source position table containing mappings between byte code 4256 // Accessors for source position table containing mappings between byte code
4257 // offset and source position. 4257 // offset and source position.
4258 DECL_ACCESSORS(source_position_table, ByteArray) 4258 DECL_ACCESSORS(source_position_table, ByteArray)
4259 4259
4260 DECL_ACCESSORS(stack_frame_cache, Object)
4261
4260 DECLARE_CAST(BytecodeArray) 4262 DECLARE_CAST(BytecodeArray)
4261 4263
4262 // Dispatched behavior. 4264 // Dispatched behavior.
4263 inline int BytecodeArraySize(); 4265 inline int BytecodeArraySize();
4264 4266
4265 inline int instruction_size(); 4267 inline int instruction_size();
4266 4268
4267 // Returns the size of bytecode and its metadata. This includes the size of 4269 // Returns the size of bytecode and its metadata. This includes the size of
4268 // bytecode, constant pool, source position table, and handler table. 4270 // bytecode, constant pool, source position table, and handler table.
4269 inline int SizeIncludingMetadata(); 4271 inline int SizeIncludingMetadata();
(...skipping 10 matching lines...) Expand all
4280 4282
4281 // Bytecode aging 4283 // Bytecode aging
4282 bool IsOld() const; 4284 bool IsOld() const;
4283 void MakeOlder(); 4285 void MakeOlder();
4284 4286
4285 // Layout description. 4287 // Layout description.
4286 static const int kConstantPoolOffset = FixedArrayBase::kHeaderSize; 4288 static const int kConstantPoolOffset = FixedArrayBase::kHeaderSize;
4287 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize; 4289 static const int kHandlerTableOffset = kConstantPoolOffset + kPointerSize;
4288 static const int kSourcePositionTableOffset = 4290 static const int kSourcePositionTableOffset =
4289 kHandlerTableOffset + kPointerSize; 4291 kHandlerTableOffset + kPointerSize;
4290 static const int kFrameSizeOffset = kSourcePositionTableOffset + kPointerSize; 4292 static const int kStackFrameCacheOffset =
4293 kSourcePositionTableOffset + kPointerSize;
4294 static const int kFrameSizeOffset = kStackFrameCacheOffset + kPointerSize;
4291 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize; 4295 static const int kParameterSizeOffset = kFrameSizeOffset + kIntSize;
4292 static const int kInterruptBudgetOffset = kParameterSizeOffset + kIntSize; 4296 static const int kInterruptBudgetOffset = kParameterSizeOffset + kIntSize;
4293 static const int kOSRNestingLevelOffset = kInterruptBudgetOffset + kIntSize; 4297 static const int kOSRNestingLevelOffset = kInterruptBudgetOffset + kIntSize;
4294 static const int kBytecodeAgeOffset = kOSRNestingLevelOffset + kCharSize; 4298 static const int kBytecodeAgeOffset = kOSRNestingLevelOffset + kCharSize;
4295 static const int kHeaderSize = kBytecodeAgeOffset + kCharSize; 4299 static const int kHeaderSize = kBytecodeAgeOffset + kCharSize;
4296 4300
4297 // Maximal memory consumption for a single BytecodeArray. 4301 // Maximal memory consumption for a single BytecodeArray.
4298 static const int kMaxSize = 512 * MB; 4302 static const int kMaxSize = 512 * MB;
4299 // Maximal length of a single BytecodeArray. 4303 // Maximal length of a single BytecodeArray.
4300 static const int kMaxLength = kMaxSize - kHeaderSize; 4304 static const int kMaxLength = kMaxSize - kHeaderSize;
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
4663 4667
4664 // [handler_table]: Fixed array containing offsets of exception handlers. 4668 // [handler_table]: Fixed array containing offsets of exception handlers.
4665 DECL_ACCESSORS(handler_table, FixedArray) 4669 DECL_ACCESSORS(handler_table, FixedArray)
4666 4670
4667 // [deoptimization_data]: Array containing data for deopt. 4671 // [deoptimization_data]: Array containing data for deopt.
4668 DECL_ACCESSORS(deoptimization_data, FixedArray) 4672 DECL_ACCESSORS(deoptimization_data, FixedArray)
4669 4673
4670 // [source_position_table]: ByteArray for the source positions table. 4674 // [source_position_table]: ByteArray for the source positions table.
4671 DECL_ACCESSORS(source_position_table, ByteArray) 4675 DECL_ACCESSORS(source_position_table, ByteArray)
4672 4676
4677 DECL_ACCESSORS(stack_frame_cache, Object)
4678
4673 // [trap_handler_index]: An index into the trap handler's master list of code 4679 // [trap_handler_index]: An index into the trap handler's master list of code
4674 // objects. 4680 // objects.
4675 DECL_ACCESSORS(trap_handler_index, Smi) 4681 DECL_ACCESSORS(trap_handler_index, Smi)
4676 4682
4677 // [raw_type_feedback_info]: This field stores various things, depending on 4683 // [raw_type_feedback_info]: This field stores various things, depending on
4678 // the kind of the code object. 4684 // the kind of the code object.
4679 // FUNCTION => type feedback information. 4685 // FUNCTION => type feedback information.
4680 // STUB and ICs => major/minor key as Smi. 4686 // STUB and ICs => major/minor key as Smi.
4681 DECL_ACCESSORS(raw_type_feedback_info, Object) 4687 DECL_ACCESSORS(raw_type_feedback_info, Object)
4682 inline Object* type_feedback_info(); 4688 inline Object* type_feedback_info();
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
5039 static const int kConstantPoolSize = 5045 static const int kConstantPoolSize =
5040 FLAG_enable_embedded_constant_pool ? kIntSize : 0; 5046 FLAG_enable_embedded_constant_pool ? kIntSize : 0;
5041 5047
5042 // Layout description. 5048 // Layout description.
5043 static const int kRelocationInfoOffset = HeapObject::kHeaderSize; 5049 static const int kRelocationInfoOffset = HeapObject::kHeaderSize;
5044 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; 5050 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize;
5045 static const int kDeoptimizationDataOffset = 5051 static const int kDeoptimizationDataOffset =
5046 kHandlerTableOffset + kPointerSize; 5052 kHandlerTableOffset + kPointerSize;
5047 static const int kSourcePositionTableOffset = 5053 static const int kSourcePositionTableOffset =
5048 kDeoptimizationDataOffset + kPointerSize; 5054 kDeoptimizationDataOffset + kPointerSize;
5055 static const int kStackFrameCacheOffset =
5056 kSourcePositionTableOffset + kPointerSize;
5049 // For FUNCTION kind, we store the type feedback info here. 5057 // For FUNCTION kind, we store the type feedback info here.
5050 static const int kTypeFeedbackInfoOffset = 5058 static const int kTypeFeedbackInfoOffset =
5051 kSourcePositionTableOffset + kPointerSize; 5059 kStackFrameCacheOffset + kPointerSize;
5052 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize; 5060 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize;
5053 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize; 5061 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize;
5054 static const int kInstructionSizeOffset = kGCMetadataOffset + kPointerSize; 5062 static const int kInstructionSizeOffset = kGCMetadataOffset + kPointerSize;
5055 static const int kICAgeOffset = kInstructionSizeOffset + kIntSize; 5063 static const int kICAgeOffset = kInstructionSizeOffset + kIntSize;
5056 static const int kFlagsOffset = kICAgeOffset + kIntSize; 5064 static const int kFlagsOffset = kICAgeOffset + kIntSize;
5057 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; 5065 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize;
5058 static const int kKindSpecificFlags2Offset = 5066 static const int kKindSpecificFlags2Offset =
5059 kKindSpecificFlags1Offset + kIntSize; 5067 kKindSpecificFlags1Offset + kIntSize;
5060 // Note: We might be able to squeeze this into the flags above. 5068 // Note: We might be able to squeeze this into the flags above.
5061 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; 5069 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
5193 5201
5194 // Returns the size of the code instructions. 5202 // Returns the size of the code instructions.
5195 inline int instruction_size(); 5203 inline int instruction_size();
5196 5204
5197 // Return the source position table. 5205 // Return the source position table.
5198 inline ByteArray* source_position_table(); 5206 inline ByteArray* source_position_table();
5199 5207
5200 // Set the source position table. 5208 // Set the source position table.
5201 inline void set_source_position_table(ByteArray* source_position_table); 5209 inline void set_source_position_table(ByteArray* source_position_table);
5202 5210
5211 inline Object* stack_frame_cache();
5212 inline void set_stack_frame_cache(Object* stack_frame_cache);
5213
5203 // Returns the size of instructions and the metadata. 5214 // Returns the size of instructions and the metadata.
5204 inline int SizeIncludingMetadata(); 5215 inline int SizeIncludingMetadata();
5205 5216
5206 // Returns true if pc is inside this object's instructions. 5217 // Returns true if pc is inside this object's instructions.
5207 inline bool contains(byte* pc); 5218 inline bool contains(byte* pc);
5208 5219
5209 // Returns the AbstractCode::Kind of the code. 5220 // Returns the AbstractCode::Kind of the code.
5210 inline Kind kind(); 5221 inline Kind kind();
5211 5222
5212 // Calculate the size of the code object to report for log events. This takes 5223 // Calculate the size of the code object to report for log events. This takes
(...skipping 6226 matching lines...) Expand 10 before | Expand all | Expand 10 after
11439 } 11450 }
11440 }; 11451 };
11441 11452
11442 11453
11443 } // NOLINT, false-positive due to second-order macros. 11454 } // NOLINT, false-positive due to second-order macros.
11444 } // NOLINT, false-positive due to second-order macros. 11455 } // NOLINT, false-positive due to second-order macros.
11445 11456
11446 #include "src/objects/object-macros-undef.h" 11457 #include "src/objects/object-macros-undef.h"
11447 11458
11448 #endif // V8_OBJECTS_H_ 11459 #endif // V8_OBJECTS_H_
OLDNEW
« src/isolate.cc ('K') | « src/isolate.cc ('k') | src/objects-body-descriptors-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698