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

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

Issue 10920016: Type -> DartType. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 final JavaScriptBackend backend; 7 final JavaScriptBackend backend;
8 8
9 SsaCodeGeneratorTask(JavaScriptBackend backend) 9 SsaCodeGeneratorTask(JavaScriptBackend backend)
10 : this.backend = backend, 10 : this.backend = backend,
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 const SourceString("listSuperNativeTypeCast"), 2329 const SourceString("listSuperNativeTypeCast"),
2330 "listSuperTypeCheck": 2330 "listSuperTypeCheck":
2331 const SourceString("listSuperTypeCast"), 2331 const SourceString("listSuperTypeCast"),
2332 "callTypeCheck": 2332 "callTypeCheck":
2333 const SourceString("callTypeCast"), 2333 const SourceString("callTypeCast"),
2334 "propertyTypeCheck": 2334 "propertyTypeCheck":
2335 const SourceString("propertyTypeCast") 2335 const SourceString("propertyTypeCast")
2336 }; 2336 };
2337 2337
2338 if (node.isChecked) { 2338 if (node.isChecked) {
2339 Type type = node.type.computeType(compiler); 2339 DartType type = node.type.computeType(compiler);
2340 Element element = type.element; 2340 Element element = type.element;
2341 world.registerIsCheck(element); 2341 world.registerIsCheck(element);
2342 2342
2343 if (node.isArgumentTypeCheck) { 2343 if (node.isArgumentTypeCheck) {
2344 if (element == compiler.intClass) { 2344 if (element == compiler.intClass) {
2345 checkInt(node.checkedInput, '!=='); 2345 checkInt(node.checkedInput, '!==');
2346 } else { 2346 } else {
2347 assert(element == compiler.numClass); 2347 assert(element == compiler.numClass);
2348 checkNum(node.checkedInput, '!=='); 2348 checkNum(node.checkedInput, '!==');
2349 } 2349 }
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2887 if (leftType.canBeNull() && rightType.canBeNull()) { 2887 if (leftType.canBeNull() && rightType.canBeNull()) {
2888 if (left.isConstantNull() || right.isConstantNull() || 2888 if (left.isConstantNull() || right.isConstantNull() ||
2889 (leftType.isPrimitive() && leftType == rightType)) { 2889 (leftType.isPrimitive() && leftType == rightType)) {
2890 return '=='; 2890 return '==';
2891 } 2891 }
2892 return null; 2892 return null;
2893 } else { 2893 } else {
2894 return '==='; 2894 return '===';
2895 } 2895 }
2896 } 2896 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698