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

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: 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 56a35e9bc2e87b07d7ae1916a9e52fb591952850..8e3e238eaf7d596f87072417b3fff01e65e9e40e 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -7,6 +7,7 @@ library elements.modelx;
import 'elements.dart';
import '../../compiler.dart' as api;
import '../tree/tree.dart';
+import '../ir/ir.dart' show IFunction;
import '../util/util.dart';
import '../resolution/resolution.dart';
@@ -1527,6 +1528,9 @@ class FunctionElementX extends ElementX implements FunctionElement {
if (super.isAbstract(compiler)) return true;
if (modifiers.isExternal()) return false;
if (isFunction() || isAccessor()) {
+ if (compiler.irBuilder.iNodes.containsKey(this)) {
kasperl 2013/11/06 08:30:04 How bad would it be to refer to the IR nodes direc
lukas 2013/11/06 11:36:08 Done.
+ return !(compiler.irBuilder.iNodes[this] as IFunction).hasBody();
+ }
return compiler.withCurrentElement(this,
() => !parseNode(compiler).hasBody());
ngeoffray 2013/11/05 12:58:35 We should make sure we don't do this.
lukas 2013/11/06 11:36:08 Done.
}

Powered by Google App Engine
This is Rietveld 408576698