[infer][java] add mli for the JConfig module to automatically remove dead code

Reviewed By: jberdine

Differential Revision: D5661189

fbshipit-source-id: a5d1c9b
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent a6f8850617
commit 9e217ea1b1

@ -23,8 +23,6 @@ let infer_undefined_cl = builtins_package ^ ".InferUndefined"
let obj_type = JBasics.TObject (JBasics.TClass JBasics.java_lang_object)
let bool_type = JBasics.TBasic `Bool
let string_cl = "java.lang.String"
let class_cl = "java.lang.Class"
@ -35,30 +33,6 @@ let cce_cl = "java.lang.ClassCastException"
let out_of_bound_cl = "java.lang.ArrayIndexOutOfBoundsException"
let reentrant_lock_cl = "java.util.concurrent.locks.ReentrantLock"
let lock_cl = "java.util.concurrent.locks.Lock"
let reentrant_rwlock_cl = "java.util.concurrent.locks.ReentrantReadWriteLock"
let reentrant_rlock_cl = reentrant_rwlock_cl ^ "$ReadLock"
let reentrant_wlock_cl = reentrant_rwlock_cl ^ "$WriteLock"
let thread_class = "java.lang.Thread"
let runnable_if = "java.lang.Runnable"
let lock_method = "lock"
let unlock_method = "unlock"
let try_lock_method = "tryLock"
let start_method = "start"
let run_method = "run"
(** {2 Names of special variables, constants and method names} *)
let this = Mangled.from_string "this"
@ -110,22 +84,3 @@ let long_code = "J"
let short_code = "S"
let class_code cl = "L" ^ cl
let errors_db_file = "errors.db"
let main_errors_file = "Java_frontend.errors"
(** {2 Flags } *)
(* the Sawja representation of the Java Bytecode will be printed *)
let html_mode = ref false
(* The dynamic dispatch will be handled partially statically *)
let static_dispatch = ref false
(* counts the amount of initializer methods, in init-mode *)
let init_count = ref 0
let normalize_string s =
let rexp = Str.regexp_string "$" in
Str.global_replace rexp "_" s

@ -0,0 +1,74 @@
(*
* Copyright (c) 2017 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Javalib_pack
val string_cl : string
val class_cl : string
val obj_type : JBasics.value_type
val boolean_code : string
val byte_code : string
val char_code : string
val double_code : string
val float_code : string
val int_code : string
val long_code : string
val short_code : string
val class_code : string -> string
val boolean_st : string
val byte_st : string
val char_st : string
val double_st : string
val float_st : string
val int_st : string
val long_st : string
val short_st : string
val constructor_name : string
val void : string
val this : Mangled.t
val infer_undefined_cl : string
val clone_name : string
val field_cst : string
val field_st : Mangled.t
val infer_builtins_cl : string
val infer_array_cl : string
val npe_cl : string
val out_of_bound_cl : string
val cce_cl : string
Loading…
Cancel
Save