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

Unified Diff: pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt

Issue 2645733004: Run tree shaking in strong-mode baseline tests. (Closed)
Patch Set: Created 3 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
Index: pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt
diff --git a/pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt b/pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt
new file mode 100644
index 0000000000000000000000000000000000000000..02debc74e58c9201aa81d9512efdcd4e1390bb23
--- /dev/null
+++ b/pkg/kernel/testcases/strong-mode/unused_methods.baseline.txt
@@ -0,0 +1,67 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+abstract class UsedAsBaseClass extends core::Object {
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ abstract method usedInSubclass() → void;
+ method calledFromB() → void {
+ this.{self::UsedAsBaseClass::calledFromSubclass}();
+ }
+ abstract method calledFromSubclass() → void;
+}
+abstract class UsedAsInterface extends core::Object {
+ abstract method usedInSubclass() → void;
+}
+class InstantiatedButMethodsUnused extends core::Object {
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ method usedInSubclass() → void
+ throw "Method removed by tree-shaking";
+}
+class ClassA extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+ constructor •() → void
+ : super self::UsedAsBaseClass::•()
+ ;
+ method usedInSubclass() → void {
+ core::print("A");
+ }
+}
+class ClassB extends self::UsedAsBaseClass implements self::UsedAsInterface, self::InstantiatedButMethodsUnused {
+ constructor •() → void
+ : super self::UsedAsBaseClass::•()
+ ;
+ method usedInSubclass() → void {
+ core::print("B");
+ this.{self::UsedAsBaseClass::calledFromB}();
+ }
+ method calledFromSubclass() → void {}
+}
+static method baseClassCall(self::UsedAsBaseClass object) → void {
+ object.{self::UsedAsBaseClass::usedInSubclass}();
+}
+static method interfaceCall(self::UsedAsInterface object) → void {
+ object.{self::UsedAsInterface::usedInSubclass}();
+}
+static method exactCallA(self::ClassA object) → void {
+ object.{self::ClassA::usedInSubclass}();
+}
+static method exactCallB(self::ClassB object) → void {
+ object.{self::ClassB::usedInSubclass}();
+}
+static method usedTopLevel() → dynamic {}
+static method main() → dynamic {
+ self::usedTopLevel();
+ self::ClassA a = new self::ClassA::•();
+ self::exactCallA(a);
+ self::baseClassCall(a);
+ self::interfaceCall(a);
+ self::ClassB b = new self::ClassB::•();
+ self::exactCallB(b);
+ self::baseClassCall(b);
+ self::interfaceCall(b);
+ new self::InstantiatedButMethodsUnused::•();
+}

Powered by Google App Engine
This is Rietveld 408576698