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

Side by Side Diff: pkg/compiler/lib/src/kernel/kernel_backend_strategy.dart

Issue 2942863002: Compile and run Hello World! (Closed)
Patch Set: Cleanup Created 3 years, 6 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 library dart2js.kernel.backend_strategy; 5 library dart2js.kernel.backend_strategy;
6 6
7 import 'package:kernel/ast.dart' as ir; 7 import 'package:kernel/ast.dart' as ir;
8 8
9 import '../backend_strategy.dart'; 9 import '../backend_strategy.dart';
10 import '../closure.dart'; 10 import '../closure.dart';
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 @override 269 @override
270 void leaveInlinedMember(MemberEntity member) { 270 void leaveInlinedMember(MemberEntity member) {
271 assert(member == currentMember); 271 assert(member == currentMember);
272 _members.removeLast(); 272 _members.removeLast();
273 } 273 }
274 274
275 @override 275 @override
276 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}) { 276 JumpTarget getJumpTarget(ir.TreeNode node, {bool isContinueTarget: false}) {
277 throw new UnimplementedError('KernelToLocalsMapImpl.getJumpTarget'); 277 // TODO(johnniwinther): Support jump targets.
278 return null;
Emily Fortuna 2017/06/15 17:54:34 is this really better than throwing? I mean, it ge
Siggi Cherem (dart-lang) 2017/06/15 18:28:55 one option here: throw in checked mode only?
Johnni Winther 2017/06/16 09:25:31 This is the price for the machete approach. We nee
Siggi Cherem (dart-lang) 2017/06/16 16:35:24 How about: if (const bool.fromEnvironment("MACHET
Johnni Winther 2017/06/19 10:57:38 I'll consider it.
278 } 279 }
279 280
280 @override 281 @override
281 Local getLocal(ir.VariableDeclaration node) { 282 Local getLocal(ir.VariableDeclaration node) {
282 return _map.putIfAbsent(node, () { 283 return _map.putIfAbsent(node, () {
283 return new KLocal(node.name, currentMember); 284 return new KLocal(node.name, currentMember);
284 }); 285 });
285 } 286 }
286 287
287 @override 288 @override
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { 384 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) {
384 return classes.toList() 385 return classes.toList()
385 ..sort((ClassEntity a, ClassEntity b) { 386 ..sort((ClassEntity a, ClassEntity b) {
386 int r = _compareLibraries(a.library, b.library); 387 int r = _compareLibraries(a.library, b.library);
387 if (r != 0) return r; 388 if (r != 0) return r;
388 return _compareNodes( 389 return _compareNodes(
389 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); 390 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b));
390 }); 391 });
391 } 392 }
392 } 393 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698