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

Unified Diff: runtime/vm/code_descriptors.cc

Issue 1644793002: Replace intptr_t with TokenDescriptor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors.cc
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index 7f390a123d3026607187fa8b7cd942896f08535d..a286a044cca111565289eee13814bea270ed26ce 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -11,7 +11,7 @@ DECLARE_FLAG(bool, precompilation);
void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind,
intptr_t pc_offset,
intptr_t deopt_id,
- intptr_t token_pos,
+ TokenPosition token_pos,
intptr_t try_index) {
ASSERT((kind == RawPcDescriptors::kRuntimeCall) ||
(kind == RawPcDescriptors::kOther) ||
@@ -25,11 +25,12 @@ void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind,
PcDescriptors::EncodeInteger(&encoded_data_, merged_kind_try);
PcDescriptors::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset);
PcDescriptors::EncodeInteger(&encoded_data_, deopt_id - prev_deopt_id);
- PcDescriptors::EncodeInteger(&encoded_data_, token_pos - prev_token_pos);
+ PcDescriptors::EncodeInteger(&encoded_data_,
+ token_pos.value() - prev_token_pos);
prev_pc_offset = pc_offset;
prev_deopt_id = deopt_id;
- prev_token_pos = token_pos;
+ prev_token_pos = token_pos.value();
}
}
@@ -44,12 +45,13 @@ RawPcDescriptors* DescriptorList::FinalizePcDescriptors(uword entry_point) {
void CodeSourceMapBuilder::AddEntry(intptr_t pc_offset,
- intptr_t token_pos) {
+ TokenPosition token_pos) {
CodeSourceMap::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset);
- CodeSourceMap::EncodeInteger(&encoded_data_, token_pos - prev_token_pos);
+ CodeSourceMap::EncodeInteger(&encoded_data_,
+ token_pos.value() - prev_token_pos);
prev_pc_offset = pc_offset;
- prev_token_pos = token_pos;
+ prev_token_pos = token_pos.value();
}
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698