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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1259473005: Fix boolean conversion bug in dart2js + update JSRegExp accordingly. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment Created 5 years, 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/nodes.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 part of ssa; 5 part of ssa;
6 6
7 class SsaFunctionCompiler implements FunctionCompiler { 7 class SsaFunctionCompiler implements FunctionCompiler {
8 SsaCodeGeneratorTask generator; 8 SsaCodeGeneratorTask generator;
9 SsaBuilderTask builder; 9 SsaBuilderTask builder;
10 SsaOptimizerTask optimizer; 10 SsaOptimizerTask optimizer;
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 if (directLocals[local] == null) { 486 if (directLocals[local] == null) {
487 if (local is TypeVariableElement) { 487 if (local is TypeVariableElement) {
488 builder.compiler.internalError(builder.compiler.currentElement, 488 builder.compiler.internalError(builder.compiler.currentElement,
489 "Runtime type information not available for $local."); 489 "Runtime type information not available for $local.");
490 } else { 490 } else {
491 builder.compiler.internalError(local, 491 builder.compiler.internalError(local,
492 "Cannot find value $local."); 492 "Cannot find value $local.");
493 } 493 }
494 } 494 }
495 HInstruction value = directLocals[local]; 495 HInstruction value = directLocals[local];
496 if (false && sourceInformation != null) { 496 if (sourceInformation != null) {
497 // TODO(johnniwinther): Enable this again when boolean conversions of
498 // boolean type conversions are handled correctly.
499 value = new HRef(value, sourceInformation); 497 value = new HRef(value, sourceInformation);
500 builder.add(value); 498 builder.add(value);
501 } 499 }
502 return value; 500 return value;
503 } else if (isStoredInClosureField(local)) { 501 } else if (isStoredInClosureField(local)) {
504 ClosureFieldElement redirect = redirectionMapping[local]; 502 ClosureFieldElement redirect = redirectionMapping[local];
505 HInstruction receiver = readLocal(closureData.closureElement); 503 HInstruction receiver = readLocal(closureData.closureElement);
506 TypeMask type = local is BoxLocal 504 TypeMask type = local is BoxLocal
507 ? builder.backend.nonNullType 505 ? builder.backend.nonNullType
508 : builder.getTypeOfCapturedVariable(redirect); 506 : builder.getTypeOfCapturedVariable(redirect);
(...skipping 8367 matching lines...) Expand 10 before | Expand all | Expand 10 after
8876 if (unaliased is TypedefType) throw 'unable to unalias $type'; 8874 if (unaliased is TypedefType) throw 'unable to unalias $type';
8877 unaliased.accept(this, builder); 8875 unaliased.accept(this, builder);
8878 } 8876 }
8879 8877
8880 void visitDynamicType(DynamicType type, SsaBuilder builder) { 8878 void visitDynamicType(DynamicType type, SsaBuilder builder) {
8881 JavaScriptBackend backend = builder.compiler.backend; 8879 JavaScriptBackend backend = builder.compiler.backend;
8882 ClassElement cls = backend.findHelper('DynamicRuntimeType'); 8880 ClassElement cls = backend.findHelper('DynamicRuntimeType');
8883 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 8881 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
8884 } 8882 }
8885 } 8883 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698