language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
hhvm/hphp/hack/src/utils/ignore/dune | (rule
(target filesToIgnore.fb.ml)
(action
(copy# facebook/filesToIgnore.ml filesToIgnore.fb.ml)))
(library
(name ignore)
(wrapped false)
(libraries
core_kernel
hh_json
str
string
base
core
(select
filesToIgnore.ml
from
(facebook -> filesToIgnore.fb.ml)
(-> filesToIgnore.stubs.ml)))) | |
OCaml Interface | hhvm/hphp/hack/src/utils/ignore/filesToIgnore.mli | (** This is invoked in serverMain and other entry points, upon reading .hhconfig ignore_paths=
directive. *)
val ignore_path : Str.regexp -> unit
(** FindUtils.file_filter calls [should_ignore], which consults the list of ignore_path regexps,
to determine whether hh_server recognizes a given file as part of the projec... |
OCaml | hhvm/hphp/hack/src/utils/ignore/filesToIgnore.stubs.ml | open Core
module J = Hh_json_helpers.AdhocJsonHelpers
let paths_to_ignore = ref []
let get_paths_to_ignore () = !paths_to_ignore
let set_paths_to_ignore x = paths_to_ignore := x
let ignore_path regexp = paths_to_ignore := regexp :: !paths_to_ignore
let should_ignore path =
List.exists ~f:(fun p -> Str.string_mat... |
TOML | hhvm/hphp/hack/src/utils/intern/Cargo.toml | # @generated by autocargo
[package]
name = "intern"
version = "0.1.0"
edition = "2021"
description = "Intern data into a 32-bit id temporarily copied from the relay directory to enable Hack OSS"
[dependencies]
fnv = "1.0"
hashbrown = { version = "0.12.3", features = ["raw", "serde"] }
indexmap = { version = "1.9.2", ... |
Rust | hhvm/hphp/hack/src/utils/intern/src/atomic_arena.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::cell::UnsafeCell;
use std::fmt;
use std::fmt::Debug;
use std::fmt::Display;
use std::marker::PhantomData;
use std::mem::... |
Rust | hhvm/hphp/hack/src/utils/intern/src/idhasher.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::hash::BuildHasherDefault;
use std::hash::Hasher;
use std::marker::PhantomData;
pub type BuildIdHasher<T> = BuildHasherD... |
Rust | hhvm/hphp/hack/src/utils/intern/src/intern.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::borrow::Borrow;
use std::cell::RefCell;
use std::collections::HashMap;
use std::fmt;
use std::fmt::Debug;
use std::hash:... |
Rust | hhvm/hphp/hack/src/utils/intern/src/lib.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
//! Compact, serializable, mostly-lock-free interning.
//!
//! A library for [interning](https://en.wikipedia.org/wiki/String_int... |
Rust | hhvm/hphp/hack/src/utils/intern/src/path.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::cmp::Ordering;
use std::ffi::OsStr;
#[cfg(unix)]
use std::os::unix::ffi::OsStrExt;
use std::path::Path;
use std::path::P... |
Rust | hhvm/hphp/hack/src/utils/intern/src/sharded_set.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::borrow::Borrow;
use std::collections::hash_map::RandomState;
use std::fmt;
use std::hash::BuildHasher;
use std::hash::Ha... |
Rust | hhvm/hphp/hack/src/utils/intern/src/small_bytes.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::ascii::escape_default;
use std::borrow::Borrow;
use std::fmt::Debug;
use std::fmt::Formatter;
use std::fmt::Result;
use ... |
Rust | hhvm/hphp/hack/src/utils/intern/src/string.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::borrow::Borrow;
use std::borrow::Cow;
use std::cmp::Ordering;
use std::collections::HashMap;
use std::collections::HashS... |
Rust | hhvm/hphp/hack/src/utils/intern/src/string_key.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use std::collections::HashMap;
use std::collections::HashSet;
use std::fmt;
use std::fmt::Formatter;
use std::str::FromStr;
use ... |
hhvm/hphp/hack/src/utils/jsonrpc/dune | (library
(name jsonrpc)
(wrapped false)
(libraries
buffered_line_reader
hh_json
http_lite
marshal_tools
marshal_tools_lwt
sys_utils)
(preprocess
(pps lwt_ppx ppx_deriving.std ppx_deriving.enum))) | |
OCaml | hhvm/hphp/hack/src/utils/jsonrpc/jsonrpc.ml | (* Wrapper for handling JSON-RPC *)
(* Spec: http://www.jsonrpc.org/specification *)
(* Practical readbable guide: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#base-protocol-json-structures *)
open Hh_prelude
(**************************************************************
HOW THIS A... |
OCaml Interface | hhvm/hphp/hack/src/utils/jsonrpc/jsonrpc.mli | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type writer = Hh_json.json -> unit
type timestamped_json = {
json: Hh_json.json;
timestamp: float;
}
type t
(... |
TOML | hhvm/hphp/hack/src/utils/line_break_map/Cargo.toml | # @generated by autocargo
[package]
name = "line_break_map"
version = "0.0.0"
edition = "2021"
[lib]
path = "../line_break_map.rs" |
TOML | hhvm/hphp/hack/src/utils/lint/Cargo.toml | # @generated by autocargo
[package]
name = "lint_rust"
version = "0.0.0"
edition = "2021"
[lib]
path = "lint_rust.rs"
[dependencies]
arena_deserializer = { version = "0.0.0", path = "../arena_deserializer" }
arena_trait = { version = "0.0.0", path = "../../arena_trait" }
no_pos_hash = { version = "0.0.0", path = "..... |
hhvm/hphp/hack/src/utils/lint/dune | (library
(name utils_lint)
(wrapped false)
(preprocess
(pps ppx_deriving.std))
(libraries typing_ast lints_core pos)) | |
OCaml | hhvm/hphp/hack/src/utils/lint/lint.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Lints_core
module Codes = Lint_codes
let spf = Printf.sprintf
let internal_error pos msg = add 0 Lint_error p... |
OCaml Interface | hhvm/hphp/hack/src/utils/lint/lint.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val internal_error : Pos.t -> string -> unit
val lowercase_constant : Pos.t -> string -> unit
val mk_lowercase_cons... |
Rust | hhvm/hphp/hack/src/utils/lint/lint.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
//
// @generated <<SignedSource::*O*zOeWoEQle#+L!plEphiEmie@IsG>>
//
// To regenerate this file, run:
// hphp/hack/src/oxidized_regen.s... |
OCaml | hhvm/hphp/hack/src/utils/lint/lint_codes.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t =
| LowercaseConstant [@value 5001]
| UseCollectionLiteral
| StaticString
| ShapeIdxRequiredField [@v... |
Rust | hhvm/hphp/hack/src/utils/lint/lint_rust.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
pub(crate) use rc_pos as pos;
mod lint;
pub use lint::*;
use oxidized::tast;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[derive(o... |
hhvm/hphp/hack/src/utils/linting/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
hhvm/hphp/hack/src/utils/load_script/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
hhvm/hphp/hack/src/utils/logging/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
hhvm/hphp/hack/src/utils/logging/common/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
hhvm/hphp/hack/src/utils/lsp/dune | (library
(name lsp)
(wrapped false)
(libraries base file_content file_url hh_json jsonrpc logging utils_core symbol pos relative_path)
(preprocess
(pps
lwt_ppx
ppx_deriving.std
ppx_deriving.enum
ppx_deriving.eq
ppx_deriving.show))) | |
OCaml | hhvm/hphp/hack/src/utils/lsp/lsp.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type lsp_id =
| NumberId of int
| StringId of string
type partial_result_token = PartialResultToken of string
... |
OCaml Interface | hhvm/hphp/hack/src/utils/lsp/lsp.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* This file is an OCaml representation of the Language Server Protocol
* https://github.com/Microsoft/language... |
OCaml | hhvm/hphp/hack/src/utils/lsp/lsp_fmt.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open Lsp
open Hh_json
open Hh_json_helpers
(*******************************************************... |
OCaml Interface | hhvm/hphp/hack/src/utils/lsp/lsp_fmt.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val parse_id : Hh_json.json -> Lsp.lsp_id
val parse_id_opt : Hh_json.json option -> Lsp.lsp_id option
val print_id... |
OCaml | hhvm/hphp/hack/src/utils/lsp/lsp_helpers.ml | (* A few helpful wrappers around LSP *)
module Option = Base.Option
open Lsp
open Lsp_fmt
let progress_and_actionRequired_counter = ref 0
(************************************************************************)
(* Conversions *)
(****************************... |
OCaml Interface | hhvm/hphp/hack/src/utils/lsp/lsp_helpers.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
hhvm/hphp/hack/src/utils/marshal_tools/dune | (library
(name marshal_tools)
(wrapped false)
(modules marshal_tools)
(libraries sys_utils utils_core)
(preprocess
(pps lwt_ppx ppx_deriving.std)))
(library
(name marshal_tools_lwt)
(wrapped false)
(modules marshal_tools_lwt)
(libraries marshal_tools lwt lwt.unix lwt_log)
(preprocess
(pps lwt_ppx ppx_der... | |
OCaml | hhvm/hphp/hack/src/utils/marshal_tools/marshal_tools.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* This tool allows for marshaling directly over file descriptors (instead of
* ocaml "channels") to avoid buff... |
OCaml Interface | hhvm/hphp/hack/src/utils/marshal_tools/marshal_tools.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
exception Invalid_Int_Size_Exception
exception Payload_Size_Too_Large_Exception
exception Malformed_Preamble_Excep... |
OCaml | hhvm/hphp/hack/src/utils/marshal_tools/marshal_tools_lwt.ml | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module Marshal_tools_lwt = Marshal_tools.MarshalToolsFunctor (struct
type 'a result = 'a Lwt.t
type fd = Lwt_un... |
OCaml Interface | hhvm/hphp/hack/src/utils/marshal_tools/marshal_tools_lwt.mli | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val to_fd_with_preamble :
?flags:Marshal.extern_flags list -> Lwt_unix.file_descr -> 'a -> int Lwt.t
val from_fd_... |
hhvm/hphp/hack/src/utils/memtrace/dune | (executable
(name memtrace_merge)
(modules memtrace_merge)
(modes exe byte_complete)
(link_flags
(:standard
(:include ../../dune_config/ld-opts.sexp)))
(libraries
default_injector_config
core_kernel
sys_utils
utils_core
collections)
(preprocess
(pps ppx_deriving.std))) | |
OCaml | hhvm/hphp/hack/src/utils/memtrace/memtrace_merge.ml | (*
* (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*)
open Hh_prelude
let usage () =
Printf.printf
("Usage: memtrace_merge *.ctf > merged.ctf -- this will merge memtrace logs.\n"
^... |
hhvm/hphp/hack/src/utils/messages/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
TOML | hhvm/hphp/hack/src/utils/multifile/Cargo.toml | # @generated by autocargo
[package]
name = "multifile_rust"
version = "0.0.0"
edition = "2021"
[lib]
path = "../multifile.rs"
[dependencies]
anyhow = "1.0.71"
lazy_static = "1.4"
regex = "1.9.2"
[dev-dependencies]
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false } |
TOML | hhvm/hphp/hack/src/utils/newtype/Cargo.toml | # @generated by autocargo
[package]
name = "newtype"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
serde = { version = "1.0.176", features = ["derive", "rc"] } |
Rust | hhvm/hphp/hack/src/utils/newtype/idhasher.rs | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// This is the same as the definition in relay's intern crate - but duplicated
// here so we don't have to rely on intern simply ... |
Rust | hhvm/hphp/hack/src/utils/newtype/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
mod idhasher;
use std::hash::Hash;
use std::hash::Hasher;
pub use idhasher::BuildIdHasher;
use serde::Deserialize;
use serde::Serialize;
pub trait HasNone: Copy {
const NONE: Self;
}
pub trait FromUsize {
fn from_usize(u: usize) -> Se... |
TOML | hhvm/hphp/hack/src/utils/no_pos_hash/Cargo.toml | # @generated by autocargo
[package]
name = "no_pos_hash"
version = "0.0.0"
edition = "2021"
[lib]
path = "no_pos_hash.rs"
[dependencies]
arena_collections = { version = "0.0.0", path = "../../arena_collections" }
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
fnv = "1.0"
no_pos_hash_derive = { ... |
Rust | hhvm/hphp/hack/src/utils/no_pos_hash/no_pos_hash.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
pub use std::hash::Hasher;
pub use no_pos_hash_derive::NoPosHash;
/// A type for which we can produce a position-insensitive hash.
///... |
Rust | hhvm/hphp/hack/src/utils/no_pos_hash/no_pos_hash_derive.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#![recursion_limit = "128"]
use proc_macro2::TokenStream;
use quote::quote;
use synstructure::decl_derive;
decl_derive!([NoPosHash] =>... |
TOML | hhvm/hphp/hack/src/utils/no_pos_hash/derive/Cargo.toml | # @generated by autocargo
[package]
name = "no_pos_hash_derive"
version = "0.0.0"
edition = "2021"
[lib]
path = "../no_pos_hash_derive.rs"
test = false
doctest = false
proc-macro = true
[dependencies]
proc-macro2 = { version = "1.0.64", features = ["span-locations"] }
quote = "1.0.29"
syn = { version = "1.0.109", fe... |
C | hhvm/hphp/hack/src/utils/ocaml_ffi_mock/ocaml.c | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
void assert_master() {}
void caml_add_to_heap(void) {}
void caml_alloc(void) {}
void caml_alloc_for_heap(void) {}
void caml_al... |
TOML | hhvm/hphp/hack/src/utils/ocaml_helper/Cargo.toml | # @generated by autocargo
[package]
name = "ocaml_helper"
version = "0.0.0"
edition = "2021"
[lib]
path = "../ocaml_helper.rs"
[dev-dependencies]
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false } |
TOML | hhvm/hphp/hack/src/utils/ocaml_runtime/Cargo.toml | # @generated by autocargo
[package]
name = "ocaml_runtime"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
ocamlrep = { version = "0.1.0", git = "https://github.com/facebook/ocamlrep/", branch = "main" } |
Rust | hhvm/hphp/hack/src/utils/ocaml_runtime/lib.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ffi::CString;
use std::os::raw::c_char;
use ocamlrep::CLOSURE_TAG;
extern "C" {
fn caml_named_value(name: *const c_char... |
OCaml | hhvm/hphp/hack/src/utils/opaque_digest/opaqueDigest.ml | include Digest
let to_raw_contents x = x
(* take the raw contents of the Digest
and convert it into a digest if it would be capable of being
to_hex'd *)
let from_raw_contents x =
try
let (_ : string) = to_hex x in
Some x
with
| Invalid_argument _ -> None |
OCaml Interface | hhvm/hphp/hack/src/utils/opaque_digest/opaqueDigest.mli | type t
val compare : t -> t -> int
val equal : t -> t -> bool
val string : string -> t
val bytes : bytes -> t
val substring : string -> int -> int -> t
val subbytes : bytes -> int -> int -> t
val channel : Stdlib.in_channel -> int -> t
val file : string -> t
val output : Stdlib.out_channel -> t -> unit
val in... |
hhvm/hphp/hack/src/utils/parent/dune | (library
(name parentimpl)
(wrapped false)
(modules)
(foreign_stubs
(language c)
(names stubparentimpl)))
(library
(name parent)
(wrapped false)
(foreign_stubs
(language c)
(names libparent))
(libraries parentimpl)) | |
C | hhvm/hphp/hack/src/utils/parent/libparent.c | #define CAML_NAME_SPACE
#include <caml/mlvalues.h>
#include <caml/memory.h>
extern void exit_on_parent_exit_(int interval, int grace);
CAMLprim value exit_on_parent_exit(
value ml_interval,
value ml_grace
) {
CAMLparam2(ml_interval, ml_grace);
int interval = Int_val(ml_interval);
int grace... |
C++ | hhvm/hphp/hack/src/utils/parent/parentimpl.cpp | #include <thread>
#include <mutex>
#include <cassert>
#include <atomic>
#include <unistd.h>
#include "parentimpl.h"
std::mutex watchdog_mut;
static int watchdog_count = 0;
static void check_and_die(int interval, int grace) noexcept {
assert(interval > 0);
assert(grace > 0);
for (;;) {
// when we get rep... |
C/C++ | hhvm/hphp/hack/src/utils/parent/parentimpl.h | extern "C" void exit_on_parent_exit_(int interval, int grace) noexcept;
// for tests only
extern "C" int get_watchdog_count_() noexcept; |
C | hhvm/hphp/hack/src/utils/parent/stubparentimpl.c | #define UNUSED(x) \
((void)(x))
void exit_on_parent_exit_(int interval, int grace) {
UNUSED(interval);
UNUSED(grace);
return;
} |
C++ | hhvm/hphp/hack/src/utils/parent/test/test_parentimpl.cpp | #include <folly/portability/GTest.h>
#include "../parentimpl.h"
#include <folly/portability/Unistd.h>
TEST(ParentImpl, WatchdogCount) {
::testing::FLAGS_gtest_death_test_style = "threadsafe"; // paranoia
ASSERT_EQ(get_watchdog_count_(), 0);
// 1000 is an arbitrary large number.
// The thread will be spawned bu... |
OCaml | hhvm/hphp/hack/src/utils/perf/perf_stats.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** Returns the requested number of quantiles (i.e., the least value
* such that index/count values are smaller). ... |
Rust | hhvm/hphp/hack/src/utils/perf/perf_stats.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
/// Returns the requested number of quantiles (i.e., the least value such that index/count values
/// are smaller).
pub fn calculate_qua... |
OCaml | hhvm/hphp/hack/src/utils/perf/profile.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type gc_alloc = {
minor_words: float;
major_words: float;
(* words in major heap _including_ promoted ones *)
... |
Rust | hhvm/hphp/hack/src/utils/perf/profile.rs | use std::mem;
use std::time::Duration;
use std::time::Instant;
/// Gets CPU times for this and all child processes.
/// Returns
/// (this proc user, this proc sys,
/// this thread user, this thread sys,
/// children user, children sys)
///
/// Adapted from OCaml implementation in
/// ocaml/otherlibs/uni... |
TOML | hhvm/hphp/hack/src/utils/perf/cargo/profile/Cargo.toml | # @generated by autocargo
[package]
name = "profile_rust"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../profile.rs"
[dependencies]
libc = "0.2.139" |
TOML | hhvm/hphp/hack/src/utils/perf/cargo/stats/Cargo.toml | # @generated by autocargo
[package]
name = "stats_rust"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../perf_stats.rs" |
hhvm/hphp/hack/src/utils/process/dune | (library
(name process_types)
(wrapped false)
(modules process_types)
(preprocess
(pps ppx_deriving.std))
(libraries core_kernel utils_core sys_utils))
(library
(name process)
(wrapped false)
(modules process)
(preprocess
(pps ppx_deriving.std))
(libraries
exec_command
process_types
utils_core
ut... | |
OCaml | hhvm/hphp/hack/src/utils/process/future.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type verbose_error = {
message: string;
stack: Utils.callstack;
environment: string option;
}
[@@derivi... |
OCaml Interface | hhvm/hphp/hack/src/utils/process/future.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Future_sig.S
module Promise : Promise.S with type 'value t = 'value t |
OCaml | hhvm/hphp/hack/src/utils/process/futureProcess.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open Future
type error_mode =
| Process_failure of {
status: Unix.process_status;
stderr: strin... |
OCaml | hhvm/hphp/hack/src/utils/process/future_sig.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module type S = sig
type verbose_error = {
message: string;
stack: Utils.callstack;
environment: strin... |
OCaml | hhvm/hphp/hack/src/utils/process/process.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open Ocaml_overrides
open Stack_utils
module Entry = struct
type 'param t = ('param, unit, unit) ... |
OCaml Interface | hhvm/hphp/hack/src/utils/process/process.mli | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** Utilities to deal with subprocesses. *)
open Process_types
module Entry : sig
type 'param t
val register ... |
OCaml | hhvm/hphp/hack/src/utils/process/process_types.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* A Process.t represents a unix process which we execute
* It is a mutable structure which accumulates stdout/stde... |
OCaml | hhvm/hphp/hack/src/utils/procfs/procFS.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open Core
module Sys = Stdlib.Sys
open Result.Monad_infix
let spf = Printf.sprintf
let read_proc_file filename pid =
let file =... |
OCaml Interface | hhvm/hphp/hack/src/utils/procfs/procFS.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
type status = {
rss_anon: int;
rss_file: int;
rss_shmem: int;
rss_total: int;
rss_hwm: int;
}
val status_for_pid : int -... |
Rust | hhvm/hphp/hack/src/utils/rust/delta_log.rs | use std::time::Duration;
use std::time::Instant;
use once_cell::sync::Lazy;
static LOG_START: Lazy<Instant> = Lazy::new(Instant::now);
static LOG_LAST: Lazy<std::sync::RwLock<Instant>> =
Lazy::new(|| std::sync::RwLock::new(Instant::now()));
fn log_durations() -> (Duration, Duration) {
let mut last = LOG_LAST... |
Rust | hhvm/hphp/hack/src/utils/rust/file_rwlock.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#![feature(assert_matches)]
use std::os::unix::prelude::FileExt;
use std::path::Path;
use std::path::PathBuf;
/// This class provide... |
Rust | hhvm/hphp/hack/src/utils/rust/random_id.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
/// Generates a 10-digit random alphanumeric string using rand::thread_rng
pub fn short_string() -> String {
generate_alphanumeric... |
Rust | hhvm/hphp/hack/src/utils/rust/relative_path.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::fmt;
use std::fmt::Display;
use std::path::Path;
use std::path::PathBuf;
use eq_modulo_pos::EqModuloPos;
use no_pos_hash::NoPo... |
Rust | hhvm/hphp/hack/src/utils/rust/relative_path_utils.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::path::Path;
use std::path::PathBuf;
/// This function is like std::path::Path::strip_prefix,
/// namely it returns a result ... |
Rust | hhvm/hphp/hack/src/utils/rust/signed_source.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use bstr::ByteSlice;
use once_cell::sync::Lazy;
use regex::bytes::Regex;
/// This crate is a port of hphp/hack/src/utils/signed_sourc... |
TOML | hhvm/hphp/hack/src/utils/rust/delta_log/Cargo.toml | # @generated by autocargo
[package]
name = "delta_log"
version = "0.0.0"
edition = "2021"
[lib]
path = "../delta_log.rs"
[dependencies]
env_logger = "0.10"
once_cell = "1.12" |
TOML | hhvm/hphp/hack/src/utils/rust/file_rwlock/Cargo.toml | # @generated by autocargo
[package]
name = "file_rwlock"
version = "0.0.0"
edition = "2021"
[lib]
path = "../file_rwlock.rs"
[dependencies]
anyhow = "1.0.71"
fs2 = "0.4"
libc = "0.2.139"
serde = { version = "1.0.176", features = ["derive", "rc"] }
serde_json = { version = "1.0.100", features = ["float_roundtrip", "u... |
TOML | hhvm/hphp/hack/src/utils/rust/measure/Cargo.toml | # @generated by autocargo
[package]
name = "measure"
version = "0.0.0"
edition = "2021"
[lib]
path = "measure.rs"
[dependencies]
hash = { version = "0.0.0", path = "../../hash" }
ocamlrep = { version = "0.1.0", git = "https://github.com/facebook/ocamlrep/", branch = "main" }
once_cell = "1.12"
parking_lot = { versio... |
Rust | hhvm/hphp/hack/src/utils/rust/measure/measure.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
//! A simple telemetry crate ported from src/utils/core/measure.ml.
//!
//! The OCaml implementation will call into this one upon invo... |
Rust | hhvm/hphp/hack/src/utils/rust/measure/measure_ffi.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
ocamlrep_ocamlpool::ocaml_ffi! {
fn hh_measure_push_global() {
measure::push_global()
}
fn hh_measure_pop_global()... |
TOML | hhvm/hphp/hack/src/utils/rust/measure/ffi/Cargo.toml | # @generated by autocargo
[package]
name = "measure_ffi"
version = "0.0.0"
edition = "2021"
[lib]
path = "../measure_ffi.rs"
test = false
doctest = false
crate-type = ["lib", "staticlib"]
[dependencies]
measure = { version = "0.0.0", path = ".." }
ocamlrep_ocamlpool = { version = "0.1.0", git = "https://github.com/f... |
TOML | hhvm/hphp/hack/src/utils/rust/pos/Cargo.toml | # @generated by autocargo
[package]
name = "rc_pos"
version = "0.0.0"
edition = "2021"
[lib]
path = "rc_pos.rs"
[dependencies]
arena_deserializer = { version = "0.0.0", path = "../../arena_deserializer" }
arena_trait = { version = "0.0.0", path = "../../../arena_trait" }
eq_modulo_pos = { version = "0.0.0", path = "... |
Rust | hhvm/hphp/hack/src/utils/rust/pos/file_pos.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
pub trait FilePos {
fn offset(&self) -> usize;
fn line_column_beg(&self) -> (usize, usize, usize);
} |
Rust | hhvm/hphp/hack/src/utils/rust/pos/file_pos_large.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use ocamlrep::FromOcamlRep;
use ocamlrep::FromOcamlRepIn;
use ocamlrep::ToOcamlRep;
use serde::Deserialize;
use serde::Serialize;
use c... |
Rust | hhvm/hphp/hack/src/utils/rust/pos/file_pos_small.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::fmt;
use ocamlrep::FromOcamlRep;
use ocamlrep::FromOcamlRepIn;
use ocamlrep::ToOcamlRep;
use serde::Deserialize;
use serde::Se... |
Rust | hhvm/hphp/hack/src/utils/rust/pos/pos_impl.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::borrow::Cow;
use std::cmp::Ordering;
use std::ops::Range;
use std::sync::Arc;
use eq_modulo_pos::EqModuloPos;
use ocamlrep::Fr... |
Rust | hhvm/hphp/hack/src/utils/rust/pos/pos_span_raw.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use crate::file_pos_large::FilePosLarge;
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PosSpanRaw {
pub start: FilePosLarge,
... |
Rust | hhvm/hphp/hack/src/utils/rust/pos/pos_span_tiny.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::cmp::Ordering;
use std::fmt;
use ocamlrep::FromOcamlRep;
use ocamlrep::FromOcamlRepIn;
use ocamlrep::ToOcamlRep;
use serde::De... |
Rust | hhvm/hphp/hack/src/utils/rust/pos/rc_pos.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
pub mod file_pos;
pub mod file_pos_large;
pub mod file_pos_small;
pub mod pos_span_raw;
pub mod pos_span_tiny;
mod pos_impl;
pub use ... |
TOML | hhvm/hphp/hack/src/utils/rust/random_id/Cargo.toml | # @generated by autocargo
[package]
name = "random_id"
version = "0.0.0"
edition = "2021"
[lib]
path = "../random_id.rs"
test = false
doctest = false
[dependencies]
rand = { version = "0.8", features = ["small_rng"] } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.