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

Unified Diff: lib/src/info.dart

Issue 12096106: work in progress: observable implementation using detailed change records (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 7 years, 11 months 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 | « lib/src/files.dart ('k') | lib/src/linked_list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/info.dart
diff --git a/lib/src/info.dart b/lib/src/info.dart
index e69f6973219b58219be824253628a66b8f3fdd7e..7d3d347c4b455303946682ff50f6b2e434f683ae 100644
--- a/lib/src/info.dart
+++ b/lib/src/info.dart
@@ -161,7 +161,7 @@ typedef String NameMangler(String name, String suffix, [bool forceSuffix]);
abstract class LibraryInfo {
/** Whether there is any code associated with the page/component. */
- bool get codeAttached => inlinedCode != null || externalFile != null;
+ bool get codeAttached => userCode != null || externalFile != null;
/**
* The actual code, either inlined or from an external file, or `null` if none
@@ -169,15 +169,18 @@ abstract class LibraryInfo {
*/
DartCodeInfo userCode;
- /** The inlined code, if any. */
- String inlinedCode;
-
/** The name of the file sourced in a script tag, if any. */
Path externalFile;
/** Info asscociated with [externalFile], if any. */
FileInfo externalCode;
+ /**
+ * The inverse of [externalCode]. If this .dart file was imported via a script
+ * tag, this refers to the HTML file that imported it.
+ */
+ FileInfo htmlFile;
+
/** File where the top-level code was defined. */
Path get inputPath;
@@ -187,6 +190,15 @@ abstract class LibraryInfo {
*/
String _getOutputFilename(NameMangler mangle);
+ /** This is used in transforming Dart code to track modified files. */
+ bool modified = false;
+
+ /**
+ * This is used in transforming Dart code to compute files that reference
+ * [modified] files.
+ */
+ List<FileInfo> referencedBy = [];
+
/**
* Components used within this library unit. For [FileInfo] these are
* components used directly in the page. For [ComponentInfo] these are
@@ -636,7 +648,7 @@ class DartCodeInfo {
final List<DartDirectiveInfo> directives;
/** The rest of the code. */
- final String code;
+ String code;
DartCodeInfo(this.libraryName, this.partOf, this.directives, this.code);
}
@@ -658,6 +670,9 @@ class DartDirectiveInfo {
/** Shown identifiers. */
List<String> show;
+ /** True if this directive should refer to a generated file. */
+ bool generated = false;
+
DartDirectiveInfo(this.label, this.uri, [this.prefix, this.hide, this.show]);
}
« no previous file with comments | « lib/src/files.dart ('k') | lib/src/linked_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698