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

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

Issue 2693423003: Clean up deferred checks in 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: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 '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 return classMap.callElement; 589 return classMap.callElement;
590 } 590 }
591 Element element = astAdapter.getElement(target); 591 Element element = astAdapter.getElement(target);
592 return element; 592 return element;
593 } 593 }
594 594
595 @override 595 @override
596 void visitCheckLibraryIsLoaded(ir.CheckLibraryIsLoaded checkLoad) { 596 void visitCheckLibraryIsLoaded(ir.CheckLibraryIsLoaded checkLoad) {
597 HInstruction prefixConstant = graph.addConstantString( 597 HInstruction prefixConstant = graph.addConstantString(
598 new DartString.literal(checkLoad.import.name), closedWorld); 598 new DartString.literal(checkLoad.import.name), closedWorld);
599 var prefixElement = astAdapter.getElement(checkLoad.import);
599 HInstruction uriConstant = graph.addConstantString( 600 HInstruction uriConstant = graph.addConstantString(
600 new DartString.literal(compiler.deferredLoadTask.getImportDeferName( 601 new DartString.literal(prefixElement.deferredImport.uri.toString()),
sra1 2017/02/15 23:55:31 Is this the short form?
Emily Fortuna 2017/02/16 02:21:56 yup. this is the short form.
601 // TODO(efortuna): Source information.
602 null,
603 astAdapter.getElement(checkLoad.import))),
604 closedWorld); 602 closedWorld);
605 _pushStaticInvocation(astAdapter.checkDeferredIsLoaded, 603 _pushStaticInvocation(astAdapter.checkDeferredIsLoaded,
606 [prefixConstant, uriConstant], astAdapter.checkDeferredIsLoadedType); 604 [prefixConstant, uriConstant], astAdapter.checkDeferredIsLoadedType);
607 } 605 }
608 606
609 @override 607 @override
610 void visitLoadLibrary(ir.LoadLibrary loadLibrary) { 608 void visitLoadLibrary(ir.LoadLibrary loadLibrary) {
611 // TODO(efortuna): Source information! 609 // TODO(efortuna): Source information!
612 push(new HInvokeStatic( 610 push(new HInvokeStatic(
613 backend.helpers.loadLibraryWrapper, 611 backend.helpers.loadLibraryWrapper,
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3255 enterBlock.setBlockFlow( 3253 enterBlock.setBlockFlow(
3256 new HTryBlockInformation( 3254 new HTryBlockInformation(
3257 kernelBuilder.wrapStatementGraph(bodyGraph), 3255 kernelBuilder.wrapStatementGraph(bodyGraph),
3258 exception, 3256 exception,
3259 kernelBuilder.wrapStatementGraph(catchGraph), 3257 kernelBuilder.wrapStatementGraph(catchGraph),
3260 kernelBuilder.wrapStatementGraph(finallyGraph)), 3258 kernelBuilder.wrapStatementGraph(finallyGraph)),
3261 exitBlock); 3259 exitBlock);
3262 kernelBuilder.inTryStatement = previouslyInTryStatement; 3260 kernelBuilder.inTryStatement = previouslyInTryStatement;
3263 } 3261 }
3264 } 3262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698