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

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

Issue 1976213002: Adjusts dart2js backend to handle method type arguments. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Made MethodTypeVariableType malformed, eliminated malformMethodTypeVariableType Created 4 years, 7 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
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 import '../common/codegen.dart' show CodegenWorkItem; 5 import '../common/codegen.dart' show CodegenWorkItem;
6 import '../common/tasks.dart' show CompilerTask; 6 import '../common/tasks.dart' show CompilerTask;
7 import '../compiler.dart' show Compiler; 7 import '../compiler.dart' show Compiler;
8 import '../constants/constant_system.dart'; 8 import '../constants/constant_system.dart';
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../core_types.dart' show CoreClasses; 10 import '../core_types.dart' show CoreClasses;
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 } 773 }
774 774
775 HInstruction removeIfCheckAlwaysSucceeds(HCheck node, TypeMask checkedType) { 775 HInstruction removeIfCheckAlwaysSucceeds(HCheck node, TypeMask checkedType) {
776 ClassWorld classWorld = compiler.world; 776 ClassWorld classWorld = compiler.world;
777 if (checkedType.containsAll(classWorld)) return node; 777 if (checkedType.containsAll(classWorld)) return node;
778 HInstruction input = node.checkedInput; 778 HInstruction input = node.checkedInput;
779 TypeMask inputType = input.instructionType; 779 TypeMask inputType = input.instructionType;
780 return inputType.isInMask(checkedType, classWorld) ? input : node; 780 return inputType.isInMask(checkedType, classWorld) ? input : node;
781 } 781 }
782 782
783 HInstruction removeCheck(HCheck node) => node.checkedInput;
784
783 VariableElement findConcreteFieldForDynamicAccess( 785 VariableElement findConcreteFieldForDynamicAccess(
784 HInstruction receiver, Selector selector) { 786 HInstruction receiver, Selector selector) {
785 TypeMask receiverType = receiver.instructionType; 787 TypeMask receiverType = receiver.instructionType;
786 return compiler.world.locateSingleField(selector, receiverType); 788 return compiler.world.locateSingleField(selector, receiverType);
787 } 789 }
788 790
789 HInstruction visitFieldGet(HFieldGet node) { 791 HInstruction visitFieldGet(HFieldGet node) {
790 if (node.isNullCheck) return node; 792 if (node.isNullCheck) return node;
791 var receiver = node.receiver; 793 var receiver = node.receiver;
792 if (node.element == helpers.jsIndexableLength) { 794 if (node.element == helpers.jsIndexableLength) {
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 2381
2380 keyedValues.forEach((receiver, values) { 2382 keyedValues.forEach((receiver, values) {
2381 result.keyedValues[receiver] = 2383 result.keyedValues[receiver] =
2382 new Map<HInstruction, HInstruction>.from(values); 2384 new Map<HInstruction, HInstruction>.from(values);
2383 }); 2385 });
2384 2386
2385 result.nonEscapingReceivers.addAll(nonEscapingReceivers); 2387 result.nonEscapingReceivers.addAll(nonEscapingReceivers);
2386 return result; 2388 return result;
2387 } 2389 }
2388 } 2390 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698