| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |