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

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

Issue 2498493003: kernel->ssa: get simple constructors working (Closed)
Patch Set: 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
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 35ee5275c819bff665274e2dcc01b321e442e492..0b8c2522c9842e0532c8111877eb4b48d6321884 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 getFieldFromNode(FieldElement field) {
Siggi Cherem (dart-lang) 2016/11/14 18:22:25 FromNode => FromElement? or simply getField?
Harry Terkelsen 2016/11/14 23:23:40 Switched to FromElement. I didn't want to do getFi
+ 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);
@@ -285,6 +293,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);
}
@@ -332,7 +342,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) {

Powered by Google App Engine
This is Rietveld 408576698