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

Unified Diff: compiler/lib/implementation/rtt.js

Issue 8676041: JS tree shaking for incremental builds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: compiler/lib/implementation/rtt.js
diff --git a/compiler/lib/implementation/rtt.js b/compiler/lib/implementation/rtt.js
index 83179d3dfa46193a18563e04bcd62f1eaa1ee3dc..daea1603a37a7ad39eb8f5847f152b6ffefd17c6 100644
--- a/compiler/lib/implementation/rtt.js
+++ b/compiler/lib/implementation/rtt.js
@@ -208,19 +208,16 @@ RTT.getTypeArgsFor = function(o, classkey) {
// Base types for runtime type information
/** @type {!RTT} */
-RTT.objectType = new RTT($cls('Object'));
-RTT.objectType.implementedBy = function(o) {return true};
-RTT.objectType.implementedByType = function(o) {return true};
-
-/** @type {!RTT} */
-RTT.dynamicType = new RTT($cls('Dynamic'));
-RTT.dynamicType.implementedBy = function(o) {return true};
-RTT.dynamicType.implementedByType = function(o) {return true};
+function ImplementsAll(name) {
zundel 2011/11/30 15:09:57 (what does this have to do with this patch?)
mmendez 2011/12/01 21:31:30 Makes it such that properties are either x.y or x.
+ RTT.call(this,name);
+}
+$inherits(ImplementsAll,RTT);
+ImplementsAll.prototype.implementedBy = function(o) {return true};
+ImplementsAll.prototype.implementedByType = function(o) {return true};
-/** @type {!RTT} */
-RTT.placeholderType = new RTT($cls('::'));
-RTT.placeholderType.implementedBy = function(o) {return true};
-RTT.placeholderType.implementedByType = function(o) {return true};
+RTT.objectType = new ImplementsAll($cls('Object'));
+RTT.dynamicType = new ImplementsAll($cls('Dynamic'));
+RTT.placeholderType = new ImplementsAll($cls('::'));
/**
* Checks that a value is assignable to an expected type, and either returns that

Powered by Google App Engine
This is Rietveld 408576698