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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2464103002: Introduce ClassLike, MemberLike, FieldLike and FunctionLike (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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/ssa/codegen_helpers.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71f6b549506b5da5d671887ea0bcbc6e9d3603f1..be4a558e28399c9f6fec6d62f62fa0c5dfdb156a 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -76,6 +76,7 @@ class KernelAstAdapter {
return constantValue;
}
+ // TODO(johnniwinther): Use the more precise functions below.
Element getElement(ir.Node node) {
Element result = _nodeToElement[node];
assert(invariant(CURRENT_ELEMENT_SPANNABLE, result != null,
@@ -83,6 +84,12 @@ class KernelAstAdapter {
return result;
}
+ MemberElement getMember(ir.Node node) => getElement(node).declaration;
+
+ MethodElement getMethod(ir.Node node) => getElement(node).declaration;
+
+ ClassElement getClass(ir.Node node) => getElement(node).declaration;
+
ast.Node getNode(ir.Node node) {
ast.Node result = _nodeToAst[node];
assert(result != null);
@@ -252,7 +259,7 @@ class KernelAstAdapter {
ir.Procedure get mapLiteralConstructorEmpty =>
kernel.functions[_backend.helpers.mapLiteralConstructorEmpty];
- Element get jsIndexableLength => _backend.helpers.jsIndexableLength;
+ MemberElement get jsIndexableLength => _backend.helpers.jsIndexableLength;
ir.Procedure get checkConcurrentModificationError =>
kernel.functions[_backend.helpers.checkConcurrentModificationError];
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen_helpers.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698