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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_propagation.dart

Issue 1589643004: dart2js cps: Use dartArgumentsLength instead of arguments.length (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Replace more uses Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index 4f03ce2f94c6fea0a675d1084c75b0aa2b65106c..40137c33a47f4527f4c770fd004a7cf76e05bafb 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -1144,7 +1144,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
return cps;
}
- if (node.selector.isOperator && node.arguments.length == 2) {
+ if (node.selector.isOperator && node.dartArgumentsLength == 1) {
Primitive leftArg = node.dartReceiver;
Primitive rightArg = node.dartArgument(0);
AbstractConstantValue left = getValue(leftArg);
@@ -1225,7 +1225,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
}
}
}
- if (node.selector.isOperator && node.arguments.length == 1) {
+ if (node.selector.isOperator && node.dartArgumentsLength == 0) {
Primitive argument = node.dartReceiver;
AbstractConstantValue value = getValue(argument);
@@ -1246,7 +1246,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
Primitive receiver = node.dartReceiver;
AbstractConstantValue receiverValue = getValue(receiver);
if (name == 'remainder') {
- if (node.arguments.length == 2) {
+ if (node.dartArgumentsLength == 1) {
Primitive arg = node.dartArgument(0);
AbstractConstantValue argValue = getValue(arg);
if (lattice.isDefinitelyInt(receiverValue, allowNull: true) &&
@@ -1257,7 +1257,7 @@ class TransformingVisitor extends DeepRecursiveVisitor {
}
}
} else if (name == 'codeUnitAt') {
- if (node.arguments.length == 2) {
+ if (node.dartArgumentsLength == 1) {
Primitive index = node.dartArgument(0);
if (lattice.isDefinitelyString(receiverValue) &&
lattice.isDefinitelyInt(getValue(index))) {
@@ -2537,7 +2537,7 @@ class TypePropagationVisitor implements Visitor {
// Calculate the resulting constant if possible.
String opname = node.selector.name;
- if (node.arguments.length == 1) {
+ if (node.dartArgumentsLength == 0) {
// Unary operator.
if (opname == "unary-") {
opname = "-";
@@ -2545,7 +2545,7 @@ class TypePropagationVisitor implements Visitor {
UnaryOperator operator = UnaryOperator.parse(opname);
AbstractConstantValue result = lattice.unaryOp(operator, receiver);
return finish(result, canReplace: !receiver.isNullable);
- } else if (node.arguments.length == 2) {
+ } else if (node.dartArgumentsLength == 1) {
// Binary operator.
AbstractConstantValue right = getValue(node.dartArgument(0));
BinaryOperator operator = BinaryOperator.parse(opname);
« 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