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

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

Issue 10574015: Fix a bug in type assertions involving String supertypes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments 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 | dart/tests/language/string_supertype_checked_test.dart » ('j') | 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 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/language/string_supertype_checked_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698