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

Side by Side Diff: runtime/vm/raw_object.h

Issue 2670843006: Encode inlining information in CodeSourceMap and remove inlining interval arrays. (Closed)
Patch Set: . Created 3 years, 10 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 | « runtime/vm/profiler_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 // If owner_ is a Class the owner is the allocation stub for that class. 1136 // If owner_ is a Class the owner is the allocation stub for that class.
1137 // Else, owner_ is a regular Dart Function. 1137 // Else, owner_ is a regular Dart Function.
1138 RawObject* owner_; // Function, Null, or a Class. 1138 RawObject* owner_; // Function, Null, or a Class.
1139 RawExceptionHandlers* exception_handlers_; 1139 RawExceptionHandlers* exception_handlers_;
1140 RawPcDescriptors* pc_descriptors_; 1140 RawPcDescriptors* pc_descriptors_;
1141 RawArray* stackmaps_; 1141 RawArray* stackmaps_;
1142 NOT_IN_PRECOMPILED(RawInstructions* active_instructions_); 1142 NOT_IN_PRECOMPILED(RawInstructions* active_instructions_);
1143 NOT_IN_PRECOMPILED(RawArray* deopt_info_array_); 1143 NOT_IN_PRECOMPILED(RawArray* deopt_info_array_);
1144 // (code-offset, function, code) triples. 1144 // (code-offset, function, code) triples.
1145 NOT_IN_PRECOMPILED(RawArray* static_calls_target_table_); 1145 NOT_IN_PRECOMPILED(RawArray* static_calls_target_table_);
1146 NOT_IN_PRECOMPILED(RawArray* inlined_metadata_); 1146 NOT_IN_PRECOMPILED(RawArray* inlined_id_to_function_);
1147 // If return_address_metadata_ is a Smi, it is the offset to the prologue. 1147 // If return_address_metadata_ is a Smi, it is the offset to the prologue.
1148 // Else, return_address_metadata_ is null. 1148 // Else, return_address_metadata_ is null.
1149 NOT_IN_PRECOMPILED(RawObject* return_address_metadata_); 1149 NOT_IN_PRECOMPILED(RawObject* return_address_metadata_);
1150 NOT_IN_PRECOMPILED(RawLocalVarDescriptors* var_descriptors_); 1150 NOT_IN_PRECOMPILED(RawLocalVarDescriptors* var_descriptors_);
1151 NOT_IN_PRECOMPILED(RawCodeSourceMap* code_source_map_); 1151 NOT_IN_PRECOMPILED(RawCodeSourceMap* code_source_map_);
1152 NOT_IN_PRECOMPILED(RawArray* comments_); 1152 NOT_IN_PRECOMPILED(RawArray* comments_);
1153 RawObject** to() { 1153 RawObject** to() {
1154 #if defined(DART_PRECOMPILED_RUNTIME) 1154 #if defined(DART_PRECOMPILED_RUNTIME)
1155 return reinterpret_cast<RawObject**>(&ptr()->stackmaps_); 1155 return reinterpret_cast<RawObject**>(&ptr()->stackmaps_);
1156 #else 1156 #else
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 int32_t length_; // Number of descriptors. 1283 int32_t length_; // Number of descriptors.
1284 1284
1285 // Variable length data follows here. 1285 // Variable length data follows here.
1286 uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); } 1286 uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); }
1287 const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, intptr_t); } 1287 const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, intptr_t); }
1288 1288
1289 friend class Object; 1289 friend class Object;
1290 }; 1290 };
1291 1291
1292 1292
1293 // CodeSourceMap stores a mapping between code PC ranges and source token 1293 // CodeSourceMap encodes a mapping from code PC ranges to source token
1294 // positions. 1294 // positions and the stack of inlined functions.
1295 class RawCodeSourceMap : public RawObject { 1295 class RawCodeSourceMap : public RawObject {
1296 private: 1296 private:
1297 RAW_HEAP_OBJECT_IMPLEMENTATION(CodeSourceMap); 1297 RAW_HEAP_OBJECT_IMPLEMENTATION(CodeSourceMap);
1298 1298
1299 int32_t length_; // Number of entries. 1299 int32_t length_; // Length in bytes.
1300 1300
1301 // Variable length data follows here. 1301 // Variable length data follows here.
1302 uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); } 1302 uint8_t* data() { OPEN_ARRAY_START(uint8_t, intptr_t); }
1303 const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, intptr_t); } 1303 const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, intptr_t); }
1304 1304
1305 friend class Object; 1305 friend class Object;
1306 }; 1306 };
1307 1307
1308 1308
1309 // StackMap is an immutable representation of the layout of the stack at a 1309 // StackMap is an immutable representation of the layout of the stack at a
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2438 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2439 kTypedDataInt8ArrayViewCid + 15); 2439 kTypedDataInt8ArrayViewCid + 15);
2440 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2440 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2441 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2441 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2442 return (kNullCid - kTypedDataInt8ArrayCid); 2442 return (kNullCid - kTypedDataInt8ArrayCid);
2443 } 2443 }
2444 2444
2445 } // namespace dart 2445 } // namespace dart
2446 2446
2447 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2447 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/profiler_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698