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

Unified Diff: frog/value.dart

Issue 8591033: Support globals in frog isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: john comments Created 9 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 | « frog/member.dart ('k') | tests/co19/co19-frog.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/value.dart
diff --git a/frog/value.dart b/frog/value.dart
index 7205f78b1ce72a8409f7a1c9807ccbf935e9d4e4..8c357ae85dd359a161d3c6117d02234c274a8e32 100644
--- a/frog/value.dart
+++ b/frog/value.dart
@@ -645,8 +645,14 @@ class GlobalValue extends Value implements Comparable {
GlobalValue(Type type, String code, bool isConst,
this.field, this.name, this.exp, this.canonicalCode,
- SourceSpan span, this.dependencies)
- : super(type, code, span, !isConst);
+ SourceSpan span, List<GlobalValue> _dependencies)
+ : super(type, code, span, !isConst), dependencies = [] {
+ // store transitive-dependencies so sorting algorithm works correctly.
+ for (final dep in _dependencies) {
+ dependencies.add(dep);
+ dependencies.addAll(dep.dependencies);
+ }
+ }
int compareTo(GlobalValue other) {
// order by dependencies, o.w. by name
« no previous file with comments | « frog/member.dart ('k') | tests/co19/co19-frog.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698