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

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

Issue 2987323003: [VM DBC compiler and simulator] Support reified generic functions. (Closed)
Patch Set: address review comments and sync Created 3 years, 4 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_dbc.cc ('k') | runtime/vm/simulator_dbc.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/globals.h" // Needed here to get TARGET_ARCH_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 bool using_ranges = false; 245 bool using_ranges = false;
246 for (intptr_t i = 0; i < length; i++) { 246 for (intptr_t i = 0; i < length; i++) {
247 if (!targets_[i].IsSingleCid()) { 247 if (!targets_[i].IsSingleCid()) {
248 using_ranges = true; 248 using_ranges = true;
249 break; 249 break;
250 } 250 }
251 } 251 }
252 252
253 if (using_ranges) { 253 if (using_ranges) {
254 __ PushPolymorphicInstanceCallByRange(instance_call()->ArgumentCount(), 254 __ PushPolymorphicInstanceCallByRange(
255 length); 255 instance_call()->ArgumentCountWithoutTypeArgs(), length);
256 } else { 256 } else {
257 __ PushPolymorphicInstanceCall(instance_call()->ArgumentCount(), length); 257 __ PushPolymorphicInstanceCall(
258 instance_call()->ArgumentCountWithoutTypeArgs(), length);
258 } 259 }
259 for (intptr_t i = 0; i < length; i++) { 260 for (intptr_t i = 0; i < length; i++) {
260 const Function& target = *targets_.TargetAt(i)->target; 261 const Function& target = *targets_.TargetAt(i)->target;
261 262
262 __ Nop(compiler->ToEmbeddableCid(targets_[i].cid_start, this)); 263 __ Nop(compiler->ToEmbeddableCid(targets_[i].cid_start, this));
263 if (using_ranges) { 264 if (using_ranges) {
264 __ Nop(compiler->ToEmbeddableCid(1 + targets_[i].Extent(), this)); 265 __ Nop(compiler->ToEmbeddableCid(1 + targets_[i].Extent(), this));
265 } 266 }
266 __ Nop(__ AddConstant(target)); 267 __ Nop(__ AddConstant(target));
267 } 268 }
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 } 1968 }
1968 __ IfULe(length, index); 1969 __ IfULe(length, index);
1969 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound, 1970 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound,
1970 (generalized_ ? ICData::kGeneralized : 0) | 1971 (generalized_ ? ICData::kGeneralized : 0) |
1971 (licm_hoisted_ ? ICData::kHoisted : 0)); 1972 (licm_hoisted_ ? ICData::kHoisted : 0));
1972 } 1973 }
1973 1974
1974 } // namespace dart 1975 } // namespace dart
1975 1976
1976 #endif // defined TARGET_ARCH_DBC 1977 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_dbc.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698