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

Side by Side Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10828416: Small changes to get the compilation size of code importing dart:html shorter. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 final JavaScriptBackend backend; 6 final JavaScriptBackend backend;
7 SsaCodeGeneratorTask(JavaScriptBackend backend) 7 SsaCodeGeneratorTask(JavaScriptBackend backend)
8 : this.backend = backend, 8 : this.backend = backend,
9 super(backend.compiler); 9 super(backend.compiler);
10 String get name() => 'SSA code generator'; 10 String get name() => 'SSA code generator';
(...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 } 2041 }
2042 if (name == const SourceString('removeLast') && arity == 0) { 2042 if (name == const SourceString('removeLast') && arity == 0) {
2043 return 'pop'; 2043 return 'pop';
2044 } 2044 }
2045 } else if (receiver.isString(types) && !getter) { 2045 } else if (receiver.isString(types) && !getter) {
2046 if (name == const SourceString('concat') && 2046 if (name == const SourceString('concat') &&
2047 arity == 1 && 2047 arity == 1 &&
2048 interceptor.inputs[2].isString(types)) { 2048 interceptor.inputs[2].isString(types)) {
2049 return '+'; 2049 return '+';
2050 } 2050 }
2051 if (name == const SourceString('split') &&
2052 arity == 1 &&
2053 interceptor.inputs[2].isString(types)) {
2054 return 'split';
2055 }
2051 } 2056 }
2052 2057
2053 return null; 2058 return null;
2054 } 2059 }
2055 2060
2056 void visitInvokeInterceptor(HInvokeInterceptor node) { 2061 void visitInvokeInterceptor(HInvokeInterceptor node) {
2057 String builtin = builtinJsName(node); 2062 String builtin = builtinJsName(node);
2058 if (builtin !== null) { 2063 if (builtin !== null) {
2059 if (builtin == '+') { 2064 if (builtin == '+') {
2060 use(node.inputs[1]); 2065 use(node.inputs[1]);
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 if (leftType.canBeNull() && rightType.canBeNull()) { 2914 if (leftType.canBeNull() && rightType.canBeNull()) {
2910 if (left.isConstantNull() || right.isConstantNull() || 2915 if (left.isConstantNull() || right.isConstantNull() ||
2911 (leftType.isPrimitive() && leftType == rightType)) { 2916 (leftType.isPrimitive() && leftType == rightType)) {
2912 return '=='; 2917 return '==';
2913 } 2918 }
2914 return null; 2919 return null;
2915 } else { 2920 } else {
2916 return '==='; 2921 return '===';
2917 } 2922 }
2918 } 2923 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698