Basic JIT support for Records
[hiphop-php.git] / hphp / runtime / vm / repo-global-data.cpp
blob6d9ca9c6a461bca3ebebd11b5b24e7619601b3b6
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #include "hphp/runtime/vm/repo-global-data.h"
19 #include <folly/Format.h>
21 namespace HPHP {
23 //////////////////////////////////////////////////////////////////////
25 std::string show(const Repo::GlobalData& gd) {
26 std::string out;
27 #define SHOW(x) folly::format(&out, " {}: {}\n", #x, gd.x)
28 SHOW(UsedHHBBC);
29 SHOW(EnableHipHopSyntax);
30 SHOW(InitialNamedEntityTableSize);
31 SHOW(InitialStaticStringTableSize);
32 SHOW(HardTypeHints);
33 SHOW(HardReturnTypeHints);
34 SHOW(CheckPropTypeHints);
35 SHOW(ThisTypeHintLevel);
36 SHOW(HardPrivatePropInference);
37 out += " DisallowDynamicVarEnvFuncs: ";
38 switch (gd.DisallowDynamicVarEnvFuncs) {
39 case HackStrictOption::OFF: out += "OFF\n"; break;
40 case HackStrictOption::WARN: out += "WARN\n"; break;
41 case HackStrictOption::ON: out += "ON\n"; break;
43 SHOW(ElideAutoloadInvokes);
44 SHOW(PHP7_IntSemantics);
45 SHOW(PHP7_NoHexNumerics);
46 SHOW(PHP7_ScalarTypes);
47 SHOW(PHP7_Builtins);
48 SHOW(PHP7_Substr);
49 SHOW(PromoteEmptyObject);
50 SHOW(EnableRenameFunction);
51 SHOW(HackArrCompatNotices);
52 SHOW(HackArrCompatIsArrayNotices);
53 SHOW(HackArrCompatIsVecDictNotices);
54 SHOW(HackArrCompatTypeHintNotices);
55 SHOW(HackArrCompatDVCmpNotices);
56 SHOW(HackArrCompatSerializeNotices);
57 SHOW(HackArrDVArrs);
58 SHOW(EnableIntishCast);
59 SHOW(EnableIntrinsicsExtension);
60 SHOW(ForbidDynamicCalls);
61 SHOW(NoticeOnBuiltinDynamicCalls);
62 SHOW(ReffinessInvariance);
63 SHOW(AbortBuildOnVerifyError);
64 SHOW(UndefinedFunctionFallback);
65 SHOW(Signature);
66 SHOW(IsVecNotices);
67 #undef SHOW
68 return out;
71 //////////////////////////////////////////////////////////////////////