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

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

Issue 10660027: Fix assert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 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
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
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 }
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