language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
Rust | hhvm/hphp/hack/src/hackc/ir/assemble/tokenizer.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::fmt;
use std::io::BufRead;
use std::io::BufReader;
use std::io::Read;
use std::rc::Rc;
use std::sync::Arc... |
Rust | hhvm/hphp/hack/src/hackc/ir/assemble/util.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 anyhow::bail;
use anyhow::Result;
pub(crate) fn unescape(string: &str) -> Result<Vec<u8>> {
let mut output = Vec::new();
#[... |
TOML | hhvm/hphp/hack/src/hackc/ir/cargo/parse_macro/Cargo.toml | # @generated by autocargo
[package]
name = "parse_macro_ir"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../assemble/parse_macro.rs"
test = false
doctest = false
proc-macro = true
[dependencies]
proc-macro-error = "1.0"
proc-macro2 = { version = "1.0.64", features = ["span-locations"] }
quote = "1.0.29"
[dev... |
TOML | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/Cargo.toml | # @generated by autocargo
[package]
name = "bc_to_ir"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
b2i_macros = { version = "0.0.0", path = "b2i_macros" }
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
ffi = { version = "0.0.0", path = "../../../../utils/ffi" }
hash =... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/class.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 hhbc::Class;
use ir::StringInterner;
use itertools::Itertools;
use crate::convert;
use crate::types;
pub(crate) fn convert_class<'... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/constant.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 hhbc::Constant;
use ir::StringInterner;
use crate::convert;
pub(crate) fn convert_constant<'a>(
constant: &Constant<'a>,
s... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/context.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::collections::VecDeque;
use std::sync::Arc;
use ffi::Str;
use hash::HashMap;
use hhbc::Instruct;
use ir::instr;
use ir::instr::... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/convert.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::path::Path;
use std::sync::Arc;
use ffi::Maybe;
use hash::HashMap;
use hhbc::Fatal;
use hhbc::Unit;
use ir::StringInterner;
/... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/func.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 ffi::Maybe;
use hhbc::Body;
use hhbc::Function;
use hhbc::Method;
use hhbc::Param;
use ir::func::DefaultValue;
use ir::instr::Termin... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/instrs.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::Display;
use std::sync::Arc;
use hhbc::Instruct;
use hhbc::Opcode;
use hhbc::Pseudo;
use ir::inst... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/lib.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.
#![feature(box_patterns)]
mod class;
mod constant;
mod context;
mod convert;
mod func;
mod instrs;
mod sequence;
mod types;
pub use co... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/sequence.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::ops::Range;
use hhbc::Instruct;
use ir::BlockId;
use ir::BlockIdMap;
use ir::ExFrameId;
use ir::FuncBuil... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/types.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 ffi::Maybe;
use ffi::Str;
use ir::BaseType;
use ir::ClassId;
use ir::StringInterner;
use itertools::Itertools;
use maplit::hashmap;
... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/b2i_macros/b2i_macros.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::collections::HashMap;
use hhbc_gen::ImmType;
use hhbc_gen::Inputs;
use hhbc_gen::InstrFlags;
use hhbc_gen::OpcodeData;
use hhb... |
TOML | hhvm/hphp/hack/src/hackc/ir/conversions/bc_to_ir/b2i_macros/Cargo.toml | # @generated by autocargo
[package]
name = "b2i_macros"
version = "0.0.0"
edition = "2021"
[lib]
path = "b2i_macros.rs"
test = false
doctest = false
proc-macro = true
[dependencies]
hhbc-gen = { version = "0.0.0", path = "../../../../../../../tools/hhbc-gen" }
proc-macro2 = { version = "1.0.64", features = ["span-lo... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/adata.rs | use std::sync::Arc;
use ffi::Slice;
use hash::HashMap;
use crate::strings::StringCache;
/// Builder for hhbc::Unit.adata.
pub(crate) struct AdataCache<'a> {
alloc: &'a bumpalo::Bump,
adata: Vec<hhbc::Adata<'a>>,
lookup: HashMap<Arc<ir::TypedValue>, usize>,
}
impl<'a> AdataCache<'a> {
pub(crate) fn n... |
TOML | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/Cargo.toml | # @generated by autocargo
[package]
name = "ir_to_bc"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
bumpalo = { version = "3.11.1", features = ["collections"] }
dashmap = { version = "5.4", features = ["rayon", "serde"] }
ffi = { version = "0.0.0", path = "../../../../utils/ffi" }
hash = { ... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/class.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 ffi::Maybe;
use ffi::Slice;
use crate::convert;
use crate::convert::UnitBuilder;
use crate::strings::StringCache;
use crate::types;... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/constant.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 hhbc::Constant;
use crate::convert;
use crate::strings::StringCache;
pub(crate) fn convert_hack_constant<'a>(
constant: ir::Ha... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/convert.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::sync::Arc;
use ffi::Maybe;
use ffi::Slice;
use hhbc::Fatal;
use crate::adata::AdataCache;
use crate::strings::StringCache;
/... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/emitter.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::collections::VecDeque;
use std::fmt::Display;
use std::sync::Arc;
use ffi::Slice;
use ffi::Str;
use hash::HashMap;
use hhbc::D... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/ex_frame.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 ir::BlockId;
use ir::TryCatchId;
/// Collect the Func's Blocks into the tree represented by the exception frames.
pub(crate) fn col... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/func.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 ffi::Slice;
use hhbc::Method;
use log::trace;
use crate::adata::AdataCache;
use crate::convert;
use crate::convert::UnitBuilder;
us... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/lib.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.
mod adata;
mod class;
mod constant;
mod convert;
mod emitter;
mod ex_frame;
mod func;
mod push_count;
mod pusher;
mod strings;
mod types... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/pusher.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::sync::Arc;
use ir::analysis;
use ir::instr;
use ir::instr::HasLocals;
use ir::instr::HasOperands;
use ir::instr::IrToBc;
use i... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/push_count.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 ir::instr;
use ir::instr::IrToBc;
use ir::instr::Special;
use ir::Instr;
pub(crate) trait PushCount<'a> {
/// How many values a... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/strings.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::sync::Arc;
use dashmap::DashMap;
use ffi::Str;
use ir::StringInterner;
use ir::UnitBytesId;
pub(crate) struct StringCache<'a>... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/ir_to_bc/types.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 ffi::Maybe;
use ffi::Str;
use hhbc::Constraint;
use hhbc::TypeInfo;
use ir::BaseType;
use ir::TypeConstraintFlags;
use crate::strin... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/class.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.
//! To support late static binding classes are set up as a two tier system -
//! every class has a singleton "static class" which holds ... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/decls.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 anyhow::Error;
use hash::HashSet;
use crate::hack::Builtin;
use crate::hack::Hhbc;
use crate::textual::TextualFile;
type Result<T ... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/func.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::collections::HashSet;
use std::sync::Arc;
use anyhow::Error;
use ir::instr::HasLoc;
use ir::instr::HasLocals;
use ir::instr::H... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/hack.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 anyhow::Error;
use hash::HashSet;
use strum::EnumIter;
use textual_macros::TextualDecl;
use crate::mangle::FunctionName;
use crate:... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/lib.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.
//! Textual is the name of the text format for Infer's IR. This crate converts
//! from HackC's IR to Textual for ingestion by Infer.
/... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/macros.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.
#![feature(box_patterns)]
use itertools::Itertools;
use proc_macro2::Literal;
use proc_macro2::TokenStream;
use proc_macro_error::abort;... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/mangle.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 ir::StringInterner;
use naming_special_names_rust::members;
use crate::class::IsStatic;
pub... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/member_op.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 anyhow::bail;
use anyhow::Error;
use ir::instr::BaseOp;
use ir::instr::FinalOp;
use ir::instr::MemberKey;
use ir::InstrId;
use ir::L... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/state.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::sync::Arc;
use ir::StringInterner;
pub(crate) struct UnitState {
pub(crate) strings: Arc<StringInterner>,
}
impl UnitSta... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/textual.rs | #![allow(dead_code)]
// 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.
//! This is a structural version of the Textual language - it should have
//! basically no business logic and just ... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/typed_value.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 hack::Builtin;
use hack::Hhbc;
use ir::ArrayKey;
use ir::ClassId;
use ir::StringInterner;
use ir::TypedValue;
use itertools::Itertoo... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/types.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 ir::BaseType;
use ir::EnforceableType;
use ir::StringInterner;
use ir::TypeConstraintFlags;
use crate::mangle::TypeName;
use crate:... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/util.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 ascii::AsciiChar;
use ascii::AsciiString;
pub fn escaped_string(input: &[u8]) -> AsciiString {
let mut r... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/writer.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::path::Path;
use std::sync::Arc;
use anyhow::bail;
use anyhow::Result;
use hash::HashMap;
use strum::IntoEnumIterator;
use cra... |
TOML | hhvm/hphp/hack/src/hackc/ir/conversions/textual/cargo/macros/Cargo.toml | # @generated by autocargo
[package]
name = "textual_macros"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../macros.rs"
test = false
doctest = false
proc-macro = true
[dependencies]
itertools = "0.10.3"
proc-macro-error = "1.0"
proc-macro2 = { version = "1.0.64", features = ["span-locations"] }
quote = "1.0.29... |
TOML | hhvm/hphp/hack/src/hackc/ir/conversions/textual/cargo/textual/Cargo.toml | # @generated by autocargo
[package]
name = "textual"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../lib.rs"
[dependencies]
anyhow = "1.0.71"
ascii = "1.0"
escaper = { version = "0.0.0", path = "../../../../../../utils/escaper" }
hash = { version = "0.0.0", path = "../../../../../../utils/hash" }
ir = { versi... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/lower/class.rs | use std::sync::Arc;
use ir::instr;
use ir::Attr;
use ir::Attribute;
use ir::Class;
use ir::ClassId;
use ir::Coeffects;
use ir::Constant;
use ir::FuncBuilder;
use ir::HackConstant;
use ir::Instr;
use ir::LocalId;
use ir::MemberOpBuilder;
use ir::Method;
use ir::MethodFlags;
use ir::MethodId;
use ir::Param;
use ir::Prop... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/lower/constants.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 ir::instr;
use ir::instr::HasOperands;
use ir::instr::Terminator;
use ir::newtype::ConstantIdSet;
use ir::BlockId;
use ir::BlockIdSe... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/lower/func.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::sync::Arc;
use ir::instr::Hhbc;
use ir::Constant;
use ir::Func;
use ir::FuncBuilder;
use ir::Instr;
use ir::LocId;
use ir::Loc... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/lower/func_builder.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.
//! Helpers for FuncBuilder emitting Textual specific constructs during lowering.
use std::borrow::Cow;
use ir::FuncBuilder;
use ir::I... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/lower/instrs.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 ir::func_builder::TransformInstr;
use ir::func_builder::TransformState;
use ir::instr::CallDetail;
use ir::instr::CmpOp;
use ir::ins... |
Rust | hhvm/hphp/hack/src/hackc/ir/conversions/textual/lower/mod.rs | pub(crate) mod class;
pub(crate) mod constants;
pub(crate) mod func;
pub(crate) mod func_builder;
pub(crate) mod instrs;
pub(crate) use class::lower_class;
pub(crate) use func::lower_func; |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/block.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
use newtype::IdVec;
use crate::instr::HasOperands;
use crate::BlockId;
use crate::Func;
use crate::Instr;
use crate::InstrId;
use crate::TryCatchId;
use crate::ValueId;
use crate::ValueIdMap;
/// A Block represents a basic-block in a CFG. A wel... |
TOML | hhvm/hphp/hack/src/hackc/ir/ir_core/Cargo.toml | # @generated by autocargo
[package]
name = "ir_core"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
ffi = { version = "0.0.0", path = "../../../utils/ffi" }
hash = { version = "0.0.0", path = "../../../utils/hash" }
hhbc = ... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/class.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 ffi::Str;
use crate::func::SrcLoc;
use crate::Attr;
use crate::Attribute;
use crate::ClassId;
use crate::CtxConstant;
use crate::Ha... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/coeffects.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 ffi::Str;
use crate::CcParam;
use crate::Ctx;
#[derive(Debug)]
pub struct CtxConstant<'a> {
pub name: Str<'a>,
pub recogni... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/common.rs | // Copyright (c) Facebook, Inc. and its affiliates.
use crate::ClassId;
use crate::TypedValue;
/// Attributes are the bit of metadata that appears in double angle-brackets
/// before a definition. They look like either raw identifiers or function
/// calls.
///
/// Attributes can appear on files, classes, functions, ... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/constant.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
use std::sync::Arc;
use hhvm_types_ffi::Attr;
use crate::instr::HasOperands;
use crate::CollectionType;
use crate::ConstId;
use crate::ConstName;
use crate::FloatBits;
use crate::TypedValue;
use crate::UnitBytesId;
use crate::ValueId;
/// A co... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/func.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 ffi::Str;
use newtype::newtype_int;
use newtype::IdVec;
use crate::block::BlockIdIterator;
use crate::instr::Terminator;
use crate:... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/func_builder.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::sync::Arc;
use hash::HashMap;
use crate::func::SrcLoc;
use crate::instr::BaseOp;
use crate::instr::FinalOp;
use crate::instr:... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/func_builder_ex.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::sync::Arc;
use crate::instr::Hhbc;
use crate::instr::Predicate;
use crate::type_struct::TypeStruct;
use crate::BaseType;
use c... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/instr.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
use std::borrow::Cow;
use macros::HasLoc;
use macros::HasLocals;
use macros::HasOperands;
use newtype::newtype_int;
use smallvec::SmallVec;
use strum::Display;
use crate::BareThisOp;
use crate::BlockId;
use crate::ClassId;
use crate::Collection... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/lib.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.
#![feature(const_option)]
//! # The HackC IR
//!
//! This is an IR representation of the Hack code.
//!
//! A Hack program is organized... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/module.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 ffi::Str;
use crate::func::SrcLoc;
use crate::Attribute;
use crate::ClassId;
#[derive(Debug)]
pub struct Module<'a> {
pub attr... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/newtype.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
// Re-export some types in from hhbc so users of `ir` don't have to figure out
// which random stuff to get from `ir` and which to get elsewhere.
use bstr::BStr;
use naming_special_names_rust::members;
use newtype::newtype_int;
use parking_lot::M... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/string_intern.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 bstr::BStr;
use hash::IndexSet;
use newtype::newtype_int;
use parking_lot::MappedRwLockReadGuard;
use parking... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/typed_value.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::sync::Arc;
use hash::IndexMap;
use hash::IndexSet;
use crate::ClassId;
use crate::Constant;
use crate::FloatBits;
use crate::... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/types.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 ffi::Str;
use naming_special_names_rust as naming_special_names;
use crate::newtype::ClassId;
use crate::Attr;
use c... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/type_const.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 ffi::Str;
use crate::TypedValue;
#[derive(Debug)]
pub struct TypeConstant<'a> {
pub name: Str<'a>,
pub initializer: Option... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/type_struct.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
pub use hhvm_types_ffi::ffi::TypeStructureKind;
use crate::ArrayKey;
use crate::ClassId;
use crate::StringInterner;
use crate::TypedValue;
#[derive(Debug, Clone, Hash, Eq, PartialEq)]
pub enum TypeStruct {
Unresolved(ClassId),
Null,
... |
Rust | hhvm/hphp/hack/src/hackc/ir/ir_core/unit.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::sync::Arc;
use bstr::BString;
use ffi::Str;
use crate::func::SrcLoc;
use crate::string_intern::StringInterner;
use crate::Att... |
TOML | hhvm/hphp/hack/src/hackc/ir/macros/Cargo.toml | # @generated by autocargo
[package]
name = "macros"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.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", features = ["extra-traits", "fol... |
Rust | hhvm/hphp/hack/src/hackc/ir/macros/has_loc.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 proc_macro2::Ident;
use proc_macro2::Span;
use proc_macro2::TokenStream;
use quote::quote;
use quote::ToToken... |
Rust | hhvm/hphp/hack/src/hackc/ir/macros/has_locals.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 proc_macro2::Ident;
use proc_macro2::Span;
use proc_macro2::TokenStream;
use quote::quote;
use syn::spanned::... |
Rust | hhvm/hphp/hack/src/hackc/ir/macros/has_operands.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 proc_macro2::Ident;
use proc_macro2::Span;
use proc_macro2::TokenStream;
use quote::quote;
use quote::ToToken... |
Rust | hhvm/hphp/hack/src/hackc/ir/macros/lib.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.
mod has_loc;
mod has_locals;
mod has_operands;
mod simple_type;
mod util;
use proc_macro::TokenStream;
#[proc_macro_derive(HasLoc, att... |
Rust | hhvm/hphp/hack/src/hackc/ir/macros/operands.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::collections::HashSet;
use hhbc::ImmType;
use hhbc::InstrFlags;
use hhbc::OpcodeData;
use proc_macro2::Ident;
use proc_macro2::... |
Rust | hhvm/hphp/hack/src/hackc/ir/macros/simple_type.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 proc_macro2::Ident;
use syn::Path;
#[derive(Clone, Debug, Eq, PartialEq)]
pub(crate) enum SimpleType<'a> {
// [T; #]
Array(... |
Rust | hhvm/hphp/hack/src/hackc/ir/macros/util.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 proc_macro2::Ident;
use crate::simple_type::SimpleType;
pub(crate) enum InterestingFields<'a> {
None,
One(usize, Option<&'... |
Rust | hhvm/hphp/hack/src/hackc/ir/passes/async.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 ir_core::instr::Terminator;
use ir_core::BlockId;
use ir_core::Call;
use ir_core::Func;
use ir_core::FuncBuilder;
use ir_core::Instr... |
TOML | hhvm/hphp/hack/src/hackc/ir/passes/Cargo.toml | # @generated by autocargo
[package]
name = "passes"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
analysis = { version = "0.0.0", path = "../analysis" }
ir_core = { version = "0.0.0", path = "../ir_core" }
itertools = "0.10.3"
log = { version = "0.4.17", features = ["kv_unstable", "kv_unsta... |
Rust | hhvm/hphp/hack/src/hackc/ir/passes/clean.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 analysis::PredecessorCatchMode;
use analysis::PredecessorFlags;
use analysis::Predecessors;
use ir_core::instr::HasOperands;
use ir_... |
Rust | hhvm/hphp/hack/src/hackc/ir/passes/control.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 analysis::PredecessorCatchMode;
use analysis::PredecessorFlags;
use ir_core::instr::HasEdges;
use ir_core::instr::Terminator;
use ir... |
Rust | hhvm/hphp/hack/src/hackc/ir/passes/critedge.rs | use analysis::PredecessorCatchMode;
use analysis::PredecessorFlags;
use ir_core::instr::HasEdges;
use ir_core::instr::HasLoc;
use ir_core::Block;
use ir_core::BlockId;
use ir_core::Func;
use ir_core::Instr;
use ir_core::LocId;
/// Find and split critical edges. Assumes there are no unreachable blocks,
/// which is the... |
Rust | hhvm/hphp/hack/src/hackc/ir/passes/lib.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.
#![feature(box_patterns)]
pub mod r#async;
pub mod clean;
pub mod control;
pub mod critedge;
pub mod rpo_sort;
pub mod ssa;
pub use r#... |
Rust | hhvm/hphp/hack/src/hackc/ir/passes/rpo_sort.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 analysis::rpo::compute_rpo;
use ir_core::BlockId;
use ir_core::Func;
use newtype::HasNone;
use newtype::IdVec;
/// Sort func's bloc... |
Rust | hhvm/hphp/hack/src/hackc/ir/passes/ssa.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
use std::collections::hash_map::Entry;
use analysis::compute_predecessor_blocks;
use analysis::PredecessorCatchMode;
use analysis::PredecessorFlags;
use analysis::Predecessors;
use ir_core::func_builder::TransformInstr;
use ir_core::func_builder:... |
TOML | hhvm/hphp/hack/src/hackc/ir/print/Cargo.toml | # @generated by autocargo
[package]
name = "print"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
ffi = { version = "0.0.0", path = "../../../utils/ffi" }
ir_core = { version = "0.0.0", path = "../ir_core" } |
Rust | hhvm/hphp/hack/src/hackc/ir/print/formatters.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.
//! Formatting Functions
//!
//! These functions are used to print the IR in a pseudo-assembly format.
//!
//! The functions in this fil... |
Rust | hhvm/hphp/hack/src/hackc/ir/print/lib.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 mod formatters;
pub mod print;
pub mod util;
use std::fmt;
pub use formatters::FmtBid;
pub use formatters::FmtEnforceableType;
pub... |
Rust | hhvm/hphp/hack/src/hackc/ir/print/print.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.
//! Print Functions
//!
//! These functions are used to print the IR in a pseudo-assembly format.
//!
//! The functions in this file (as... |
Rust | hhvm/hphp/hack/src/hackc/ir/print/util.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.
//! Print utility functions.
use std::cell::Cell;
use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result;
use ir_core::i... |
TOML | hhvm/hphp/hack/src/hackc/ir/testutils/Cargo.toml | # @generated by autocargo
[package]
name = "testutils"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
hash = { version = "0.0.0", path = "../../../utils/hash" }
ir_core = { version = "0.0.0", path = "../ir_core" }
print = { version = "0.0.0", path = "../print" } |
Rust | hhvm/hphp/hack/src/hackc/ir/testutils/lib.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 mod testutils;
pub use testutils::*; |
Rust | hhvm/hphp/hack/src/hackc/ir/testutils/testutils.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
//! This module contains shared functions for use by tests.
use std::sync::Arc;
use hash::HashMap;
use hash::HashSet;
use ir_core::constant::Constant;
use ir_core::instr;
use ir_core::BlockId;
use ir_core::Func;
use ir_core::FuncBuilder;
use ir... |
TOML | hhvm/hphp/hack/src/hackc/ir/verify/Cargo.toml | # @generated by autocargo
[package]
name = "verify"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
analysis = { version = "0.0.0", path = "../analysis" }
ir_core = { version = "0.0.0", path = "../ir_core" }
itertools = "0.10.3"
print = { version = "0.0.0", path = "../print" } |
Rust | hhvm/hphp/hack/src/hackc/ir/verify/lib.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 mod verify;
pub use self::verify::*; |
Rust | hhvm/hphp/hack/src/hackc/ir/verify/verify.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.
//! Verifier for HackIR. This traverses the HackIR structures and makes sure
//! that the required invariants still hold true.
use std... |
TOML | hhvm/hphp/hack/src/hackc/print_expr/Cargo.toml | # @generated by autocargo
[package]
name = "print_expr"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
anyhow = "1.0.71"
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
bumpalo = { version = "3.11.1", features = ["collections"] }
core_utils_rust = { version = "0.0.0", pa... |
Rust | hhvm/hphp/hack/src/hackc/print_expr/context.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::special_class_resolver::SpecialClassResolver;
#[derive(Clone)]
pub struct Context<'a> {
pub(crate) special_class_resolve... |
Rust | hhvm/hphp/hack/src/hackc/print_expr/lib.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.
mod context;
mod print;
mod special_class_resolver;
mod write;
pub use context::Context;
pub use print::expr_to_string_lossy;
pub use p... |
Rust | hhvm/hphp/hack/src/hackc/print_expr/print.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::io::Result;
use std::io::Write;
use std::write;
use bstr::BString;
use bstr::ByteSlice;
use core_utils_r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.