Kill inline class definition (rest of slow)nightly-2019.03.30
authorOguz Ulgen <[email protected]>
Sat, 30 Mar 2019 02:15:37 +0000 (29 19:15 -0700)
committerHhvm Bot <[email protected]>
Sat, 30 Mar 2019 02:19:02 +0000 (29 19:19 -0700)
Reviewed By: jano, alexeyt

Differential Revision: D14676896

fbshipit-source-id: a317ade357b4b57fd6d5422a2ff7b90f033316c0

122 files changed:
hphp/test/slow/dv_array/ext_factparse.php
hphp/test/slow/dv_array/ext_factparse.php.expectf
hphp/test/slow/dv_array/ext_pdo/ext_pdo.inc [new file with mode: 0644]
hphp/test/slow/dv_array/ext_pdo/ext_pdo.php
hphp/test/slow/dv_array_hack_arr/ext_factparse.php
hphp/test/slow/dv_array_hack_arr/ext_factparse.php.expectf
hphp/test/slow/dv_array_hack_arr/ext_pdo/ext_pdo.inc [new file with mode: 0644]
hphp/test/slow/dv_array_hack_arr/ext_pdo/ext_pdo.php
hphp/test/slow/ext_enum/enum-cache-1.inc [new file with mode: 0644]
hphp/test/slow/ext_enum/enum-cache-2.inc [new file with mode: 0644]
hphp/test/slow/ext_enum/enum-cache.php
hphp/test/slow/ext_factparse/ext_factparse.php
hphp/test/slow/ext_factparse/ext_factparse.php.expectf
hphp/test/slow/ext_misc/1377.inc [new file with mode: 0644]
hphp/test/slow/ext_misc/1377.php
hphp/test/slow/ext_pdo/ext_pdo.inc [new file with mode: 0644]
hphp/test/slow/ext_pdo/ext_pdo.php
hphp/test/slow/hhbbc/func_family_009-1.inc [new file with mode: 0644]
hphp/test/slow/hhbbc/func_family_009-2.inc [new file with mode: 0644]
hphp/test/slow/hhbbc/func_family_009.php
hphp/test/slow/hhbbc/private_props_006-1.inc [new file with mode: 0644]
hphp/test/slow/hhbbc/private_props_006-2.inc [new file with mode: 0644]
hphp/test/slow/hhbbc/private_props_006.php
hphp/test/slow/hhbbc/static_props_018-1.inc [new file with mode: 0644]
hphp/test/slow/hhbbc/static_props_018-2.inc [new file with mode: 0644]
hphp/test/slow/hint/2192-1.inc [new file with mode: 0644]
hphp/test/slow/hint/2192-2.inc [new file with mode: 0644]
hphp/test/slow/hint/2192.php
hphp/test/slow/inlining/1831.inc [new file with mode: 0644]
hphp/test/slow/inlining/1831.php
hphp/test/slow/inlining/1836.inc [new file with mode: 0644]
hphp/test/slow/inlining/1836.php
hphp/test/slow/inner_class/10.php [deleted file]
hphp/test/slow/inner_class/10.php.expect [deleted file]
hphp/test/slow/inner_class/8.php [deleted file]
hphp/test/slow/inner_class/8.php.expect [deleted file]
hphp/test/slow/late_static_binding/1880-1.inc [new file with mode: 0644]
hphp/test/slow/late_static_binding/1880-2.inc [new file with mode: 0644]
hphp/test/slow/late_static_binding/1880.php
hphp/test/slow/namespace/2227-1.inc [new file with mode: 0644]
hphp/test/slow/namespace/2227-2.inc [new file with mode: 0644]
hphp/test/slow/namespace/2227.php
hphp/test/slow/namespace/autoload.inc [new file with mode: 0644]
hphp/test/slow/namespace/autoload.php
hphp/test/slow/object/static_inits_2-1.inc [new file with mode: 0644]
hphp/test/slow/object/static_inits_2-2.inc [new file with mode: 0644]
hphp/test/slow/object/static_inits_2.php
hphp/test/slow/object_magic_method/763-1.inc [new file with mode: 0644]
hphp/test/slow/object_magic_method/763-2.inc [new file with mode: 0644]
hphp/test/slow/object_magic_method/763.php
hphp/test/slow/object_property/684-1.inc [new file with mode: 0644]
hphp/test/slow/object_property/684-2.inc [new file with mode: 0644]
hphp/test/slow/object_property/684.php
hphp/test/slow/object_property/685-1.inc [new file with mode: 0644]
hphp/test/slow/object_property/685-2.inc [new file with mode: 0644]
hphp/test/slow/object_property/685.php
hphp/test/slow/object_property/686.inc [new file with mode: 0644]
hphp/test/slow/object_property/686.php
hphp/test/slow/object_property/688.inc [new file with mode: 0644]
hphp/test/slow/object_property/688.php
hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php [deleted file]
hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.expectf [deleted file]
hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.hphp_opts [deleted file]
hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.opts [deleted file]
hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php [deleted file]
hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.expectf [deleted file]
hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.hphp_opts [deleted file]
hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.opts [deleted file]
hphp/test/slow/reflection/1353-1.inc [new file with mode: 0644]
hphp/test/slow/reflection/1353-2.inc [new file with mode: 0644]
hphp/test/slow/reflection/1353-3.inc [new file with mode: 0644]
hphp/test/slow/reflection/1353.php
hphp/test/slow/reflection/case_insensitive_get_class_methods.php
hphp/test/slow/reflection_classes/1356-1.inc [new file with mode: 0644]
hphp/test/slow/reflection_classes/1356-2.inc [new file with mode: 0644]
hphp/test/slow/reflection_classes/1356.php
hphp/test/slow/reflection_classes/1360-1.inc [new file with mode: 0644]
hphp/test/slow/reflection_classes/1360-2.inc [new file with mode: 0644]
hphp/test/slow/reflection_classes/1360.php
hphp/test/slow/rx/body/defines-includes.php
hphp/test/slow/rx/body/defines-includes.php.expectf
hphp/test/slow/serialize/incomplete_class_apc_serialize.inc [new file with mode: 0644]
hphp/test/slow/serialize/incomplete_class_apc_serialize.php
hphp/test/slow/traits/2127.inc [copied from hphp/test/slow/traits/2127.php with 58% similarity]
hphp/test/slow/traits/2127.php
hphp/test/slow/traits/abstract-final-override.inc [new file with mode: 0644]
hphp/test/slow/traits/abstract-final-override.php
hphp/test/slow/traits/conditional_fatal-1.inc [new file with mode: 0644]
hphp/test/slow/traits/conditional_fatal-2.inc [new file with mode: 0644]
hphp/test/slow/traits/conditional_fatal.php
hphp/test/slow/traits/duplicate_require2-1.inc [new file with mode: 0644]
hphp/test/slow/traits/duplicate_require2-2.inc [new file with mode: 0644]
hphp/test/slow/traits/duplicate_require2-3.inc [new file with mode: 0644]
hphp/test/slow/traits/duplicate_require2-4.inc [new file with mode: 0644]
hphp/test/slow/traits/duplicate_require2-5.inc [new file with mode: 0644]
hphp/test/slow/traits/duplicate_require2.php
hphp/test/slow/traits/duplicate_require2.php.expectf
hphp/test/slow/traits/fatal_missing_trait.inc [new file with mode: 0644]
hphp/test/slow/traits/fatal_missing_trait.php
hphp/test/slow/traits/non-unique-base-1.inc [new file with mode: 0644]
hphp/test/slow/traits/non-unique-base-2.inc [new file with mode: 0644]
hphp/test/slow/traits/non-unique-base.php
hphp/test/slow/traits/require_constraint_iface_implements_error.inc [new file with mode: 0644]
hphp/test/slow/traits/require_constraint_iface_implements_error.php
hphp/test/slow/traits/require_constraint_iface_implements_error.php.expectf
hphp/test/slow/type_assertions/1860-1.inc [new file with mode: 0644]
hphp/test/slow/type_assertions/1860-2.inc [new file with mode: 0644]
hphp/test/slow/type_assertions/1860.php
hphp/test/slow/type_assertions/1862-1.inc [new file with mode: 0644]
hphp/test/slow/type_assertions/1862-2.inc [new file with mode: 0644]
hphp/test/slow/type_assertions/1862.php
hphp/test/slow/type_assertions/enum-param-2.inc [new file with mode: 0644]
hphp/test/slow/type_assertions/enum-param-2.php
hphp/test/slow/yield/2165.php [deleted file]
hphp/test/slow/yield/2165.php.expect [deleted file]
hphp/test/slow/yield/2165.php.hphp_opts [deleted file]
hphp/test/slow/yield/2165.php.opts [deleted symlink]
hphp/test/slow/yield/2182-1.inc [new file with mode: 0644]
hphp/test/slow/yield/2182-2.inc [new file with mode: 0644]
hphp/test/slow/yield/2182.php
hphp/test/slow/zend/class_alias2.inc [new file with mode: 0644]
hphp/test/slow/zend/class_alias2.php

index c1f7bac..281b992 100644 (file)
@@ -59,44 +59,11 @@ trait TR2 implements I0, I1<int> {
   require implements I2;
 }
 
-# For multiple declarations of the same class we union the possible base types.
-if (rand()) {
-  class CL3 extends CL0 {
-    use TR0;
-  }
-} else {
-  class CL3 implements I0 {
-    use TR0;
-  }
-}
-
 enum E0 : int {
   EV0 = 0;
   EV1 = 1;
 }
 
-if (rand()) {
-  class M0 {
-  }
-} else {
-  interface M0 {
-  }
-}
-
-if (rand()) {
-  final class M1 {
-  }
-} else {
-  abstract class M1 {
-  }
-}
-
-# Does not compile.
-# function f9() {
-#   const CO6 = 1;
-# }
-
-
 #
 # Execute single-threaded test
 #
index 04baa45..7056403 100644 (file)
@@ -2,13 +2,13 @@ array(3) {
   ["%s"]=>
   array(7) {
     ["md5sum0"]=>
-    int(4383056505853746297)
+    int(710971236120442494)
     ["md5sum1"]=>
-    int(-2974079675222806495)
+    int(7581368581380780967)
     ["sha1sum"]=>
-    string(40) "394475b1e5c57740f3fde1b4cc1e10efc49265ba"
+    string(40) "fe215048b54d55d538c1f82799f9db15f36f3ba6"
     ["types"]=>
-    array(13) {
+    array(10) {
       [0]=>
       array(4) {
         ["name"]=>
@@ -58,24 +58,6 @@ array(3) {
       [3]=>
       array(4) {
         ["name"]=>
-        string(3) "CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        array(3) {
-          [0]=>
-          string(3) "CL0"
-          [1]=>
-          string(2) "I0"
-          [2]=>
-          string(3) "TR0"
-        }
-      }
-      [4]=>
-      array(4) {
-        ["name"]=>
         string(2) "E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -87,7 +69,7 @@ array(3) {
           string(14) "HH\BuiltinEnum"
         }
       }
-      [5]=>
+      [4]=>
       array(5) {
         ["name"]=>
         string(2) "I0"
@@ -102,7 +84,7 @@ array(3) {
         array(0) {
         }
       }
-      [6]=>
+      [5]=>
       array(5) {
         ["name"]=>
         string(2) "I1"
@@ -117,7 +99,7 @@ array(3) {
         array(0) {
         }
       }
-      [7]=>
+      [6]=>
       array(5) {
         ["name"]=>
         string(2) "I2"
@@ -138,31 +120,7 @@ array(3) {
           string(3) "CL1"
         }
       }
-      [8]=>
-      array(4) {
-        ["name"]=>
-        string(2) "M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [9]=>
-      array(4) {
-        ["name"]=>
-        string(2) "M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [10]=>
+      [7]=>
       array(6) {
         ["name"]=>
         string(3) "TR0"
@@ -180,7 +138,7 @@ array(3) {
         array(0) {
         }
       }
-      [11]=>
+      [8]=>
       array(6) {
         ["name"]=>
         string(3) "TR1"
@@ -198,7 +156,7 @@ array(3) {
         array(0) {
         }
       }
-      [12]=>
+      [9]=>
       array(6) {
         ["name"]=>
         string(3) "TR2"
@@ -260,13 +218,13 @@ array(3) {
   ["%s"]=>
   array(7) {
     ["md5sum0"]=>
-    int(-766628480674557984)
+    int(-6166587352886191145)
     ["md5sum1"]=>
-    int(4132325208887423240)
+    int(3538371896544415899)
     ["sha1sum"]=>
-    string(40) "50e891dd1b93031067bca08fb2adcd3bc9a4d0e4"
+    string(40) "de7817eb10fce40db6d90ab9ac1234fbbee4469a"
     ["types"]=>
-    array(13) {
+    array(10) {
       [0]=>
       array(4) {
         ["name"]=>
@@ -316,24 +274,6 @@ array(3) {
       [3]=>
       array(4) {
         ["name"]=>
-        string(6) "NS\CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        array(3) {
-          [0]=>
-          string(6) "NS\CL0"
-          [1]=>
-          string(5) "NS\I0"
-          [2]=>
-          string(6) "NS\TR0"
-        }
-      }
-      [4]=>
-      array(4) {
-        ["name"]=>
         string(5) "NS\E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -345,7 +285,7 @@ array(3) {
           string(14) "HH\BuiltinEnum"
         }
       }
-      [5]=>
+      [4]=>
       array(5) {
         ["name"]=>
         string(5) "NS\I0"
@@ -360,7 +300,7 @@ array(3) {
         array(0) {
         }
       }
-      [6]=>
+      [5]=>
       array(5) {
         ["name"]=>
         string(5) "NS\I1"
@@ -375,7 +315,7 @@ array(3) {
         array(0) {
         }
       }
-      [7]=>
+      [6]=>
       array(5) {
         ["name"]=>
         string(5) "NS\I2"
@@ -396,31 +336,7 @@ array(3) {
           string(6) "NS\CL1"
         }
       }
-      [8]=>
-      array(4) {
-        ["name"]=>
-        string(5) "NS\M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [9]=>
-      array(4) {
-        ["name"]=>
-        string(5) "NS\M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [10]=>
+      [7]=>
       array(6) {
         ["name"]=>
         string(6) "NS\TR0"
@@ -438,7 +354,7 @@ array(3) {
         array(0) {
         }
       }
-      [11]=>
+      [8]=>
       array(6) {
         ["name"]=>
         string(6) "NS\TR1"
@@ -456,7 +372,7 @@ array(3) {
         array(0) {
         }
       }
-      [12]=>
+      [9]=>
       array(6) {
         ["name"]=>
         string(6) "NS\TR2"
@@ -518,13 +434,13 @@ array(3) {
   ["%s"]=>
   array(7) {
     ["md5sum0"]=>
-    int(177695044982738465)
+    int(3932987630331472577)
     ["md5sum1"]=>
-    int(321704508444983991)
+    int(-7802989863953681645)
     ["sha1sum"]=>
-    string(40) "9d0fa69dd74b7da21b9fa8b3c56ef5456feffd51"
+    string(40) "2a8128c198b86655f2eb28d7b95f894f2df78608"
     ["types"]=>
-    array(13) {
+    array(10) {
       [0]=>
       array(4) {
         ["name"]=>
@@ -574,24 +490,6 @@ array(3) {
       [3]=>
       array(4) {
         ["name"]=>
-        string(9) "NS\NS\CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        array(3) {
-          [0]=>
-          string(9) "NS\NS\CL0"
-          [1]=>
-          string(8) "NS\NS\I0"
-          [2]=>
-          string(9) "NS\NS\TR0"
-        }
-      }
-      [4]=>
-      array(4) {
-        ["name"]=>
         string(8) "NS\NS\E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -603,7 +501,7 @@ array(3) {
           string(14) "HH\BuiltinEnum"
         }
       }
-      [5]=>
+      [4]=>
       array(5) {
         ["name"]=>
         string(8) "NS\NS\I0"
@@ -618,7 +516,7 @@ array(3) {
         array(0) {
         }
       }
-      [6]=>
+      [5]=>
       array(5) {
         ["name"]=>
         string(8) "NS\NS\I1"
@@ -633,7 +531,7 @@ array(3) {
         array(0) {
         }
       }
-      [7]=>
+      [6]=>
       array(5) {
         ["name"]=>
         string(8) "NS\NS\I2"
@@ -654,31 +552,7 @@ array(3) {
           string(9) "NS\NS\CL1"
         }
       }
-      [8]=>
-      array(4) {
-        ["name"]=>
-        string(8) "NS\NS\M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [9]=>
-      array(4) {
-        ["name"]=>
-        string(8) "NS\NS\M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [10]=>
+      [7]=>
       array(6) {
         ["name"]=>
         string(9) "NS\NS\TR0"
@@ -696,7 +570,7 @@ array(3) {
         array(0) {
         }
       }
-      [11]=>
+      [8]=>
       array(6) {
         ["name"]=>
         string(9) "NS\NS\TR1"
@@ -714,7 +588,7 @@ array(3) {
         array(0) {
         }
       }
-      [12]=>
+      [9]=>
       array(6) {
         ["name"]=>
         string(9) "NS\NS\TR2"
diff --git a/hphp/test/slow/dv_array/ext_pdo/ext_pdo.inc b/hphp/test/slow/dv_array/ext_pdo/ext_pdo.inc
new file mode 100644 (file)
index 0000000..ed39a0b
--- /dev/null
@@ -0,0 +1,5 @@
+<?hh
+
+class MyShadyObject {}
+
+$x = 1;
index f3c3c4f..a8b4480 100644 (file)
@@ -88,8 +88,7 @@ try {
   $vstmt = $dbh->query("select * from foo", PDO::FETCH_COLUMN, 0);
   var_dump($vstmt->fetchAll());
 
-  class MyShadyObject {
-  }
+  include 'ext_pdo.inc';
 
   //Test object fetching
   foreach ($dbh->query("select * from foo", PDO::FETCH_CLASS,
index c1f7bac..281b992 100644 (file)
@@ -59,44 +59,11 @@ trait TR2 implements I0, I1<int> {
   require implements I2;
 }
 
-# For multiple declarations of the same class we union the possible base types.
-if (rand()) {
-  class CL3 extends CL0 {
-    use TR0;
-  }
-} else {
-  class CL3 implements I0 {
-    use TR0;
-  }
-}
-
 enum E0 : int {
   EV0 = 0;
   EV1 = 1;
 }
 
-if (rand()) {
-  class M0 {
-  }
-} else {
-  interface M0 {
-  }
-}
-
-if (rand()) {
-  final class M1 {
-  }
-} else {
-  abstract class M1 {
-  }
-}
-
-# Does not compile.
-# function f9() {
-#   const CO6 = 1;
-# }
-
-
 #
 # Execute single-threaded test
 #
index cafef66..8383a84 100644 (file)
@@ -2,13 +2,13 @@ dict(3) {
   ["%s"]=>
   dict(7) {
     ["md5sum0"]=>
-    int(4383056505853746297)
+    int(710971236120442494)
     ["md5sum1"]=>
-    int(-2974079675222806495)
+    int(7581368581380780967)
     ["sha1sum"]=>
-    string(40) "394475b1e5c57740f3fde1b4cc1e10efc49265ba"
+    string(40) "fe215048b54d55d538c1f82799f9db15f36f3ba6"
     ["types"]=>
-    vec(13) {
+    vec(10) {
       dict(4) {
         ["name"]=>
         string(3) "CL0"
@@ -49,20 +49,6 @@ dict(3) {
       }
       dict(4) {
         ["name"]=>
-        string(3) "CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        vec(3) {
-          string(3) "CL0"
-          string(2) "I0"
-          string(3) "TR0"
-        }
-      }
-      dict(4) {
-        ["name"]=>
         string(2) "E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -118,28 +104,6 @@ dict(3) {
           string(3) "CL1"
         }
       }
-      dict(4) {
-        ["name"]=>
-        string(2) "M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        vec(0) {
-        }
-      }
-      dict(4) {
-        ["name"]=>
-        string(2) "M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        vec(0) {
-        }
-      }
       dict(6) {
         ["name"]=>
         string(3) "TR0"
@@ -220,13 +184,13 @@ dict(3) {
   ["%s"]=>
   dict(7) {
     ["md5sum0"]=>
-    int(-766628480674557984)
+    int(-6166587352886191145)
     ["md5sum1"]=>
-    int(4132325208887423240)
+    int(3538371896544415899)
     ["sha1sum"]=>
-    string(40) "50e891dd1b93031067bca08fb2adcd3bc9a4d0e4"
+    string(40) "de7817eb10fce40db6d90ab9ac1234fbbee4469a"
     ["types"]=>
-    vec(13) {
+    vec(10) {
       dict(4) {
         ["name"]=>
         string(6) "NS\CL0"
@@ -267,20 +231,6 @@ dict(3) {
       }
       dict(4) {
         ["name"]=>
-        string(6) "NS\CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        vec(3) {
-          string(6) "NS\CL0"
-          string(5) "NS\I0"
-          string(6) "NS\TR0"
-        }
-      }
-      dict(4) {
-        ["name"]=>
         string(5) "NS\E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -336,28 +286,6 @@ dict(3) {
           string(6) "NS\CL1"
         }
       }
-      dict(4) {
-        ["name"]=>
-        string(5) "NS\M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        vec(0) {
-        }
-      }
-      dict(4) {
-        ["name"]=>
-        string(5) "NS\M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        vec(0) {
-        }
-      }
       dict(6) {
         ["name"]=>
         string(6) "NS\TR0"
@@ -438,13 +366,13 @@ dict(3) {
   ["%s"]=>
   dict(7) {
     ["md5sum0"]=>
-    int(177695044982738465)
+    int(3932987630331472577)
     ["md5sum1"]=>
-    int(321704508444983991)
+    int(-7802989863953681645)
     ["sha1sum"]=>
-    string(40) "9d0fa69dd74b7da21b9fa8b3c56ef5456feffd51"
+    string(40) "2a8128c198b86655f2eb28d7b95f894f2df78608"
     ["types"]=>
-    vec(13) {
+    vec(10) {
       dict(4) {
         ["name"]=>
         string(9) "NS\NS\CL0"
@@ -485,20 +413,6 @@ dict(3) {
       }
       dict(4) {
         ["name"]=>
-        string(9) "NS\NS\CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        vec(3) {
-          string(9) "NS\NS\CL0"
-          string(8) "NS\NS\I0"
-          string(9) "NS\NS\TR0"
-        }
-      }
-      dict(4) {
-        ["name"]=>
         string(8) "NS\NS\E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -554,28 +468,6 @@ dict(3) {
           string(9) "NS\NS\CL1"
         }
       }
-      dict(4) {
-        ["name"]=>
-        string(8) "NS\NS\M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        vec(0) {
-        }
-      }
-      dict(4) {
-        ["name"]=>
-        string(8) "NS\NS\M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        vec(0) {
-        }
-      }
       dict(6) {
         ["name"]=>
         string(9) "NS\NS\TR0"
diff --git a/hphp/test/slow/dv_array_hack_arr/ext_pdo/ext_pdo.inc b/hphp/test/slow/dv_array_hack_arr/ext_pdo/ext_pdo.inc
new file mode 100644 (file)
index 0000000..5de0784
--- /dev/null
@@ -0,0 +1,4 @@
+<?hh
+
+class MyShadyObject {}
+$x = 1;
index f3c3c4f..a8b4480 100644 (file)
@@ -88,8 +88,7 @@ try {
   $vstmt = $dbh->query("select * from foo", PDO::FETCH_COLUMN, 0);
   var_dump($vstmt->fetchAll());
 
-  class MyShadyObject {
-  }
+  include 'ext_pdo.inc';
 
   //Test object fetching
   foreach ($dbh->query("select * from foo", PDO::FETCH_CLASS,
diff --git a/hphp/test/slow/ext_enum/enum-cache-1.inc b/hphp/test/slow/ext_enum/enum-cache-1.inc
new file mode 100644 (file)
index 0000000..505cfd5
--- /dev/null
@@ -0,0 +1,4 @@
+<?hh
+
+class Foo { const ABC = 42; }
+$x = 1;
diff --git a/hphp/test/slow/ext_enum/enum-cache-2.inc b/hphp/test/slow/ext_enum/enum-cache-2.inc
new file mode 100644 (file)
index 0000000..6f855b0
--- /dev/null
@@ -0,0 +1,4 @@
+<?hh
+
+class Foo { const ABC = 24; }
+$x = 1;
index 9f6d980..f78cb7b 100644 (file)
@@ -1,9 +1,9 @@
 <?hh
 
 if (apc_add('i_was_already_run', 1)) {
-  class Foo { const ABC = 42; }
+  include 'enum-cache-1.inc';
 } else {
-  class Foo { const ABC = 24; }
+  include 'enum-cache-2.inc';
 }
 
 enum Bar: int {
index 172a74c..20ec92f 100644 (file)
@@ -61,38 +61,11 @@ trait TR2 implements I0, I1<int> {
   require implements I2;
 }
 
-# For multiple declarations of the same class we union the possible base types.
-if (rand()) {
-  class CL3 extends CL0 {
-    use TR0;
-  }
-} else {
-  class CL3 implements I0 {
-    use TR0;
-  }
-}
-
 enum E0 : int {
   EV0 = 0;
   EV1 = 1;
 }
 
-if (rand()) {
-  class M0 {
-  }
-} else {
-  interface M0 {
-  }
-}
-
-if (rand()) {
-  final class M1 {
-  }
-} else {
-  abstract class M1 {
-  }
-}
-
 const CO5 = 1;
 function f6() {
 
index e8457eb..0e77d56 100644 (file)
@@ -2,13 +2,13 @@ array(3) {
   ["%s"]=>
   array(7) {
     ["md5sum0"]=>
-    int(-3861027485470727459)
+    int(5847182631555274887)
     ["md5sum1"]=>
-    int(-8858808937750669966)
+    int(3481378507969217468)
     ["sha1sum"]=>
-    string(40) "00c83df7c8b6dd0c49761f134c8f987277cd1f3b"
+    string(40) "1b6802d084ff6d149e4fc8732fa21ac9fa2a99fd"
     ["types"]=>
-    array(13) {
+    array(10) {
       [0]=>
       array(4) {
         ["name"]=>
@@ -58,24 +58,6 @@ array(3) {
       [3]=>
       array(4) {
         ["name"]=>
-        string(3) "CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        array(3) {
-          [0]=>
-          string(3) "CL0"
-          [1]=>
-          string(2) "I0"
-          [2]=>
-          string(3) "TR0"
-        }
-      }
-      [4]=>
-      array(4) {
-        ["name"]=>
         string(2) "E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -87,7 +69,7 @@ array(3) {
           string(14) "HH\BuiltinEnum"
         }
       }
-      [5]=>
+      [4]=>
       array(5) {
         ["name"]=>
         string(2) "I0"
@@ -102,7 +84,7 @@ array(3) {
         array(0) {
         }
       }
-      [6]=>
+      [5]=>
       array(5) {
         ["name"]=>
         string(2) "I1"
@@ -117,7 +99,7 @@ array(3) {
         array(0) {
         }
       }
-      [7]=>
+      [6]=>
       array(5) {
         ["name"]=>
         string(2) "I2"
@@ -138,31 +120,7 @@ array(3) {
           string(3) "CL1"
         }
       }
-      [8]=>
-      array(4) {
-        ["name"]=>
-        string(2) "M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [9]=>
-      array(4) {
-        ["name"]=>
-        string(2) "M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [10]=>
+      [7]=>
       array(6) {
         ["name"]=>
         string(3) "TR0"
@@ -180,7 +138,7 @@ array(3) {
         array(0) {
         }
       }
-      [11]=>
+      [8]=>
       array(6) {
         ["name"]=>
         string(3) "TR1"
@@ -198,7 +156,7 @@ array(3) {
         array(0) {
         }
       }
-      [12]=>
+      [9]=>
       array(6) {
         ["name"]=>
         string(3) "TR2"
@@ -266,13 +224,13 @@ array(3) {
   ["%s"]=>
   array(7) {
     ["md5sum0"]=>
-    int(6436421051758208165)
+    int(8976002834016918693)
     ["md5sum1"]=>
-    int(9188452903145866726)
+    int(3598343421291560646)
     ["sha1sum"]=>
-    string(40) "36de5b67b028821d73c62f34ec9dd23df48b1d1a"
+    string(40) "a8d9ef14bdef31963d04d6876091a838affc294d"
     ["types"]=>
-    array(13) {
+    array(10) {
       [0]=>
       array(4) {
         ["name"]=>
@@ -322,24 +280,6 @@ array(3) {
       [3]=>
       array(4) {
         ["name"]=>
-        string(6) "NS\CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        array(3) {
-          [0]=>
-          string(6) "NS\CL0"
-          [1]=>
-          string(5) "NS\I0"
-          [2]=>
-          string(6) "NS\TR0"
-        }
-      }
-      [4]=>
-      array(4) {
-        ["name"]=>
         string(5) "NS\E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -351,7 +291,7 @@ array(3) {
           string(14) "HH\BuiltinEnum"
         }
       }
-      [5]=>
+      [4]=>
       array(5) {
         ["name"]=>
         string(5) "NS\I0"
@@ -366,7 +306,7 @@ array(3) {
         array(0) {
         }
       }
-      [6]=>
+      [5]=>
       array(5) {
         ["name"]=>
         string(5) "NS\I1"
@@ -381,7 +321,7 @@ array(3) {
         array(0) {
         }
       }
-      [7]=>
+      [6]=>
       array(5) {
         ["name"]=>
         string(5) "NS\I2"
@@ -402,31 +342,7 @@ array(3) {
           string(6) "NS\CL1"
         }
       }
-      [8]=>
-      array(4) {
-        ["name"]=>
-        string(5) "NS\M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [9]=>
-      array(4) {
-        ["name"]=>
-        string(5) "NS\M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [10]=>
+      [7]=>
       array(6) {
         ["name"]=>
         string(6) "NS\TR0"
@@ -444,7 +360,7 @@ array(3) {
         array(0) {
         }
       }
-      [11]=>
+      [8]=>
       array(6) {
         ["name"]=>
         string(6) "NS\TR1"
@@ -462,7 +378,7 @@ array(3) {
         array(0) {
         }
       }
-      [12]=>
+      [9]=>
       array(6) {
         ["name"]=>
         string(6) "NS\TR2"
@@ -530,13 +446,13 @@ array(3) {
   ["%s"]=>
   array(7) {
     ["md5sum0"]=>
-    int(-8066121374149064878)
+    int(-6054288473884565970)
     ["md5sum1"]=>
-    int(-297091211146495419)
+    int(3406070686178755711)
     ["sha1sum"]=>
-    string(40) "60552768b310b10c09a65f11649b58630deebeec"
+    string(40) "1a64239b4ab6e3bffc67b8cbf2ce008c22e3a130"
     ["types"]=>
-    array(13) {
+    array(10) {
       [0]=>
       array(4) {
         ["name"]=>
@@ -586,24 +502,6 @@ array(3) {
       [3]=>
       array(4) {
         ["name"]=>
-        string(9) "NS\NS\CL3"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(4)
-        ["baseTypes"]=>
-        array(3) {
-          [0]=>
-          string(9) "NS\NS\CL0"
-          [1]=>
-          string(8) "NS\NS\I0"
-          [2]=>
-          string(9) "NS\NS\TR0"
-        }
-      }
-      [4]=>
-      array(4) {
-        ["name"]=>
         string(8) "NS\NS\E0"
         ["kindOf"]=>
         string(4) "enum"
@@ -615,7 +513,7 @@ array(3) {
           string(14) "HH\BuiltinEnum"
         }
       }
-      [5]=>
+      [4]=>
       array(5) {
         ["name"]=>
         string(8) "NS\NS\I0"
@@ -630,7 +528,7 @@ array(3) {
         array(0) {
         }
       }
-      [6]=>
+      [5]=>
       array(5) {
         ["name"]=>
         string(8) "NS\NS\I1"
@@ -645,7 +543,7 @@ array(3) {
         array(0) {
         }
       }
-      [7]=>
+      [6]=>
       array(5) {
         ["name"]=>
         string(8) "NS\NS\I2"
@@ -666,31 +564,7 @@ array(3) {
           string(9) "NS\NS\CL1"
         }
       }
-      [8]=>
-      array(4) {
-        ["name"]=>
-        string(8) "NS\NS\M0"
-        ["kindOf"]=>
-        string(5) "mixed"
-        ["flags"]=>
-        int(5)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [9]=>
-      array(4) {
-        ["name"]=>
-        string(8) "NS\NS\M1"
-        ["kindOf"]=>
-        string(5) "class"
-        ["flags"]=>
-        int(7)
-        ["baseTypes"]=>
-        array(0) {
-        }
-      }
-      [10]=>
+      [7]=>
       array(6) {
         ["name"]=>
         string(9) "NS\NS\TR0"
@@ -708,7 +582,7 @@ array(3) {
         array(0) {
         }
       }
-      [11]=>
+      [8]=>
       array(6) {
         ["name"]=>
         string(9) "NS\NS\TR1"
@@ -726,7 +600,7 @@ array(3) {
         array(0) {
         }
       }
-      [12]=>
+      [9]=>
       array(6) {
         ["name"]=>
         string(9) "NS\NS\TR2"
diff --git a/hphp/test/slow/ext_misc/1377.inc b/hphp/test/slow/ext_misc/1377.inc
new file mode 100644 (file)
index 0000000..e2fb242
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class C {}
+$x = 1;
index 2e1d57b..e78a0ec 100644 (file)
@@ -7,8 +7,7 @@ function test() {
   var_dump(is_subclass_of('C', 'D'));
   var_dump(get_class_methods('C'));
   var_dump(method_exists('C', 'foo'));
-  class C {
-}
+  include '1377.inc';
   var_dump(is_subclass_of('C', 'D'));
   var_dump(is_subclass_of('C', 'C'));
 }
diff --git a/hphp/test/slow/ext_pdo/ext_pdo.inc b/hphp/test/slow/ext_pdo/ext_pdo.inc
new file mode 100644 (file)
index 0000000..5de0784
--- /dev/null
@@ -0,0 +1,4 @@
+<?hh
+
+class MyShadyObject {}
+$x = 1;
index 566e96f..df1fb17 100644 (file)
@@ -87,8 +87,7 @@ try {
   $vstmt = $dbh->query("select * from foo", PDO::FETCH_COLUMN, 0);
   var_dump($vstmt->fetchAll());
 
-  class MyShadyObject {
-  }
+  include 'ext_pdo.inc';
 
   //Test object fetching
   foreach ($dbh->query("select * from foo", PDO::FETCH_CLASS,
diff --git a/hphp/test/slow/hhbbc/func_family_009-1.inc b/hphp/test/slow/hhbbc/func_family_009-1.inc
new file mode 100644 (file)
index 0000000..5b1aa2d
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+abstract class Middle extends Base {
+  abstract function abs();
+
+  function concrete_override() {
+    $x = parent::concrete_override();
+    return null;
+  }
+}
+class Derived extends Middle {
+  function abs() {}
+}
+$x = 1;
diff --git a/hphp/test/slow/hhbbc/func_family_009-2.inc b/hphp/test/slow/hhbbc/func_family_009-2.inc
new file mode 100644 (file)
index 0000000..66ec828
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+
+class Derived extends Base {
+  function concrete_override() { return 2; }
+}
+$x = 1;
index 0d358c8..52afb01 100644 (file)
@@ -14,21 +14,9 @@ function main(Base $b) {
 <<__EntryPoint>>
 function main_func_family_009() {
 if (mt_rand() > 100) {
-  abstract class Middle extends Base {
-    abstract function abs();
-
-    function concrete_override() {
-      $x = parent::concrete_override();
-      return null;
-    }
-  }
-  class Derived extends Middle {
-    function abs() {}
-  }
+  include 'func_family_009-1.inc';
 } else {
-  class Derived extends Base {
-    function concrete_override() { return 2; }
-  }
+  include 'func_family_009-2.inc';
 }
 
 main(new Base);
diff --git a/hphp/test/slow/hhbbc/private_props_006-1.inc b/hphp/test/slow/hhbbc/private_props_006-1.inc
new file mode 100644 (file)
index 0000000..e9c6e90
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+class Bar {
+  const A = "asd";
+}
+$x = 1;
diff --git a/hphp/test/slow/hhbbc/private_props_006-2.inc b/hphp/test/slow/hhbbc/private_props_006-2.inc
new file mode 100644 (file)
index 0000000..435ac11
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+class Bar {
+  const B = 42;
+}
+$x = 1;
index fc753ca..f755dfa 100644 (file)
@@ -25,13 +25,9 @@ function main() {
 <<__EntryPoint>>
 function main_private_props_006() {
 if (mt_rand()) {
-  class Bar {
-    const A = "asd";
-  }
+  include 'private_props_006-1.inc';
 } else {
-  class Bar {
-    const B = 42;
-  }
+  include 'private_props_006-2.inc';
 }
 
 main();
diff --git a/hphp/test/slow/hhbbc/static_props_018-1.inc b/hphp/test/slow/hhbbc/static_props_018-1.inc
new file mode 100644 (file)
index 0000000..9e4a378
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class L { const A = 2; }
+$x = 1;
diff --git a/hphp/test/slow/hhbbc/static_props_018-2.inc b/hphp/test/slow/hhbbc/static_props_018-2.inc
new file mode 100644 (file)
index 0000000..e5e0916
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class L { const A = 3; }
+$x = 1;
diff --git a/hphp/test/slow/hint/2192-1.inc b/hphp/test/slow/hint/2192-1.inc
new file mode 100644 (file)
index 0000000..be95d6e
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+
+class X {
+  public function generator() {
+    yield 0;
+    yield 1;
+  }
+}
+$x = 1;
diff --git a/hphp/test/slow/hint/2192-2.inc b/hphp/test/slow/hint/2192-2.inc
new file mode 100644 (file)
index 0000000..5cca8f5
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+
+class X {
+  public function generator() {
+    yield 1;
+    yield 2;
+  }
+}
+$x = 1;
index 3b7d53e..469713c 100644 (file)
@@ -9,20 +9,10 @@ function decide() {
 function main_2192() {
 
 if (decide()) {
-  class X {
-    public function generator() {
-      yield 0;
-      yield 1;
-    }
-  }
+  include '2192-1.inc';
 }
  else {
-  class X {
-    public function generator() {
-      yield 1;
-      yield 2;
-    }
-  }
+  include '2192-2.inc';
 }
 $x = new X;
 foreach ($x->generator() as $v) {
diff --git a/hphp/test/slow/inlining/1831.inc b/hphp/test/slow/inlining/1831.inc
new file mode 100644 (file)
index 0000000..7c520e9
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class X {}
+$x = 1;
index f7ead0f..a902325 100644 (file)
@@ -1,13 +1,11 @@
 <?php
 
 function h() {
- class X{
+ include '1831.inc';
 }
-;
- }
 function f($a, $b, $c) {
  return h();
- }
+}
 function g($a, $b, $c) {
   return f($a++, $b++ + $a++, $c);
 }
diff --git a/hphp/test/slow/inlining/1836.inc b/hphp/test/slow/inlining/1836.inc
new file mode 100644 (file)
index 0000000..7c520e9
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class X {}
+$x = 1;
index 536d3cc..83626b4 100644 (file)
@@ -2,21 +2,19 @@
 
 function id($a) {
  return $a;
- }
+}
 class X {
 }
 class Y extends X {
- function t() {
+ function t() {}
 }
- }
 function test() {
   id(new Y)->t();
 }
 
 <<__EntryPoint>>
 function main_1836() {
-if (0) {
-  class X {
-}
-}
+  if (0) {
+    include '1836.inc';
+  }
 }
diff --git a/hphp/test/slow/inner_class/10.php b/hphp/test/slow/inner_class/10.php
deleted file mode 100644 (file)
index 6a462dd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-function test() {
- class test {
- function p() {
- print 'test';
-}
- }
-}
-
- <<__EntryPoint>>
-function main_10() {
-test();
- $obj = new Test();
- $obj->p();
-}
diff --git a/hphp/test/slow/inner_class/10.php.expect b/hphp/test/slow/inner_class/10.php.expect
deleted file mode 100644 (file)
index 30d74d2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-test
\ No newline at end of file
diff --git a/hphp/test/slow/inner_class/8.php b/hphp/test/slow/inner_class/8.php
deleted file mode 100644 (file)
index 5bc0f64..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-class test {
- function p() {
- print 'test';
-}
- }
-
- <<__EntryPoint>>
-function main_8() {
-$obj = new Test();
- $obj->p();
-}
diff --git a/hphp/test/slow/inner_class/8.php.expect b/hphp/test/slow/inner_class/8.php.expect
deleted file mode 100644 (file)
index 30d74d2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-test
\ No newline at end of file
diff --git a/hphp/test/slow/late_static_binding/1880-1.inc b/hphp/test/slow/late_static_binding/1880-1.inc
new file mode 100644 (file)
index 0000000..9131e15
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+  class A {
+    static $a = 'A';
+    static function f() {
+ echo static::$a;
+ }
+    function g() {
+ $this->f();
+ }
+  }
+  $x = 1;
diff --git a/hphp/test/slow/late_static_binding/1880-2.inc b/hphp/test/slow/late_static_binding/1880-2.inc
new file mode 100644 (file)
index 0000000..16d10cf
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class A {}
+$x = 1;
index 2165e37..5ec7098 100644 (file)
@@ -2,24 +2,14 @@
 
 function f() {
  return true;
- }
-if (f()) {
-  class A {
-    static $a = 'A';
-    static function f() {
- echo static::$a;
- }
-    function g() {
- $this->f();
- }
-  }
 }
- else {
-  class A {
- }
+if (f()) {
+  include '1880-1.inc';
+} else {
+  include '1880-2.inc';
 }
 class B extends A {
  static $a = 'B';
- }
+}
 $b = new B;
 $b->g();
diff --git a/hphp/test/slow/namespace/2227-1.inc b/hphp/test/slow/namespace/2227-1.inc
new file mode 100644 (file)
index 0000000..c1c7e25
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+
+namespace A\B;
+class B {
+  static $baz = 'baz';
+  const FOO = 30;
+  function f() {
+    return Foo::NoSuchConstant;
+  }
+}
+$x = 1;
diff --git a/hphp/test/slow/namespace/2227-2.inc b/hphp/test/slow/namespace/2227-2.inc
new file mode 100644 (file)
index 0000000..c1c7e25
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+
+namespace A\B;
+class B {
+  static $baz = 'baz';
+  const FOO = 30;
+  function f() {
+    return Foo::NoSuchConstant;
+  }
+}
+$x = 1;
index 343bee5..39817e3 100644 (file)
@@ -17,22 +17,10 @@ class Foo {
 <<__EntryPoint>>
 function main_2227() {
 if (\rand(0, 1)) {
-  class B {
-    static $baz = 'baz';
-    const FOO = 30;
-    function f() {
-      return Foo::NoSuchConstant;
-    }
-  }
+  include '2227-1.inc';
 }
  else {
-  class B {
-    static $baz = 'baz';
-    const FOO = 30;
-    function f() {
-      return Foo::NoSuchConstant;
-    }
-  }
+  include '2227-2.inc';
 }
 $f = new Foo(array(0));
 \var_dump(Foo::$baz);
diff --git a/hphp/test/slow/namespace/autoload.inc b/hphp/test/slow/namespace/autoload.inc
new file mode 100644 (file)
index 0000000..16d10cf
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class A {}
+$x = 1;
index 617213b..7f31bf1 100644 (file)
@@ -4,7 +4,7 @@ namespace {
   function __autoload($a) {
     \var_dump($a);
     if ($a == 'A') {
-      class A {};
+      include 'autoload.inc';
     }
   }
 }
diff --git a/hphp/test/slow/object/static_inits_2-1.inc b/hphp/test/slow/object/static_inits_2-1.inc
new file mode 100644 (file)
index 0000000..4c878ef
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+    class Zoo {
+      const Bar = 2;
+    }
+$x = 1;
diff --git a/hphp/test/slow/object/static_inits_2-2.inc b/hphp/test/slow/object/static_inits_2-2.inc
new file mode 100644 (file)
index 0000000..48548c2
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+    class Zoo {
+      const Baz = 4;
+    }
+$x = 1;
index 15f31be..249afc9 100644 (file)
@@ -4,13 +4,9 @@ function __autoload($x) {
 
   $GLOBALS['y'] = new stdclass;
   if (mt_rand()) {
-    class Zoo {
-      const Bar = 2;
-    }
+    include 'static_inits_2-1.inc';
   } else {
-    class Zoo {
-      const Baz = 4;
-    }
+    include 'static_inits_2-2.inc';
   }
 }
 
diff --git a/hphp/test/slow/object_magic_method/763-1.inc b/hphp/test/slow/object_magic_method/763-1.inc
new file mode 100644 (file)
index 0000000..7c520e9
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class X {}
+$x = 1;
diff --git a/hphp/test/slow/object_magic_method/763-2.inc b/hphp/test/slow/object_magic_method/763-2.inc
new file mode 100644 (file)
index 0000000..aa8a8ad
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+
+class X {
+  function foo() {
+    var_dump(__METHOD__);
+  }
+}
+$x = 1;
index 39c93a1..dffab3f 100644 (file)
@@ -1,15 +1,9 @@
 <?php
 
 if (isset($g)) {
- class X {
-}
- }
-else {
-  class X {
-    function foo() {
-      var_dump(__METHOD__);
-    }
-  }
+  include '763-1.inc';
+} else {
+  include '763-2.inc';
 }
 class Y extends X {
   function foo() {
@@ -17,8 +11,7 @@ class Y extends X {
     parent::foo();
   }
 }
-class Z extends X {
-}
+class Z extends X {}
 function test($t) {
   var_dump('test:'.$t);
   (new $t(1,2))->foo();
diff --git a/hphp/test/slow/object_property/684-1.inc b/hphp/test/slow/object_property/684-1.inc
new file mode 100644 (file)
index 0000000..16d10cf
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class A {}
+$x = 1;
diff --git a/hphp/test/slow/object_property/684-2.inc b/hphp/test/slow/object_property/684-2.inc
new file mode 100644 (file)
index 0000000..b7c6a82
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+ class A {
+ static $a = 100;
+ var $b = 1000;
+ }
+$x = 1;
index fa6e3c4..05d826d 100644 (file)
@@ -11,14 +11,10 @@ class B {
 <<__EntryPoint>>
 function main_684() {
 if (f()) {
- class A {
- }
+ include '684-1.inc';
  }
 else {
- class A {
- static $a = 100;
- var $b = 1000;
- }
+ include '684-2.inc';
  }
 $vars = get_class_vars('A');
  asort(&$vars);
diff --git a/hphp/test/slow/object_property/685-1.inc b/hphp/test/slow/object_property/685-1.inc
new file mode 100644 (file)
index 0000000..0959f21
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+class A {
+  var $a0;
+  static $a1 = 1;
+  static $a2 = 2;
+}
+class X {
+  var $x0;
+  static $x1 = 1;
+  static $x2 = 2;
+}
+$x = 1;
diff --git a/hphp/test/slow/object_property/685-2.inc b/hphp/test/slow/object_property/685-2.inc
new file mode 100644 (file)
index 0000000..eea78ad
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+class A {
+  var $a3;
+  static $a4 = 4;
+  static $a5 = 5;
+}
+class X {
+  var $y3;
+  static $y4 = 4;
+  static $y5 = 5;
+}
+$x = 1;
index c36e01c..57cc34d 100644 (file)
@@ -1,28 +1,10 @@
 <?php
 
 if (true) {
-  class A {
-    var $a0;
-    static $a1 = 1;
-    static $a2 = 2;
-  }
-  class X {
-    var $x0;
-    static $x1 = 1;
-    static $x2 = 2;
-  }
+  include '685-1.inc';
 }
  else {
-  class A {
-    var $a3;
-    static $a4 = 4;
-    static $a5 = 5;
-  }
-  class X {
-    var $y3;
-    static $y4 = 4;
-    static $y5 = 5;
-  }
+  include '685-2.inc';
 }
 class B extends A {
   var $b0 = 3;
diff --git a/hphp/test/slow/object_property/686.inc b/hphp/test/slow/object_property/686.inc
new file mode 100644 (file)
index 0000000..4668cca
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class R {}
+$x = 1;
index 3b03004..8ea5244 100644 (file)
@@ -66,8 +66,7 @@ $obj = new C;
  $obj->bar2();
 var_dump(serialize($obj));
 if (false) {
-  class R{
-}
+  include '686.inc';
 }
 $d = new D;
 $d->qq();
diff --git a/hphp/test/slow/object_property/688.inc b/hphp/test/slow/object_property/688.inc
new file mode 100644 (file)
index 0000000..7c520e9
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class X {}
+$x = 1;
index f66ed99..0da44fd 100644 (file)
@@ -18,10 +18,8 @@ function test() {
 
 <<__EntryPoint>>
 function main_688() {
-;
-if (0) {
- class X{
-}
- }
-test();
+  if (0) {
+    include '688.inc';
+  }
+  test();
 }
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php b/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php
deleted file mode 100644 (file)
index dfcb30d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?hh
-
-if (true) {
-  class A {} // bad
-} else {
-  class B {} // bad
-}
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.expectf b/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.expectf
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.hphp_opts b/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.hphp_opts
deleted file mode 100644 (file)
index 0114930..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
--vRuntime.Hack.Lang.Phpism.DisableNontoplevelDeclarations=false
--vEval.EnablePHP=1
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.opts b/hphp/test/slow/phpism/nontoplevel_decl_class_conditional2.php.opts
deleted file mode 100644 (file)
index 7e19110..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
--vHack.Lang.Phpism.DisableNontoplevelDeclarations=false
--vEval.EnablePHP=1
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php b/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php
deleted file mode 100644 (file)
index 634eacc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?hh
-function foo() : void {
-    class bar {};
-}
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.expectf b/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.expectf
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.hphp_opts b/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.hphp_opts
deleted file mode 100644 (file)
index 0114930..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
--vRuntime.Hack.Lang.Phpism.DisableNontoplevelDeclarations=false
--vEval.EnablePHP=1
diff --git a/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.opts b/hphp/test/slow/phpism/nontoplevel_decl_class_in_function2.php.opts
deleted file mode 100644 (file)
index 7e19110..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
--vHack.Lang.Phpism.DisableNontoplevelDeclarations=false
--vEval.EnablePHP=1
diff --git a/hphp/test/slow/reflection/1353-1.inc b/hphp/test/slow/reflection/1353-1.inc
new file mode 100644 (file)
index 0000000..e2fb242
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class C {}
+$x = 1;
diff --git a/hphp/test/slow/reflection/1353-2.inc b/hphp/test/slow/reflection/1353-2.inc
new file mode 100644 (file)
index 0000000..ab7fae3
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class M { function foo() {} }
+$x = 1;
diff --git a/hphp/test/slow/reflection/1353-3.inc b/hphp/test/slow/reflection/1353-3.inc
new file mode 100644 (file)
index 0000000..63eb8ec
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+class C {}
+class M {}
+$x = 1;
index a73a833..4f48630 100644 (file)
@@ -2,18 +2,9 @@
 
 function __autoload($name) {
   switch ($name) {
-    case 'C':      class C {
-}
-      break;
-    case 'M':      class M {
- function foo() {
-}
- }
-      break;
-    default: class C{
-}
- class M {
-}
+    case 'C': include '1353-1.inc'; break;
+    case 'M': include '1353-2.inc'; break;
+    default:  include '1353-3.inc'; break;
   }
   var_dump($name);
 }
index fc5b7d4..0544691 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-function main() {
-
 class A {
   public function b() {}
 }
@@ -26,13 +24,9 @@ class J {
 }
 class K extends J implements H {}
 
-var_dump(get_class_methods('C'));
-var_dump(get_class_methods('G'));
-var_dump(get_class_methods('K'));
-
-}
-
 <<__EntryPoint>>
 function main_case_insensitive_get_class_methods() {
-main();
+  var_dump(get_class_methods('C'));
+  var_dump(get_class_methods('G'));
+  var_dump(get_class_methods('K'));
 }
diff --git a/hphp/test/slow/reflection_classes/1356-1.inc b/hphp/test/slow/reflection_classes/1356-1.inc
new file mode 100644 (file)
index 0000000..cf17fba
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+
+class AaaA {
+  function f() {
+    var_dump(get_class());
+  }
+}
+$x = 1;
diff --git a/hphp/test/slow/reflection_classes/1356-2.inc b/hphp/test/slow/reflection_classes/1356-2.inc
new file mode 100644 (file)
index 0000000..0b91ace
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class aAAa {}
+$x = 1;
index a0cd3d1..3ce7459 100644 (file)
@@ -7,15 +7,10 @@ class BbBb {
 function main_1356() {
 $z=true;
 if ($z) {
-  class AaaA {
-    function f() {
-      var_dump(get_class());
-    }
-  }
+  include '1356-1.inc';
 }
  else {
-  class aAAa {
-}
+  include '1356-2.inc';
 }
 $r = new ReflectionClass('aaaa');
 var_dump($r->getName());
diff --git a/hphp/test/slow/reflection_classes/1360-1.inc b/hphp/test/slow/reflection_classes/1360-1.inc
new file mode 100644 (file)
index 0000000..d8ba083
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class A extends Base {}
+$x = 1;
diff --git a/hphp/test/slow/reflection_classes/1360-2.inc b/hphp/test/slow/reflection_classes/1360-2.inc
new file mode 100644 (file)
index 0000000..d8ba083
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class A extends Base {}
+$x = 1;
index 0fd58e0..ee0f282 100644 (file)
@@ -8,12 +8,9 @@ class Base {
 }
 $condition = 123;
 if ($condition) {
-  class A extends Base {
-}
-}
- else {
-  class A extends Base {
-}
+  include '1360-1.inc';
+} else {
+  include '1360-2.inc';
 }
 class B extends A {
   function bar() {
index a48bbd9..436a4e6 100644 (file)
@@ -1,9 +1,9 @@
 <?hh
 
+class C {}
+
 <<__Rx>>
 function test() {
-  class C {}             // DefCls
-  // we don't emit DefClsNop outside of systemlib
   class_alias('C', 'D'); // AliasCls
   // we don't emit DefTypeAlias outside of pseudo-mains
 
index 9f3eae1..45de7c2 100644 (file)
@@ -1,5 +1,3 @@
-Verification Error (unit %s/test/slow/rx/body/defines-includes.php func test): defines/includes are forbidden in Rx functions: DefCls
-
 Verification Error (unit %s/test/slow/rx/body/defines-includes.php func test): defines/includes are forbidden in Rx functions: AliasCls
 
 Verification Error (unit %s/test/slow/rx/body/defines-includes.php func test): defines/includes are forbidden in Rx functions: InclOnce
diff --git a/hphp/test/slow/serialize/incomplete_class_apc_serialize.inc b/hphp/test/slow/serialize/incomplete_class_apc_serialize.inc
new file mode 100644 (file)
index 0000000..7c520e9
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class X {}
+$x = 1;
index 7c79427..a729379 100644 (file)
@@ -1,15 +1,12 @@
 <?php
+
+<<__EntryPoint>>
 function main() {
   $str = 'O:1:"X":0:{}';
   $obj = unserialize($str);
   var_dump($obj); // incomplete class
   apc_store('foo', $obj);
-  class X {};
+  include 'incomplete_class_apc_serialize.inc';
   $o2 = apc_fetch('foo');
   var_dump($o2); // real X
 }
-
-<<__EntryPoint>>
-function main_incomplete_class_apc_serialize() {
-main();
-}
similarity index 58%
copy from hphp/test/slow/traits/2127.php
copy to hphp/test/slow/traits/2127.inc
index aa688f9..82665af 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 
-
-<<__EntryPoint>>
-function main_2127() {
-if (true) {
   trait T {
  public static function foo() {
  echo "Foo\n";
@@ -12,6 +8,4 @@ if (true) {
   class C {
  use T;
  }
-}
-C::foo();
-}
+$x = 1;
index aa688f9..8605479 100644 (file)
@@ -4,14 +4,7 @@
 <<__EntryPoint>>
 function main_2127() {
 if (true) {
-  trait T {
- public static function foo() {
- echo "Foo\n";
- }
- }
-  class C {
- use T;
- }
+  include '2127.inc';
 }
 C::foo();
 }
diff --git a/hphp/test/slow/traits/abstract-final-override.inc b/hphp/test/slow/traits/abstract-final-override.inc
new file mode 100644 (file)
index 0000000..16d10cf
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class A {}
+$x = 1;
index 579907c..301699c 100644 (file)
@@ -24,9 +24,9 @@ class C extends B {}
 
 <<__EntryPoint>>
 function main_abstract_final_override() {
-if (isset($g)) {
-  class A {}
-}
+  if (isset($g)) {
+    include 'abstract-final-override.inc';
+  }
 
-var_dump(new C);
+  var_dump(new C());
 }
diff --git a/hphp/test/slow/traits/conditional_fatal-1.inc b/hphp/test/slow/traits/conditional_fatal-1.inc
new file mode 100644 (file)
index 0000000..622a5ba
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+class C1 {
+  use NonExistent;
+}
+$x = 1;
diff --git a/hphp/test/slow/traits/conditional_fatal-2.inc b/hphp/test/slow/traits/conditional_fatal-2.inc
new file mode 100644 (file)
index 0000000..19fb81d
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+class C2 {
+  use NonExistent;
+}
+$x = 1;
index 4ad30e4..76d5295 100644 (file)
@@ -5,18 +5,14 @@
 function main_conditional_fatal() {
 $execute_fatal = false;
 if ($execute_fatal) {
-  class C1 {
-    use NonExistent;
-  }
+  include 'conditional_fatal-1.inc';
 }
 
 echo 'Good', "\n";
 
 $execute_fatal = true;
 if ($execute_fatal) {
-  class C2 {
-    use NonExistent;
-  }
+  include 'conditional_fatal-2.inc';
 }
 
 echo 'Bad', "\n";
diff --git a/hphp/test/slow/traits/duplicate_require2-1.inc b/hphp/test/slow/traits/duplicate_require2-1.inc
new file mode 100644 (file)
index 0000000..82d7fcf
--- /dev/null
@@ -0,0 +1,4 @@
+<?hh
+
+class A {}
+$x = 1;
diff --git a/hphp/test/slow/traits/duplicate_require2-2.inc b/hphp/test/slow/traits/duplicate_require2-2.inc
new file mode 100644 (file)
index 0000000..0e10252
--- /dev/null
@@ -0,0 +1,4 @@
+<?hh
+
+interface A {}
+$x = 1;
diff --git a/hphp/test/slow/traits/duplicate_require2-3.inc b/hphp/test/slow/traits/duplicate_require2-3.inc
new file mode 100644 (file)
index 0000000..7889988
--- /dev/null
@@ -0,0 +1,6 @@
+<?hh
+
+trait T1 {
+  require extends A;
+}
+$x = 1;
diff --git a/hphp/test/slow/traits/duplicate_require2-4.inc b/hphp/test/slow/traits/duplicate_require2-4.inc
new file mode 100644 (file)
index 0000000..65397a1
--- /dev/null
@@ -0,0 +1,6 @@
+<?hh
+
+trait T2 {
+  require implements A;
+}
+$x = 1;
diff --git a/hphp/test/slow/traits/duplicate_require2-5.inc b/hphp/test/slow/traits/duplicate_require2-5.inc
new file mode 100644 (file)
index 0000000..5501d1f
--- /dev/null
@@ -0,0 +1,6 @@
+<?hh
+
+class X {
+  use T1, T2;
+}
+$x = 1;
dissimilarity index 79%
index cdd32f4..81a109b 100644 (file)
@@ -1,35 +1,28 @@
-<?hh
-
-
-<<__EntryPoint>>
-function main_duplicate_require2() {
-$n = apc_fetch('foo');
-if (!$n) $n = 0;
-apc_store('foo', ++$n);
-
-echo "Iteration: $n\n";
-
-if ($n == 1) {
-  class A {}
-} else if ($n == 2) {
-  interface A {}
-}
-
-if ($n & 1) {
-  trait T1 {
-    require extends A;
-  }
-}
-
-if ($n & 2) {
-  trait T2 {
-    require implements A;
-  }
-}
-
-if ($n == 3) {
-  class X {
-    use T1, T2;
-  }
-}
-}
+<?hh
+
+<<__EntryPoint>>
+function main_duplicate_require2() {
+  $n = apc_fetch('foo');
+  if (!$n) $n = 0;
+  apc_store('foo', ++$n);
+
+  echo "Iteration: $n\n";
+
+  if ($n == 1) {
+    include 'duplicate_require2-1.inc';
+  } else if ($n == 2) {
+    include 'duplicate_require2-2.inc';
+  }
+
+  if ($n & 1) {
+    include 'duplicate_require2-3.inc';
+  }
+
+  if ($n & 2) {
+    include 'duplicate_require2-4.inc';
+  }
+
+  if ($n == 3) {
+    include 'duplicate_require2-5.inc';
+  }
+}
index 5b10c75..341161d 100644 (file)
@@ -2,4 +2,4 @@ Iteration: 1
 Iteration: 2
 Iteration: 3
 
-Fatal error: Conflicting requirements for 'A'%sin %s/test/slow/traits/duplicate_require2.php on line %d
+Fatal error: Conflicting requirements for 'A' in %s on line %d
diff --git a/hphp/test/slow/traits/fatal_missing_trait.inc b/hphp/test/slow/traits/fatal_missing_trait.inc
new file mode 100644 (file)
index 0000000..2238eae
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+trait T {}
+$x = 1;
index 82ab7bb..e7f8f17 100644 (file)
@@ -1,15 +1,11 @@
 <?php
 
 if (isset($g)) {
-  trait T {}
+  include 'fatal_missing_trait.inc';
 }
 
 class C {
   use T;
 }
 
-function main() {
-  var_dump(new C);
-}
-
-main();
+var_dump(new C());
diff --git a/hphp/test/slow/traits/non-unique-base-1.inc b/hphp/test/slow/traits/non-unique-base-1.inc
new file mode 100644 (file)
index 0000000..70a8e55
--- /dev/null
@@ -0,0 +1,4 @@
+<?hh
+
+class B {}
+$x = 1;
diff --git a/hphp/test/slow/traits/non-unique-base-2.inc b/hphp/test/slow/traits/non-unique-base-2.inc
new file mode 100644 (file)
index 0000000..f9cf888
--- /dev/null
@@ -0,0 +1,6 @@
+<?hh
+
+class B {
+  protected function foo() { echo "hi from foo\n"; }
+}
+$x = 1;
index de249d3..ea6e323 100644 (file)
@@ -1,11 +1,9 @@
 <?hh
 
 if (getenv("NOFOO")) {
-  class B {}
+  include 'non-unique-base-1.inc';
 } else {
-  class B {
-    protected function foo() { echo "hi from foo\n"; }
-  }
+  include 'non-unique-base-2.inc';
 }
 
 trait T {
diff --git a/hphp/test/slow/traits/require_constraint_iface_implements_error.inc b/hphp/test/slow/traits/require_constraint_iface_implements_error.inc
new file mode 100644 (file)
index 0000000..aab9b34
--- /dev/null
@@ -0,0 +1,6 @@
+<?hh
+
+interface I2 {
+  require implements I1;
+}
+$x = 1;
index ac16b30..f8a9f88 100644 (file)
@@ -6,9 +6,7 @@ interface I1 {}
 <<__EntryPoint>>
 function main_require_constraint_iface_implements_error() {
 if (time() > 0) {
-  interface I2 {
-    require implements I1;
-  }
+  include 'require_constraint_iface_implements_error.inc';
 }
 
 echo 'Fail';
index 85e8d2a..ea82072 100644 (file)
@@ -1 +1 @@
-Fatal error: Only traits may use 'require implements'. in %s/test/slow/traits/require_constraint_iface_implements_error.php on line 10
\ No newline at end of file
+Fatal error: Only traits may use 'require implements'. in %s on line 4
diff --git a/hphp/test/slow/type_assertions/1860-1.inc b/hphp/test/slow/type_assertions/1860-1.inc
new file mode 100644 (file)
index 0000000..1c38982
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+
+class X {
+  public function f() {
+    var_dump('X1::f');
+  }
+}
+$x = 1;
diff --git a/hphp/test/slow/type_assertions/1860-2.inc b/hphp/test/slow/type_assertions/1860-2.inc
new file mode 100644 (file)
index 0000000..e20b096
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+
+class X {
+  public function f() {
+    var_dump('X2::f');
+  }
+}
+$x = 1;
index ccbbd0c..d7dfd17 100644 (file)
@@ -9,18 +9,9 @@ function get() {
  return true;
  }
 if (get()) {
-  class X {
-    public function f() {
-      var_dump('X1::f');
-    }
-  }
-}
- else {
-  class X {
-    public function f() {
-      var_dump('X2::f');
-    }
-  }
+  include '1860-1.inc';
+} else {
+  include '1860-2.inc';
 }
 class Y extends X {
 }
diff --git a/hphp/test/slow/type_assertions/1862-1.inc b/hphp/test/slow/type_assertions/1862-1.inc
new file mode 100644 (file)
index 0000000..f26237d
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+
+class C1 extends B1 {
+  public $c1prop;
+  function c1method() {
+    return 2;
+  }
+}
+$x = 1;
diff --git a/hphp/test/slow/type_assertions/1862-2.inc b/hphp/test/slow/type_assertions/1862-2.inc
new file mode 100644 (file)
index 0000000..f26237d
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+
+class C1 extends B1 {
+  public $c1prop;
+  function c1method() {
+    return 2;
+  }
+}
+$x = 1;
index 43e8133..4473bfa 100644 (file)
@@ -56,20 +56,9 @@ class B1 extends A1 {
   }
 }
 if (rand(0, 1)) {
-  class C1 extends B1 {
-    public $c1prop;
-    function c1method() {
-      return 2;
-    }
-  }
-}
- else {
-  class C1 extends B1 {
-    public $c1prop;
-    function c1method() {
-      return 2;
-    }
-  }
+  include '1862-1.inc';
+} else {
+  include '1862-2.inc';
 }
 class D1 extends C1 {
   public $d1prop;
diff --git a/hphp/test/slow/type_assertions/enum-param-2.inc b/hphp/test/slow/type_assertions/enum-param-2.inc
new file mode 100644 (file)
index 0000000..0394b40
--- /dev/null
@@ -0,0 +1,6 @@
+<?hh
+
+class NotAnObject {
+  const FOO = 2;
+}
+$x = 1;
index d15d2e7..6f523c4 100644 (file)
@@ -5,9 +5,7 @@ function a() {
 }
 
 function b() {
-  class NotAnObject {
-    const FOO = 2;
-  }
+  include 'enum-param-2.inc';
 }
 
 function test2(NotAnObject $o) {
diff --git a/hphp/test/slow/yield/2165.php b/hphp/test/slow/yield/2165.php
deleted file mode 100644 (file)
index 87f8955..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-<?php
-
-// redec class gen
-function get() {
- return true;
- }
-
-// derive from redec gen
-class Foo {
-  public function fooMsg() {
- return 'foo';
- }
-  public function fooGen() {
- yield $this->fooMsg();
- }
-}
-
-// conditional derive from redec gen
-function get0() {
- return false;
- }
-function f($x) {
-  if ($x) {
-    if (get0()) {
-      class X1 {
-        public function msg() {
- return 'first, first';
- }
-        public function gen() {
- yield $this->msg();
- }
-      }
-
-    }
- else {
-      class X1 {
-        public function msg() {
- return 'first, second';
- }
-        public function gen() {
- yield $this->msg();
- }
-      }
-
-    }
-
-  }
- else {
-    if (get()) {
-      class Y extends X1 {
-        public function msg() {
- return 'second, first';
- }
-        public function gen() {
- yield $this->msg();
- }
-      }
-
-    }
- else {
-      class Y extends X1 {
-        public function msg() {
- return 'second, second';
- }
-        public function gen() {
- yield $this->msg();
- }
-      }
-
-    }
-
-  }
-  $x = $x ? new X1 : new Y;
-  foreach ($x->gen() as $foo) {
- var_dump($foo);
- }
-}
-
-<<__EntryPoint>>
-function main_2165() {
-if (get()) {
-  class X {
-
-    public function yielder() {
- yield 'first';
- }
-  }
-}
- else {
-  class X {
-
-    public function yielder() {
- yield 'second';
- }
-  }
-}
-$x = new X;
-foreach ($x->yielder() as $foo) {
- var_dump($foo);
- }
-if (get()) {
-  class Bar extends Foo {
-    public function fooMsg() {
- return 'bar';
- }
-    public function barMsg() {
- return 'bar';
- }
-    public function barGen() {
- yield $this->barMsg();
- }
-  }
-}
- else {
-  class Bar extends Foo {
-}
-}
-$f = new Foo;
-foreach ($f->fooGen() as $foo) {
- var_dump($foo);
- }
-$b = new Bar;
-foreach ($b->fooGen() as $foo) {
- var_dump($foo);
- }
-foreach ($b->barGen() as $foo) {
- var_dump($foo);
- }
-f(true);
-f(false);
-}
diff --git a/hphp/test/slow/yield/2165.php.expect b/hphp/test/slow/yield/2165.php.expect
deleted file mode 100644 (file)
index 2d5371e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-string(5) "first"
-string(3) "foo"
-string(3) "bar"
-string(3) "bar"
-string(13) "first, second"
-string(13) "second, first"
diff --git a/hphp/test/slow/yield/2165.php.hphp_opts b/hphp/test/slow/yield/2165.php.hphp_opts
deleted file mode 100644 (file)
index d45e53c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
--vEnableHipHopSyntax=1 -d hhvm.php7.all=0 -d hhvm.php7.all=0
--vEval.EnablePHP=1
diff --git a/hphp/test/slow/yield/2165.php.opts b/hphp/test/slow/yield/2165.php.opts
deleted file mode 120000 (symlink)
index 192ba8e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../hiphop.opts
\ No newline at end of file
diff --git a/hphp/test/slow/yield/2182-1.inc b/hphp/test/slow/yield/2182-1.inc
new file mode 100644 (file)
index 0000000..46bdf51
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class Y {}
+$x = 1;
diff --git a/hphp/test/slow/yield/2182-2.inc b/hphp/test/slow/yield/2182-2.inc
new file mode 100644 (file)
index 0000000..77fecce
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class Y extends X {}
+$x = 1;
index 3a505ef..4d12d0d 100644 (file)
@@ -3,19 +3,15 @@
 class X {
   private $a = array(1,2,3);
   function foo() {
- yield $this->a;
- }
   yield $this->a;
 }
 }
 if (isset($g)) {
-  class Y {
-}
-}
- else {
-  class Y extends X {
-}
-}
-class Z extends Y {
+  include '2182-1.inc';
+} else {
+  include '2182-2.inc';
 }
+class Z extends Y {}
 function test() {
   $z = new Z;
   foreach ($z->foo() as $v) {
diff --git a/hphp/test/slow/zend/class_alias2.inc b/hphp/test/slow/zend/class_alias2.inc
new file mode 100644 (file)
index 0000000..1b947a5
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+
+class a {}
+$x = 1;
index 42f0fe0..53cc7c7 100644 (file)
@@ -4,7 +4,7 @@
 $i = 0;
 function __autoload($k) {
   if ($GLOBALS['i'] == 0) {
-    class a {}
+    include 'class_alias2.inc';
   }
   ++$GLOBALS['i'];
 }