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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // - AccessCheckInfo 138 // - AccessCheckInfo
139 // - InterceptorInfo 139 // - InterceptorInfo
140 // - CallHandlerInfo 140 // - CallHandlerInfo
141 // - TemplateInfo 141 // - TemplateInfo
142 // - FunctionTemplateInfo 142 // - FunctionTemplateInfo
143 // - ObjectTemplateInfo 143 // - ObjectTemplateInfo
144 // - Script 144 // - Script
145 // - DebugInfo 145 // - DebugInfo
146 // - BreakPointInfo 146 // - BreakPointInfo
147 // - StackFrameInfo 147 // - StackFrameInfo
148 // - SourcePositionTableWithFrameCache
148 // - CodeCache 149 // - CodeCache
149 // - PrototypeInfo 150 // - PrototypeInfo
150 // - Module 151 // - Module
151 // - ModuleInfoEntry 152 // - ModuleInfoEntry
152 // - WeakCell 153 // - WeakCell
153 // 154 //
154 // Formats of Object*: 155 // Formats of Object*:
155 // Smi: [31 bit signed int] 0 156 // Smi: [31 bit signed int] 0
156 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01 157 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01
157 158
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 V(External) \ 1092 V(External) \
1092 V(Struct) \ 1093 V(Struct) \
1093 V(Cell) \ 1094 V(Cell) \
1094 V(TemplateList) \ 1095 V(TemplateList) \
1095 V(PropertyCell) \ 1096 V(PropertyCell) \
1096 V(WeakCell) \ 1097 V(WeakCell) \
1097 V(ObjectHashTable) \ 1098 V(ObjectHashTable) \
1098 V(ObjectHashSet) \ 1099 V(ObjectHashSet) \
1099 V(WeakHashTable) \ 1100 V(WeakHashTable) \
1100 V(OrderedHashTable) \ 1101 V(OrderedHashTable) \
1101 V(SloppyArgumentsElements) 1102 V(SloppyArgumentsElements) \
1103 V(SourcePositionTableWithFrameCache)
1102 1104
1103 #define ODDBALL_LIST(V) \ 1105 #define ODDBALL_LIST(V) \
1104 V(Undefined, undefined_value) \ 1106 V(Undefined, undefined_value) \
1105 V(Null, null_value) \ 1107 V(Null, null_value) \
1106 V(TheHole, the_hole_value) \ 1108 V(TheHole, the_hole_value) \
1107 V(Exception, exception) \ 1109 V(Exception, exception) \
1108 V(Uninitialized, uninitialized_value) \ 1110 V(Uninitialized, uninitialized_value) \
1109 V(True, true_value) \ 1111 V(True, true_value) \
1110 V(False, false_value) \ 1112 V(False, false_value) \
1111 V(ArgumentsMarker, arguments_marker) \ 1113 V(ArgumentsMarker, arguments_marker) \
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after
3287 inline Age bytecode_age() const; 3289 inline Age bytecode_age() const;
3288 inline void set_bytecode_age(Age age); 3290 inline void set_bytecode_age(Age age);
3289 3291
3290 // Accessors for the constant pool. 3292 // Accessors for the constant pool.
3291 DECL_ACCESSORS(constant_pool, FixedArray) 3293 DECL_ACCESSORS(constant_pool, FixedArray)
3292 3294
3293 // Accessors for handler table containing offsets of exception handlers. 3295 // Accessors for handler table containing offsets of exception handlers.
3294 DECL_ACCESSORS(handler_table, FixedArray) 3296 DECL_ACCESSORS(handler_table, FixedArray)
3295 3297
3296 // Accessors for source position table containing mappings between byte code 3298 // Accessors for source position table containing mappings between byte code
3297 // offset and source position. 3299 // offset and source position or SourcePositionTableWithFrameCache.
3298 DECL_ACCESSORS(source_position_table, ByteArray) 3300 DECL_ACCESSORS(source_position_table, Object)
3301
3302 inline ByteArray* SourcePositionTable();
3299 3303
3300 DECLARE_CAST(BytecodeArray) 3304 DECLARE_CAST(BytecodeArray)
3301 3305
3302 // Dispatched behavior. 3306 // Dispatched behavior.
3303 inline int BytecodeArraySize(); 3307 inline int BytecodeArraySize();
3304 3308
3305 inline int instruction_size(); 3309 inline int instruction_size();
3306 3310
3307 // Returns the size of bytecode and its metadata. This includes the size of 3311 // Returns the size of bytecode and its metadata. This includes the size of
3308 // bytecode, constant pool, source position table, and handler table. 3312 // bytecode, constant pool, source position table, and handler table.
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
3700 DECL_ACCESSORS(relocation_info, ByteArray) 3704 DECL_ACCESSORS(relocation_info, ByteArray)
3701 void InvalidateRelocation(); 3705 void InvalidateRelocation();
3702 void InvalidateEmbeddedObjects(); 3706 void InvalidateEmbeddedObjects();
3703 3707
3704 // [handler_table]: Fixed array containing offsets of exception handlers. 3708 // [handler_table]: Fixed array containing offsets of exception handlers.
3705 DECL_ACCESSORS(handler_table, FixedArray) 3709 DECL_ACCESSORS(handler_table, FixedArray)
3706 3710
3707 // [deoptimization_data]: Array containing data for deopt. 3711 // [deoptimization_data]: Array containing data for deopt.
3708 DECL_ACCESSORS(deoptimization_data, FixedArray) 3712 DECL_ACCESSORS(deoptimization_data, FixedArray)
3709 3713
3710 // [source_position_table]: ByteArray for the source positions table. 3714 // [source_position_table]: ByteArray for the source positions table or
3711 DECL_ACCESSORS(source_position_table, ByteArray) 3715 // SourcePositionTableWithFrameCache.
3716 DECL_ACCESSORS(source_position_table, Object)
3717
3718 inline ByteArray* SourcePositionTable();
3712 3719
3713 // [trap_handler_index]: An index into the trap handler's master list of code 3720 // [trap_handler_index]: An index into the trap handler's master list of code
3714 // objects. 3721 // objects.
3715 DECL_ACCESSORS(trap_handler_index, Smi) 3722 DECL_ACCESSORS(trap_handler_index, Smi)
3716 3723
3717 // [raw_type_feedback_info]: This field stores various things, depending on 3724 // [raw_type_feedback_info]: This field stores various things, depending on
3718 // the kind of the code object. 3725 // the kind of the code object.
3719 // FUNCTION => type feedback information. 3726 // FUNCTION => type feedback information.
3720 // STUB and ICs => major/minor key as Smi. 3727 // STUB and ICs => major/minor key as Smi.
3721 DECL_ACCESSORS(raw_type_feedback_info, Object) 3728 DECL_ACCESSORS(raw_type_feedback_info, Object)
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
4233 4240
4234 // Returns the size of the code instructions. 4241 // Returns the size of the code instructions.
4235 inline int instruction_size(); 4242 inline int instruction_size();
4236 4243
4237 // Return the source position table. 4244 // Return the source position table.
4238 inline ByteArray* source_position_table(); 4245 inline ByteArray* source_position_table();
4239 4246
4240 // Set the source position table. 4247 // Set the source position table.
4241 inline void set_source_position_table(ByteArray* source_position_table); 4248 inline void set_source_position_table(ByteArray* source_position_table);
4242 4249
4250 inline Object* stack_frame_cache();
4251 static void SetStackFrameCache(Handle<AbstractCode> abstract_code,
4252 Handle<UnseededNumberDictionary> cache);
4253 void DropStackFrameCache();
4254
4243 // Returns the size of instructions and the metadata. 4255 // Returns the size of instructions and the metadata.
4244 inline int SizeIncludingMetadata(); 4256 inline int SizeIncludingMetadata();
4245 4257
4246 // Returns true if pc is inside this object's instructions. 4258 // Returns true if pc is inside this object's instructions.
4247 inline bool contains(byte* pc); 4259 inline bool contains(byte* pc);
4248 4260
4249 // Returns the AbstractCode::Kind of the code. 4261 // Returns the AbstractCode::Kind of the code.
4250 inline Kind kind(); 4262 inline Kind kind();
4251 4263
4252 // Calculate the size of the code object to report for log events. This takes 4264 // Calculate the size of the code object to report for log events. This takes
(...skipping 5887 matching lines...) Expand 10 before | Expand all | Expand 10 after
10140 10152
10141 private: 10153 private:
10142 // Bit position in the flag, from least significant bit position. 10154 // Bit position in the flag, from least significant bit position.
10143 static const int kIsEvalBit = 0; 10155 static const int kIsEvalBit = 0;
10144 static const int kIsConstructorBit = 1; 10156 static const int kIsConstructorBit = 1;
10145 static const int kIsWasmBit = 2; 10157 static const int kIsWasmBit = 2;
10146 10158
10147 DISALLOW_IMPLICIT_CONSTRUCTORS(StackFrameInfo); 10159 DISALLOW_IMPLICIT_CONSTRUCTORS(StackFrameInfo);
10148 }; 10160 };
10149 10161
10162 class SourcePositionTableWithFrameCache : public Tuple2 {
10163 public:
10164 DECL_ACCESSORS(source_position_table, ByteArray)
10165 DECL_ACCESSORS(stack_frame_cache, UnseededNumberDictionary)
10166
10167 DECLARE_CAST(SourcePositionTableWithFrameCache)
10168
10169 static const int kSourcePositionTableIndex = Struct::kHeaderSize;
10170 static const int kStackFrameCacheIndex =
10171 kSourcePositionTableIndex + kPointerSize;
10172 static const int kSize = kStackFrameCacheIndex + kPointerSize;
10173
10174 private:
10175 DISALLOW_IMPLICIT_CONSTRUCTORS(SourcePositionTableWithFrameCache);
10176 };
10177
10150 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ 10178 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
10151 V(kStringTable, "string_table", "(Internalized strings)") \ 10179 V(kStringTable, "string_table", "(Internalized strings)") \
10152 V(kExternalStringsTable, "external_strings_table", "(External strings)") \ 10180 V(kExternalStringsTable, "external_strings_table", "(External strings)") \
10153 V(kStrongRootList, "strong_root_list", "(Strong roots)") \ 10181 V(kStrongRootList, "strong_root_list", "(Strong roots)") \
10154 V(kSmiRootList, "smi_root_list", "(Smi roots)") \ 10182 V(kSmiRootList, "smi_root_list", "(Smi roots)") \
10155 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \ 10183 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \
10156 V(kTop, "top", "(Isolate)") \ 10184 V(kTop, "top", "(Isolate)") \
10157 V(kRelocatable, "relocatable", "(Relocatable)") \ 10185 V(kRelocatable, "relocatable", "(Relocatable)") \
10158 V(kDebug, "debug", "(Debugger)") \ 10186 V(kDebug, "debug", "(Debugger)") \
10159 V(kCompilationCache, "compilationcache", "(Compilation cache)") \ 10187 V(kCompilationCache, "compilationcache", "(Compilation cache)") \
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
10253 } 10281 }
10254 }; 10282 };
10255 10283
10256 10284
10257 } // NOLINT, false-positive due to second-order macros. 10285 } // NOLINT, false-positive due to second-order macros.
10258 } // NOLINT, false-positive due to second-order macros. 10286 } // NOLINT, false-positive due to second-order macros.
10259 10287
10260 #include "src/objects/object-macros-undef.h" 10288 #include "src/objects/object-macros-undef.h"
10261 10289
10262 #endif // V8_OBJECTS_H_ 10290 #endif // V8_OBJECTS_H_
OLDNEW
« 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