Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
| diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
| index e43efdfe44bea5399e9627cff5e5083aabd86f7e..065b098c0af4d8d4fb3c90efcc02fa47a90a78eb 100644 |
| --- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
| +++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
| @@ -588,30 +588,35 @@ class KernelAstAdapter extends KernelElementAdapterMixin { |
| return cls.thisType; |
| } |
| + native.BehaviorComputer get nativeBehaviorComputer => |
| + new native.BehaviorComputerImpl(_compiler); |
| + |
| /// Computes the native behavior for reading the native [field]. |
| // TODO(johnniwinther): Cache this for later use. |
| native.NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field) { |
| ResolutionDartType type = getDartType(field.type); |
| List<ConstantExpression> metadata = getMetadata(field.annotations); |
| - return native.NativeBehavior.ofFieldLoad(CURRENT_ELEMENT_SPANNABLE, type, |
| - metadata, typeLookup(resolveAsRaw: false), _compiler, |
| + // TODO(johnniwinther): Provide the correct value for [isJsInterop]. |
|
Siggi Cherem (dart-lang)
2017/02/08 17:00:28
was this working before? (are there tests that wil
Johnni Winther
2017/02/10 09:11:45
Same behavior as before (probably not working).
|
| + return nativeBehaviorComputer.ofFieldLoad( |
| + type, metadata, typeLookup(resolveAsRaw: false), |
| isJsInterop: false); |
| } |
| /// Computes the native behavior for writing to the native [field]. |
| // TODO(johnniwinther): Cache this for later use. |
| native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) { |
| - ResolutionDartType type = getDartType(field.type); |
| - return native.NativeBehavior.ofFieldStore(type, _compiler.resolution); |
| + DartType type = getDartType(field.type); |
| + return nativeBehaviorComputer.ofFieldStore(type); |
| } |
| /// Computes the native behavior for calling [procedure]. |
| // TODO(johnniwinther): Cache this for later use. |
| native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure) { |
| - ResolutionDartType type = getFunctionType(procedure.function); |
| + DartType type = getFunctionType(procedure.function); |
| List<ConstantExpression> metadata = getMetadata(procedure.annotations); |
| - return native.NativeBehavior.ofMethod(CURRENT_ELEMENT_SPANNABLE, type, |
| - metadata, typeLookup(resolveAsRaw: false), _compiler, |
| + // TODO(johnniwinther): Provide the correct value for [isJsInterop]. |
| + return nativeBehaviorComputer.ofMethod( |
| + type, metadata, typeLookup(resolveAsRaw: false), |
| isJsInterop: false); |
| } |