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

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

Issue 2498493003: kernel->ssa: get simple constructors working (Closed)
Patch Set: respond to 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/builder_kernel.dart ('k') | pkg/compiler/lib/src/tree/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 5cf2ce45b3575f76fb61fd865772050262c95a98..7de595acf58d8ee969c0dc24b4235beb95dc9b87 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -127,11 +127,19 @@ class KernelAstAdapter {
return new CallStructure(argumentCount, namedArguments);
}
+ FunctionSignature getFunctionSignature(ir.FunctionNode function) {
+ return getElement(function).asFunctionElement().functionSignature;
+ }
+
Name getName(ir.Name name) {
return new Name(
name.name, name.isPrivate ? getElement(name.library) : null);
}
+ ir.Field getFieldFromElement(FieldElement field) {
+ return kernel.fields[field];
+ }
+
Selector getSelector(ir.Expression node) {
if (node is ir.PropertyGet) return getGetterSelector(node);
if (node is ir.InvocationExpression) return getInvocationSelector(node);
@@ -287,6 +295,8 @@ class KernelAstAdapter {
TypeMask get assertThrowReturnType => TypeMaskFactory
.inferredReturnTypeForElement(_backend.helpers.assertThrow, _compiler);
+ ir.Class get objectClass => kernel.classes[_compiler.coreClasses.objectClass];
+
DartType getDartType(ir.DartType type) {
return type.accept(_typeConverter);
}
@@ -338,7 +348,6 @@ class KernelAstAdapter {
}
/// Compute the kind of foreign helper function called by [node], if any.
- @override
ForeignKind getForeignKind(ir.StaticInvocation node) {
if (isForeignLibrary(node.target.enclosingLibrary)) {
switch (node.target.name.name) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698