| 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 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 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2437 helper = const SourceString('doubleTypeCheck'); | 2437 helper = const SourceString('doubleTypeCheck'); |
| 2438 } else if (element == compiler.numClass) { | 2438 } else if (element == compiler.numClass) { |
| 2439 helper = const SourceString('numTypeCheck'); | 2439 helper = const SourceString('numTypeCheck'); |
| 2440 } else if (element == compiler.boolClass) { | 2440 } else if (element == compiler.boolClass) { |
| 2441 helper = const SourceString('boolTypeCheck'); | 2441 helper = const SourceString('boolTypeCheck'); |
| 2442 } else if (element == compiler.functionClass || element.isTypedef()) { | 2442 } else if (element == compiler.functionClass || element.isTypedef()) { |
| 2443 helper = const SourceString('functionTypeCheck'); | 2443 helper = const SourceString('functionTypeCheck'); |
| 2444 } else if (element == compiler.intClass) { | 2444 } else if (element == compiler.intClass) { |
| 2445 helper = const SourceString('intTypeCheck'); | 2445 helper = const SourceString('intTypeCheck'); |
| 2446 } else if (Elements.isStringSupertype(element, compiler)) { | 2446 } else if (Elements.isStringSupertype(element, compiler)) { |
| 2447 additionalArgument = compiler.namer.operatorIs(element); |
| 2447 if (nativeCheck) { | 2448 if (nativeCheck) { |
| 2448 helper = const SourceString('stringSuperNativeTypeCheck'); | 2449 helper = const SourceString('stringSuperNativeTypeCheck'); |
| 2449 } else { | 2450 } else { |
| 2450 helper = const SourceString('stringSuperTypeCheck'); | 2451 helper = const SourceString('stringSuperTypeCheck'); |
| 2451 } | 2452 } |
| 2452 } else if (element === compiler.listClass) { | 2453 } else if (element === compiler.listClass) { |
| 2453 helper = const SourceString('listTypeCheck'); | 2454 helper = const SourceString('listTypeCheck'); |
| 2454 } else { | 2455 } else { |
| 2455 additionalArgument = compiler.namer.operatorIs(element); | 2456 additionalArgument = compiler.namer.operatorIs(element); |
| 2456 if (Elements.isListSupertype(element, compiler)) { | 2457 if (Elements.isListSupertype(element, compiler)) { |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2915 startBailoutSwitch(); | 2916 startBailoutSwitch(); |
| 2916 } | 2917 } |
| 2917 } | 2918 } |
| 2918 | 2919 |
| 2919 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2920 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2920 if (labeledBlockInfo.body.start.hasGuards()) { | 2921 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2921 endBailoutSwitch(); | 2922 endBailoutSwitch(); |
| 2922 } | 2923 } |
| 2923 } | 2924 } |
| 2924 } | 2925 } |
| OLD | NEW |