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

Side by Side Diff: pkg/compiler/lib/src/inferrer/builder_kernel.dart

Issue 3009633002: Add tests for list and async marker (Closed)
Patch Set: Created 3 years, 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../elements/entities.dart'; 10 import '../elements/entities.dart';
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 elementType = elementType == null 175 elementType = elementType == null
176 ? types.allocatePhi(null, null, type, isTry: false) 176 ? types.allocatePhi(null, null, type, isTry: false)
177 : types.addPhiInput(null, elementType, type); 177 : types.addPhiInput(null, elementType, type);
178 length++; 178 length++;
179 } 179 }
180 elementType = elementType == null 180 elementType = elementType == null
181 ? types.nonNullEmpty() 181 ? types.nonNullEmpty()
182 : types.simplifyPhi(null, null, elementType); 182 : types.simplifyPhi(null, null, elementType);
183 TypeInformation containerType = 183 TypeInformation containerType =
184 listLiteral.isConst ? types.constListType : types.growableListType; 184 listLiteral.isConst ? types.constListType : types.growableListType;
185 // TODO(efortuna): Change signature of allocateList and the rest of
186 // type_system to deal with Kernel elements.
187 return types.allocateList( 185 return types.allocateList(
188 containerType, listLiteral, analyzedMember, elementType, length); 186 containerType, listLiteral, analyzedMember, elementType, length);
189 }); 187 });
190 } 188 }
191 189
192 @override 190 @override
193 TypeInformation visitReturnStatement(ir.ReturnStatement node) { 191 TypeInformation visitReturnStatement(ir.ReturnStatement node) {
194 ir.Node expression = node.expression; 192 ir.Node expression = node.expression;
195 recordReturnType( 193 recordReturnType(
196 expression == null ? types.nullType : expression.accept(this)); 194 expression == null ? types.nullType : expression.accept(this));
197 locals.seenReturnOrThrow = true; 195 locals.seenReturnOrThrow = true;
198 initializationIsIndefinite(); 196 initializationIsIndefinite();
199 return null; 197 return null;
200 } 198 }
201 } 199 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/ast_inferrer_engine.dart ('k') | pkg/compiler/lib/src/inferrer/closure_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698