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

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

Issue 1334203002: Compute Compiler.proxyConstant on demand. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 class SsaCodeGeneratorTask extends CompilerTask { 7 class SsaCodeGeneratorTask extends CompilerTask {
8 8
9 final JavaScriptBackend backend; 9 final JavaScriptBackend backend;
10 final SourceInformationStrategy sourceInformationFactory; 10 final SourceInformationStrategy sourceInformationFactory;
(...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after
2687 return pop(); 2687 return pop();
2688 } else if (checkedType.containsOnlyBool(classWorld)) { 2688 } else if (checkedType.containsOnlyBool(classWorld)) {
2689 // input is !bool 2689 // input is !bool
2690 checkBool(input, '!==', input.sourceInformation); 2690 checkBool(input, '!==', input.sourceInformation);
2691 return pop(); 2691 return pop();
2692 } else if (checkedType.containsOnlyString(classWorld)) { 2692 } else if (checkedType.containsOnlyString(classWorld)) {
2693 // input is !string 2693 // input is !string
2694 checkString(input, '!==', input.sourceInformation); 2694 checkString(input, '!==', input.sourceInformation);
2695 return pop(); 2695 return pop();
2696 } 2696 }
2697 compiler.internalError(input, 'Unexpected check.'); 2697 compiler.internalError(input, 'Unexpected check: $checkedType.');
2698 return null; 2698 return null;
2699 } 2699 }
2700 2700
2701 void visitTypeConversion(HTypeConversion node) { 2701 void visitTypeConversion(HTypeConversion node) {
2702 if (node.isArgumentTypeCheck || node.isReceiverTypeCheck) { 2702 if (node.isArgumentTypeCheck || node.isReceiverTypeCheck) {
2703 ClassWorld classWorld = compiler.world; 2703 ClassWorld classWorld = compiler.world;
2704 // An int check if the input is not int or null, is not 2704 // An int check if the input is not int or null, is not
2705 // sufficient for doing an argument or receiver check. 2705 // sufficient for doing an argument or receiver check.
2706 assert(compiler.trustTypeAnnotations || 2706 assert(compiler.trustTypeAnnotations ||
2707 !node.checkedType.containsOnlyInt(classWorld) || 2707 !node.checkedType.containsOnlyInt(classWorld) ||
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 } 2863 }
2864 registry.registerStaticUse(helper); 2864 registry.registerStaticUse(helper);
2865 return backend.emitter.staticFunctionAccess(helper); 2865 return backend.emitter.staticFunctionAccess(helper);
2866 } 2866 }
2867 2867
2868 @override 2868 @override
2869 void visitRef(HRef node) { 2869 void visitRef(HRef node) {
2870 visit(node.value); 2870 visit(node.value);
2871 } 2871 }
2872 } 2872 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698