| 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 2527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2538 checkInt(node.checkedInput, '!=='); | 2538 checkInt(node.checkedInput, '!=='); |
| 2539 } else { | 2539 } else { |
| 2540 assert(element == compiler.numClass); | 2540 assert(element == compiler.numClass); |
| 2541 checkNum(node.checkedInput, '!=='); | 2541 checkNum(node.checkedInput, '!=='); |
| 2542 } | 2542 } |
| 2543 buffer.add(') '); | 2543 buffer.add(') '); |
| 2544 generateThrowWithHelper('iae', node.checkedInput); | 2544 generateThrowWithHelper('iae', node.checkedInput); |
| 2545 return; | 2545 return; |
| 2546 } | 2546 } |
| 2547 | 2547 |
| 2548 assert(node.isCheckedModeCheck); | 2548 assert(node.isCheckedModeCheck || node.isCastTypeCheck); |
| 2549 if (element == compiler.stringClass) { | 2549 if (element == compiler.stringClass) { |
| 2550 helper = const SourceString('stringTypeCheck'); | 2550 helper = const SourceString('stringTypeCheck'); |
| 2551 } else if (element == compiler.doubleClass) { | 2551 } else if (element == compiler.doubleClass) { |
| 2552 helper = const SourceString('doubleTypeCheck'); | 2552 helper = const SourceString('doubleTypeCheck'); |
| 2553 } else if (element == compiler.numClass) { | 2553 } else if (element == compiler.numClass) { |
| 2554 helper = const SourceString('numTypeCheck'); | 2554 helper = const SourceString('numTypeCheck'); |
| 2555 } else if (element == compiler.boolClass) { | 2555 } else if (element == compiler.boolClass) { |
| 2556 helper = const SourceString('boolTypeCheck'); | 2556 helper = const SourceString('boolTypeCheck'); |
| 2557 } else if (element == compiler.functionClass || element.isTypedef()) { | 2557 } else if (element == compiler.functionClass || element.isTypedef()) { |
| 2558 helper = const SourceString('functionTypeCheck'); | 2558 helper = const SourceString('functionTypeCheck'); |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3034 startBailoutSwitch(); | 3034 startBailoutSwitch(); |
| 3035 } | 3035 } |
| 3036 } | 3036 } |
| 3037 | 3037 |
| 3038 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 3038 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 3039 if (labeledBlockInfo.body.start.hasGuards()) { | 3039 if (labeledBlockInfo.body.start.hasGuards()) { |
| 3040 endBailoutSwitch(); | 3040 endBailoutSwitch(); |
| 3041 } | 3041 } |
| 3042 } | 3042 } |
| 3043 } | 3043 } |
| OLD | NEW |