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

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

Issue 2410863004: DBC: Use type cache for more checks (Closed)
Patch Set: Created 4 years, 2 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 | 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) 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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 216
217 void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos, 217 void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos,
218 intptr_t deopt_id, 218 intptr_t deopt_id,
219 const AbstractType& dst_type, 219 const AbstractType& dst_type,
220 const String& dst_name, 220 const String& dst_name,
221 LocationSummary* locs) { 221 LocationSummary* locs) {
222 SubtypeTestCache& test_cache = SubtypeTestCache::Handle(); 222 SubtypeTestCache& test_cache = SubtypeTestCache::Handle();
223 if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) { 223 if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) {
224 test_cache = SubtypeTestCache::New(); 224 test_cache = SubtypeTestCache::New();
225 } else if (!dst_type.IsInstantiated() &&
226 (dst_type.IsTypeParameter() || dst_type.IsType())) {
227 test_cache = SubtypeTestCache::New();
225 } 228 }
226 229
227 if (is_optimizing()) { 230 if (is_optimizing()) {
228 __ Push(locs->in(0).reg()); 231 __ Push(locs->in(0).reg());
229 __ Push(locs->in(1).reg()); 232 __ Push(locs->in(1).reg());
230 } 233 }
231 __ PushConstant(dst_type); 234 __ PushConstant(dst_type);
232 __ PushConstant(dst_name); 235 __ PushConstant(dst_name);
233 236
234 if (dst_type.IsMalformedOrMalbounded()) { 237 if (dst_type.IsMalformedOrMalbounded()) {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 560 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
558 UNIMPLEMENTED(); 561 UNIMPLEMENTED();
559 } 562 }
560 563
561 564
562 #undef __ 565 #undef __
563 566
564 } // namespace dart 567 } // namespace dart
565 568
566 #endif // defined TARGET_ARCH_DBC 569 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698