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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart

Issue 266913017: Convert property methods into getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
index 75fe4b67f3c729097362b08d36482fd4086d5740..01a82b77a97328cfb6b8ad126749c4a4bc7d3696 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart
@@ -233,7 +233,7 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
compiler.world.allFunctions.filter(instruction.selector);
if (targets.length == 1) {
Element target = targets.first;
- ClassElement cls = target.getEnclosingClass();
+ ClassElement cls = target.enclosingClass;
TypeMask type = new TypeMask.nonNullSubclass(cls.declaration);
// TODO(ngeoffray): We currently only optimize on primitive
// types.
@@ -264,7 +264,7 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
HInstruction right = instruction.inputs[2];
Selector selector = instruction.selector;
- if (selector.isOperator() && left.isNumber(compiler)) {
+ if (selector.isOperator && left.isNumber(compiler)) {
if (right.isNumber(compiler)) return false;
TypeMask type = right.isIntegerOrNull(compiler)
? right.instructionType.nonNullable()
@@ -308,11 +308,11 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
// of [instruction] might move from number to dynamic.
pendingOptimizations.putIfAbsent(instruction, () => () {
Selector selector = instruction.selector;
- if (selector.isOperator() && selector.name != '==') {
+ if (selector.isOperator && selector.name != '==') {
if (checkReceiver(instruction)) {
addAllUsersBut(instruction, instruction.inputs[1]);
}
- if (!selector.isUnaryOperator() && checkArgument(instruction)) {
+ if (!selector.isUnaryOperator && checkArgument(instruction)) {
addAllUsersBut(instruction, instruction.inputs[2]);
}
}
@@ -326,7 +326,7 @@ class SsaTypePropagator extends HBaseVisitor implements OptimizationPhase {
// Try to specialize the receiver after this call.
if (receiver.dominatedUsers(instruction).length != 1
- && !selector.isClosureCall()) {
+ && !selector.isClosureCall) {
TypeMask newType = compiler.world.allFunctions.receiverType(selector);
newType = newType.intersection(receiverType, compiler);
var next = instruction.next;
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/optimize.dart ('k') | sdk/lib/_internal/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698