Permalink
Browse files

Integrate pretty printer

Reviewed By: pieterv

Differential Revision: D9981749

fbshipit-source-id: 55ec9a9df81645f3aa21c073f0cec7643a442787
  • Loading branch information...
gkz authored and hhvm-bot committed Sep 27, 2018
1 parent 6387060 commit cbbb928e672208f63d357ac7cdfedcff0087b4e8
Showing with 9 additions and 0 deletions.
  1. +7 −0 hphp/hack/src/hhbc/hhbc_options.ml
  2. +1 −0 hphp/runtime/base/runtime-option.h
  3. +1 −0 hphp/runtime/base/unit-cache.cpp
@@ -47,6 +47,7 @@ type t = {
option_enable_reified_generics : bool;
option_enable_intrinsics_extension : bool;
option_enable_hhjs : bool;
option_dump_hhjs : bool;
option_phpism_undefined_const_as_string : bool;
option_phpism_undefined_const_fallback : bool;
}
@@ -89,6 +90,7 @@ let default = {
option_enable_reified_generics = false;
option_enable_intrinsics_extension = false;
option_enable_hhjs = false;
option_dump_hhjs = false;
option_phpism_undefined_const_as_string = true;
option_phpism_undefined_const_fallback = true;
}
@@ -128,6 +130,7 @@ let disable_return_by_reference o = o.option_disable_return_by_reference
let enable_reified_generics o = o.option_enable_reified_generics
let enable_intrinsics_extension o = o.option_enable_intrinsics_extension
let enable_hhjs o = o.option_enable_hhjs
let dump_hhjs o = o.option_dump_hhjs
let phpism_undefined_const_as_string o = o.option_phpism_undefined_const_as_string
let phpism_undefined_const_fallback o = o.option_phpism_undefined_const_fallback
let to_string o =
@@ -253,6 +256,8 @@ let set_option options name value =
{ options with option_disable_return_by_reference = as_bool value}
| "eval.enablehhjs" ->
{ options with option_enable_hhjs = as_bool value }
| "eval.dumphhjs" ->
{ options with option_dump_hhjs = as_bool value }
| "hack.lang.phpism.undefinedconstasstring" ->
{ options with option_phpism_undefined_const_as_string = as_bool value}
| "hack.lang.phpism.undefinedconstfallback" ->
@@ -381,6 +386,8 @@ let value_setters = [
fun opts v -> { opts with option_disable_return_by_reference = (v = 1)});
(set_value "hhvm.enable_hhjs" get_value_from_config_int @@
fun opts v -> { opts with option_enable_hhjs = (v = 1) });
(set_value "hhvm.dump_hhjs" get_value_from_config_int @@
fun opts v -> { opts with option_dump_hhjs = (v = 1) });
(set_value "hhvm.hack.lang.phpism.undefined_const_as_string" get_value_from_config_int @@
fun opts v -> { opts with option_phpism_undefined_const_as_string = (v = 1)});
(set_value "hhvm.hack.lang.phpism.undefined_const_fallback" get_value_from_config_int @@
@@ -606,6 +606,7 @@ struct RuntimeOption {
F(bool, LogThreadCreateBacktraces, false) \
F(bool, FailJitPrologs, false) \
F(bool, EnableHHJS, false) \
F(bool, DumpHHJS, false) \
F(bool, UseHHBBC, !getenv("HHVM_DISABLE_HHBBC")) \
/* Generate warning of side effect of the pseudomain is called by \
top-level code.*/ \
@@ -706,6 +706,7 @@ std::string mangleUnitMd5(const std::string& fileMd5) {
+ (RuntimeOption::RepoDebugInfo ? '1' : '0')
+ (RuntimeOption::EvalDisableReturnByReference ? '1' : '0')
+ (RuntimeOption::EvalEnableHHJS ? '1' : '0')
+ (RuntimeOption::EvalDumpHHJS ? '1' : '0')
+ (RuntimeOption::UndefinedConstAsString ? '1' : '0')
+ std::to_string(RuntimeOption::UndefinedConstFallback)
+ mangleUnitPHP7Options()

0 comments on commit cbbb928

Please sign in to comment.