Permalink
Browse files

Support (binary) casts

Summary: As in title: binary casts are effectively casts to strings

Reviewed By: oulgen

Differential Revision: D6981221

fbshipit-source-id: 606db31976abf0bde2b3c2e9ee301aadd6ad35af
  • Loading branch information...
vladima authored and hhvm-bot committed Feb 14, 2018
1 parent f484e7c commit 4259564760d2d1d6eb610e3a4ff23496c4404629
Showing with 2 additions and 32 deletions.
  1. +2 −2 hphp/hack/src/hhbc/emit_expression.ml
  2. +0 −30 hphp/test/hhcodegen_failing_tests_zend_tests
@@ -669,7 +669,8 @@ and emit_cast env hint expr =
|| id = SN.Typehints.integer -> instr (IOp CastInt)
| _ when id = SN.Typehints.bool
|| id = SN.Typehints.boolean -> instr (IOp CastBool)
| _ when id = SN.Typehints.string -> instr (IOp CastString)
| _ when id = SN.Typehints.string ||
id = "binary" -> instr (IOp CastString)
| _ when id = SN.Typehints.object_cast -> instr (IOp CastObject)
| _ when id = SN.Typehints.array -> instr (IOp CastArray)
| _ when id = SN.Typehints.real
@@ -678,7 +679,6 @@ and emit_cast env hint expr =
| _ when id = "unset" -> gather [ instr_popc; instr_null ]
| _ -> emit_nyi "cast type"
end
(* TODO: unset *)
| _ ->
emit_nyi "cast type"
end in
@@ -63,7 +63,6 @@ zend/good/Zend/tests/ns_034.php
zend/good/Zend/tests/ns_036.php
zend/good/Zend/tests/ns_057.php
zend/good/Zend/tests/ns_058.php
zend/good/Zend/tests/ns_069.php
zend/good/Zend/tests/ns_080.php
zend/good/Zend/tests/objects_026.php
zend/good/Zend/tests/traits/bug55524.php
@@ -73,8 +72,6 @@ zend/good/Zend/tests/try_catch_finally_007.php
zend/good/Zend/tests/use_function/case_insensivity.php
zend/good/Zend/tests/use_function/no_global_fallback2.php
zend/good/Zend/tests/zend_operators.php
zend/good/ext/dom/tests/bug40836.php
zend/good/ext/dom/tests/bug41374.php
zend/good/ext/mbstring/tests/mb_ereg_variation3.php
zend/good/ext/mbstring/tests/mb_stristr_variation1.php
zend/good/ext/mbstring/tests/mb_stristr_variation3.php
@@ -97,46 +94,19 @@ zend/good/ext/mcrypt/tests/mcrypt_ecb_variation3.php
zend/good/ext/mcrypt/tests/mcrypt_ecb_variation5.php
zend/good/ext/mcrypt/tests/mcrypt_encrypt_variation3.php
zend/good/ext/reflection/tests/bug36337.php
zend/good/ext/simplexml/tests/sxe_001.php
zend/good/ext/simplexml/tests/sxe_002.php
zend/good/ext/simplexml/tests/sxe_003.php
zend/good/ext/simplexml/tests/sxe_004.php
zend/good/ext/simplexml/tests/sxe_005.php
zend/good/ext/spl/tests/recursive_tree_iterator_005.php
zend/good/ext/standard/tests/array/array_diff_assoc_variation1.php
zend/good/ext/standard/tests/array/array_diff_assoc_variation2.php
zend/good/ext/standard/tests/array/array_diff_assoc_variation3.php
zend/good/ext/standard/tests/array/array_diff_assoc_variation4.php
zend/good/ext/standard/tests/array/array_diff_assoc_variation5.php
zend/good/ext/standard/tests/array/array_diff_assoc_variation8.php
zend/good/ext/standard/tests/array/array_diff_variation1.php
zend/good/ext/standard/tests/array/array_diff_variation2.php
zend/good/ext/standard/tests/array/array_diff_variation3.php
zend/good/ext/standard/tests/array/array_diff_variation4.php
zend/good/ext/standard/tests/array/array_diff_variation6.php
zend/good/ext/standard/tests/array/array_keys_variation_001.php
zend/good/ext/standard/tests/array/array_merge.php
zend/good/ext/standard/tests/array/array_unique_basic.php
zend/good/ext/standard/tests/array/array_unique_variation5.php
zend/good/ext/standard/tests/array/count_recursive.php
zend/good/ext/standard/tests/array/usort_variation10.php
zend/good/ext/standard/tests/file/bug27508.php
zend/good/ext/standard/tests/file/disk_free_space_error.php
zend/good/ext/standard/tests/file/disk_total_space_error.php
zend/good/ext/standard/tests/file/file_put_contents_variation4.php
zend/good/ext/standard/tests/file/file_put_contents_variation5.php
zend/good/ext/standard/tests/file/file_put_contents_variation6.php
zend/good/ext/standard/tests/file/fileinode_variation.php
zend/good/ext/standard/tests/file/fopen_variation16.php
zend/good/ext/standard/tests/file/fopen_variation17.php
zend/good/ext/standard/tests/file/fopen_variation7.php
zend/good/ext/standard/tests/file/fopen_variation9.php
zend/good/ext/standard/tests/file/pathinfo_basic.php
zend/good/ext/standard/tests/serialize/006.php
zend/good/ext/standard/tests/strings/bug40915.php
zend/good/ext/standard/tests/strings/convert_cyr_string.php
zend/good/ext/standard/tests/strings/htmlspecialchars.php
zend/good/ext/standard/tests/strings/str_getcsv_001.php
zend/good/ext/standard/tests/strings/stripslashes_variation2.php
zend/good/ext/zlib/tests/gzfile_basic2.php
zend/good/ext/zlib/tests/readgzfile_basic2.php

0 comments on commit 4259564

Please sign in to comment.