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

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 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 } 2040 }
2041 if (name == const SourceString('removeLast') && arity == 0) { 2041 if (name == const SourceString('removeLast') && arity == 0) {
2042 return 'pop'; 2042 return 'pop';
2043 } 2043 }
2044 } else if (receiver.isString(types) && isCall) { 2044 } else if (receiver.isString(types) && isCall) {
2045 if (name == const SourceString('concat') && 2045 if (name == const SourceString('concat') &&
2046 arity == 1 && 2046 arity == 1 &&
2047 interceptor.inputs[2].isString(types)) { 2047 interceptor.inputs[2].isString(types)) {
2048 return '+'; 2048 return '+';
2049 } 2049 }
2050 if (name == const SourceString('split') &&
2051 arity == 1 &&
2052 interceptor.inputs[2].isString(types)) {
2053 return 'split';
2054 }
2050 } 2055 }
2051 2056
2052 return null; 2057 return null;
2053 } 2058 }
2054 2059
2055 void visitInvokeInterceptor(HInvokeInterceptor node) { 2060 void visitInvokeInterceptor(HInvokeInterceptor node) {
2056 String builtin = builtinJsName(node); 2061 String builtin = builtinJsName(node);
2057 if (builtin !== null) { 2062 if (builtin !== null) {
2058 if (builtin == '+') { 2063 if (builtin == '+') {
2059 use(node.inputs[1]); 2064 use(node.inputs[1]);
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2908 if (leftType.canBeNull() && rightType.canBeNull()) { 2913 if (leftType.canBeNull() && rightType.canBeNull()) {
2909 if (left.isConstantNull() || right.isConstantNull() || 2914 if (left.isConstantNull() || right.isConstantNull() ||
2910 (leftType.isPrimitive() && leftType == rightType)) { 2915 (leftType.isPrimitive() && leftType == rightType)) {
2911 return '=='; 2916 return '==';
2912 } 2917 }
2913 return null; 2918 return null;
2914 } else { 2919 } else {
2915 return '==='; 2920 return '===';
2916 } 2921 }
2917 } 2922 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698