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

Unified Diff: pkg/compiler/lib/src/js_backend/native_data.dart

Issue 2609063002: Further reduce use of Element in codegen. (Closed)
Patch Set: Created 3 years, 12 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/js_backend/native_data.dart
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
index 31fe7d69fea1bf11dbf707181e0b4b1361f404e3..e30010d00103453b7db4de0a2a9263f3c266a236 100644
--- a/pkg/compiler/lib/src/js_backend/native_data.dart
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -6,7 +6,13 @@ library js_backend.native_data;
import '../common.dart';
import '../elements/elements.dart'
- show ClassElement, Element, FieldElement, FunctionElement, MemberElement;
+ show
+ ClassElement,
+ Element,
+ Entity,
+ FieldElement,
+ FunctionElement,
+ MemberElement;
import '../native/behavior.dart' show NativeBehavior;
/// Additional element information for native classes and methods and js-interop
@@ -102,7 +108,10 @@ class NativeData {
/// Computes the name for [element] to use in the generated JavaScript. This
/// is either given through a native annotation or a js interop annotation.
- String getFixedBackendName(Element element) {
+ String getFixedBackendName(Entity entity) {
+ // TODO(johnniwinther): Remove this assignment from [Entity] to [Element]
+ // when `.declaration` is no longer needed.
+ Element element = entity;
String name = nativeMemberName[element.declaration];
if (name == null && isJsInterop(element)) {
// If an element isJsInterop but _isJsInterop is false that means it is

Powered by Google App Engine
This is Rietveld 408576698