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

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

Issue 1740503002: Build CodeSourceMap for each code object (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.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 (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 VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 4022 matching lines...) Expand 10 before | Expand all | Expand 10 after
4033 static RawCodeSourceMap* New(GrowableArray<uint8_t>* delta_encoded_data); 4033 static RawCodeSourceMap* New(GrowableArray<uint8_t>* delta_encoded_data);
4034 4034
4035 void PrintToJSONObject(JSONObject* jsobj, bool ref) const; 4035 void PrintToJSONObject(JSONObject* jsobj, bool ref) const;
4036 4036
4037 // Encode integer in SLEB128 format. 4037 // Encode integer in SLEB128 format.
4038 static void EncodeInteger(GrowableArray<uint8_t>* data, intptr_t value); 4038 static void EncodeInteger(GrowableArray<uint8_t>* data, intptr_t value);
4039 4039
4040 // Decode SLEB128 encoded integer. Update byte_index to the next integer. 4040 // Decode SLEB128 encoded integer. Update byte_index to the next integer.
4041 intptr_t DecodeInteger(intptr_t* byte_index) const; 4041 intptr_t DecodeInteger(intptr_t* byte_index) const;
4042 4042
4043 TokenPosition TokenPositionForPCOffset(uword pc_offset) const;
4044 RawFunction* FunctionForPCOffset(const Code& code,
4045 const Function& function,
4046 uword pc_offset) const;
4047 RawScript* ScriptForPCOffset(const Code& code,
4048 const Function& function,
4049 uword pc_offset) const;
4050
4051 static void Dump(const CodeSourceMap& code_source_map,
4052 const Code& code,
4053 const Function& function);
4054
4043 class Iterator : ValueObject { 4055 class Iterator : ValueObject {
4044 public: 4056 public:
4045 explicit Iterator(const CodeSourceMap& code_source_map) 4057 explicit Iterator(const CodeSourceMap& code_source_map)
4046 : code_source_map_(code_source_map), 4058 : code_source_map_(code_source_map),
4047 byte_index_(0), 4059 byte_index_(0),
4048 cur_pc_offset_(0), 4060 cur_pc_offset_(0),
4049 cur_token_pos_(0) { 4061 cur_token_pos_(0) {
4050 } 4062 }
4051 4063
4052 bool MoveNext() { 4064 bool MoveNext() {
(...skipping 4362 matching lines...) Expand 10 before | Expand all | Expand 10 after
8415 8427
8416 8428
8417 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8429 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8418 intptr_t index) { 8430 intptr_t index) {
8419 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8431 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8420 } 8432 }
8421 8433
8422 } // namespace dart 8434 } // namespace dart
8423 8435
8424 #endif // VM_OBJECT_H_ 8436 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698