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

Unified Diff: pkg/compiler/lib/src/dart_types.dart

Issue 1288013002: dart2js cps: Handle native functions, getters, and setters. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/dart_types.dart
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index 17e6472127b790a4d8829a7914be01bd0cb33a57..97f86c555778fc287c0288612e18f35c933f1d9b 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -726,11 +726,7 @@ class FunctionType extends DartType {
String get name => 'Function';
- int computeArity() {
- int arity = 0;
- parameterTypes.forEach((_) { arity++; });
- return arity;
- }
+ int computeArity() => parameterTypes.length;
int get hashCode {
int hash = 3 * returnType.hashCode;
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698