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

Side by Side Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2691753002: Add deferred loading to Kernel. (Closed)
Patch Set: . Created 3 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
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 import 'package:js_runtime/shared/embedded_names.dart'; 5 import 'package:js_runtime/shared/embedded_names.dart';
6 import 'package:kernel/ast.dart' as ir; 6 import 'package:kernel/ast.dart' as ir;
7 7
8 import '../common.dart'; 8 import '../common.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 return _jumpTargets.putIfAbsent(node, () { 348 return _jumpTargets.putIfAbsent(node, () {
349 if (node is ir.LabeledStatement && 349 if (node is ir.LabeledStatement &&
350 _jumpTargets.containsKey((node as ir.LabeledStatement).body)) { 350 _jumpTargets.containsKey((node as ir.LabeledStatement).body)) {
351 return _jumpTargets[(node as ir.LabeledStatement).body]; 351 return _jumpTargets[(node as ir.LabeledStatement).body];
352 } 352 }
353 return new KernelJumpTarget(node, this, 353 return new KernelJumpTarget(node, this,
354 makeContinueLabel: isContinueTarget); 354 makeContinueLabel: isContinueTarget);
355 }); 355 });
356 } 356 }
357 357
358 ir.Procedure get checkDeferredIsLoaded =>
359 kernel.functions[_backend.helpers.checkDeferredIsLoaded];
360
361 TypeMask get checkDeferredIsLoadedType =>
362 TypeMaskFactory.inferredReturnTypeForElement(
363 _backend.helpers.checkDeferredIsLoaded, _globalInferenceResults);
364
358 ir.Procedure get createInvocationMirror => 365 ir.Procedure get createInvocationMirror =>
359 kernel.functions[_backend.helpers.createInvocationMirror]; 366 kernel.functions[_backend.helpers.createInvocationMirror];
360 367
361 ir.Class get mapLiteralClass => 368 ir.Class get mapLiteralClass =>
362 kernel.classes[_backend.helpers.mapLiteralClass]; 369 kernel.classes[_backend.helpers.mapLiteralClass];
363 370
364 ir.Procedure get mapLiteralConstructor => 371 ir.Procedure get mapLiteralConstructor =>
365 kernel.functions[_backend.helpers.mapLiteralConstructor]; 372 kernel.functions[_backend.helpers.mapLiteralConstructor];
366 373
367 ir.Procedure get mapLiteralConstructorEmpty => 374 ir.Procedure get mapLiteralConstructorEmpty =>
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 JumpTarget continueTarget = 791 JumpTarget continueTarget =
785 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); 792 astAdapter.getJumpTarget(switchCase, isContinueTarget: true);
786 assert(continueTarget is KernelJumpTarget); 793 assert(continueTarget is KernelJumpTarget);
787 targetIndexMap[continueTarget] = switchIndex; 794 targetIndexMap[continueTarget] = switchIndex;
788 assert(builder.jumpTargets[continueTarget] == null); 795 assert(builder.jumpTargets[continueTarget] == null);
789 builder.jumpTargets[continueTarget] = this; 796 builder.jumpTargets[continueTarget] = this;
790 switchIndex++; 797 switchIndex++;
791 } 798 }
792 } 799 }
793 } 800 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698