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

Unified Diff: pkg/compiler/lib/src/kernel/element_map_mixins.dart

Issue 2995643002: Support jsinterop/world_test from .dill (Closed)
Patch Set: Updated cf. comments Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/kernel/native_basic_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/element_map_mixins.dart
diff --git a/pkg/compiler/lib/src/kernel/element_map_mixins.dart b/pkg/compiler/lib/src/kernel/element_map_mixins.dart
index 8b30d0b68711fabe254fd7cb694aadfa10427d87..e8b50b37d016b9776f00a1eec59f9d61a356f92d 100644
--- a/pkg/compiler/lib/src/kernel/element_map_mixins.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_mixins.dart
@@ -402,12 +402,19 @@ abstract class KernelToElementMapForImpactMixin
return nativeBehaviorBuilder.buildFieldStoreBehavior(type);
}
- /// Computes the native behavior for calling [procedure].
+ /// Computes the native behavior for calling [member].
// TODO(johnniwinther): Cache this for later use.
- native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure,
+ native.NativeBehavior getNativeBehaviorForMethod(ir.Member member,
{bool isJsInterop}) {
- DartType type = getFunctionType(procedure.function);
- List<ConstantValue> metadata = getMetadata(procedure.annotations);
+ DartType type;
+ if (member is ir.Procedure) {
+ type = getFunctionType(member.function);
+ } else if (member is ir.Constructor) {
+ type = getFunctionType(member.function);
+ } else {
+ failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected method node $member.");
+ }
+ List<ConstantValue> metadata = getMetadata(member.annotations);
return nativeBehaviorBuilder.buildMethodBehavior(
type, metadata, typeLookup(resolveAsRaw: false),
isJsInterop: isJsInterop);
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map.dart ('k') | pkg/compiler/lib/src/kernel/native_basic_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698