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

Unified Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 2045223002: Compute and cache element NativeBehavior during resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Temporarily skip compilation subtest Created 4 years, 6 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 | « pkg/compiler/lib/src/js_backend/native_data.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index daa6ddc920cee80e287765dc58fdc1b428087b71..a4e292274bed253b2b46795aa84e8debbd590537 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -705,13 +705,12 @@ class NativeBehavior {
behavior._capture(type, compiler.resolution,
isInterop: isInterop, compiler: compiler);
- // TODO(sra): Optional arguments are currently missing from the
- // DartType. This should be fixed so the following work-around can be
- // removed.
- method.functionSignature
- .forEachOptionalParameter((ParameterElement parameter) {
- behavior._escape(parameter.type, compiler.resolution);
- });
+ for (DartType type in type.optionalParameterTypes) {
+ behavior._escape(type, compiler.resolution);
+ }
+ for (DartType type in type.namedParameterTypes) {
+ behavior._escape(type, compiler.resolution);
+ }
behavior._overrideWithAnnotations(method, compiler);
return behavior;
« no previous file with comments | « pkg/compiler/lib/src/js_backend/native_data.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698