2 +----------------------------------------------------------------------+
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 #ifndef incl_HPHP_BUILTIN_SYMBOLS_H_
18 #define incl_HPHP_BUILTIN_SYMBOLS_H_
23 #include "hphp/compiler/hphp.h"
26 ///////////////////////////////////////////////////////////////////////////////
28 DECLARE_EXTENDED_BOOST_TYPES(Type
);
29 DECLARE_BOOST_TYPES(AnalysisResult
);
30 DECLARE_EXTENDED_BOOST_TYPES(FunctionScope
);
31 DECLARE_EXTENDED_BOOST_TYPES(ClassScope
);
32 DECLARE_BOOST_TYPES(VariableTable
);
33 DECLARE_BOOST_TYPES(ConstantTable
);
35 struct BuiltinSymbols
{
37 static AnalysisResultPtr s_systemAr
;
39 static bool Load(AnalysisResultPtr ar
);
42 * Testing whether a variable is a PHP superglobal.
44 static bool IsSuperGlobal(const std::string
&name
);
46 static void LoadSuperGlobals();
48 static const char *const GlobalNames
[];
49 static int NumGlobalNames();
51 static hphp_string_set s_superGlobals
;
53 static std::set
<std::string
> s_declaredDynamic
;
55 static void ImportNativeConstants(AnalysisResultPtr ar
,
56 ConstantTablePtr dest
);
59 ///////////////////////////////////////////////////////////////////////////////
61 #endif // incl_HPHP_BUILTIN_SYMBOLS_H_