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

Side by Side Diff: runtime/vm/code_descriptors.cc

Issue 1657153002: Clean up global variables related to precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | runtime/vm/code_generator.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 #include "vm/code_descriptors.h" 5 #include "vm/code_descriptors.h"
6 #include "vm/compiler.h" 6 #include "vm/compiler.h"
rmacnak 2016/02/02 01:15:25 Include no longer needed
Florian Schneider 2016/02/02 02:23:01 Done. Here and in other files.
7 7
8 namespace dart { 8 namespace dart {
9 9
10 DECLARE_FLAG(bool, precompilation);
11
10 void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind, 12 void DescriptorList::AddDescriptor(RawPcDescriptors::Kind kind,
11 intptr_t pc_offset, 13 intptr_t pc_offset,
12 intptr_t deopt_id, 14 intptr_t deopt_id,
13 intptr_t token_pos, 15 intptr_t token_pos,
14 intptr_t try_index) { 16 intptr_t try_index) {
15 ASSERT((kind == RawPcDescriptors::kRuntimeCall) || 17 ASSERT((kind == RawPcDescriptors::kRuntimeCall) ||
16 (kind == RawPcDescriptors::kOther) || 18 (kind == RawPcDescriptors::kOther) ||
17 (deopt_id != Thread::kNoDeoptId)); 19 (deopt_id != Thread::kNoDeoptId));
18 20
19 // When precompiling, we only use pc descriptors for exceptions. 21 // When precompiling, we only use pc descriptors for exceptions.
20 if (Compiler::allow_recompilation() || try_index != -1) { 22 if (!FLAG_precompilation || try_index != -1) {
21 intptr_t merged_kind_try = 23 intptr_t merged_kind_try =
22 RawPcDescriptors::MergedKindTry::Encode(kind, try_index); 24 RawPcDescriptors::MergedKindTry::Encode(kind, try_index);
23 25
24 PcDescriptors::EncodeInteger(&encoded_data_, merged_kind_try); 26 PcDescriptors::EncodeInteger(&encoded_data_, merged_kind_try);
25 PcDescriptors::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset); 27 PcDescriptors::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset);
26 PcDescriptors::EncodeInteger(&encoded_data_, deopt_id - prev_deopt_id); 28 PcDescriptors::EncodeInteger(&encoded_data_, deopt_id - prev_deopt_id);
27 PcDescriptors::EncodeInteger(&encoded_data_, token_pos - prev_token_pos); 29 PcDescriptors::EncodeInteger(&encoded_data_, token_pos - prev_token_pos);
28 30
29 prev_pc_offset = pc_offset; 31 prev_pc_offset = pc_offset;
30 prev_deopt_id = deopt_id; 32 prev_deopt_id = deopt_id;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 list_[i].needs_stacktrace, 131 list_[i].needs_stacktrace,
130 has_catch_all); 132 has_catch_all);
131 handlers.SetHandledTypes(i, *list_[i].handler_types); 133 handlers.SetHandledTypes(i, *list_[i].handler_types);
132 } 134 }
133 } 135 }
134 return handlers.raw(); 136 return handlers.raw();
135 } 137 }
136 138
137 139
138 } // namespace dart 140 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698