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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 57873002: Build new IR for functions returning a constant (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: no nested functions in ir Created 7 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: sdk/lib/_internal/compiler/implementation/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 8859321f1df3f619887a60f58a4f384312b63fa3..4daa412839154afdf6f16fe32942400d7231ae2d 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -29,6 +29,7 @@ import '../dart_types.dart';
import '../scanner/scannerlib.dart' show Token, EOF_TOKEN;
+import '../ir/ir_nodes.dart' show IrNode, IrFunction;
class ElementX implements Element {
static int elementHashCode = 0;
@@ -53,6 +54,12 @@ class ElementX implements Element {
compiler.internalError("$this.computeType.", token: position());
}
+ bool hasIrNode(Compiler compiler) => false;
+
+ IrNode irNode(Compiler compiler) {
+ compiler.internalError("$this.irNode.", token: position());
+ }
+
void addMetadata(MetadataAnnotation annotation) {
assert(annotation.annotatedElement == null);
annotation.annotatedElement = this;
@@ -1448,6 +1455,12 @@ class FunctionElementX extends ElementX implements FunctionElement {
bool get isRedirectingFactory => defaultImplementation != this;
+ bool hasIrNode(Compiler compiler) {
+ return compiler.irBuilder.nodes.containsKey(this);
+ }
+
+ IrNode irNode(Compiler compiler) => compiler.irBuilder.nodes[this];
+
/// This field is set by the post process queue when checking for cycles.
FunctionElement internalRedirectionTarget;
DartType redirectionTargetType;

Powered by Google App Engine
This is Rietveld 408576698