Revert visibility of class/type constants.
[hiphop-php.git] / hphp / hack / src / hhbc / hhas_constant.ml
blob4ef4180b8dadbb07502693afa8bb0f6d384a741e
1 (*
2 * Copyright (c) 2017, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
8 *)
10 type t = {
11 constant_name: string;
12 constant_value: Typed_value.t option;
13 constant_initializer_instrs: Instruction_sequence.t option;
16 (* Interestingly, HHAS does not represent the declared types of constants,
17 unlike formal parameters and return types. We might consider fixing this. *)
19 (* Also interestingly, abstract constants are not emitted at all. *)
21 let make constant_name constant_value constant_initializer_instrs =
22 { constant_name; constant_value; constant_initializer_instrs }
24 let name hhas_constant = hhas_constant.constant_name
26 let value hhas_constant = hhas_constant.constant_value
28 let initializer_instrs hhas_constant =
29 hhas_constant.constant_initializer_instrs