string_cache_shared-0.3.0/Cargo.toml01006440001750000175000000001443130063664710015652 0ustar0000000000000000# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g. crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "string_cache_shared" version = "0.3.0" authors = ["The Servo Project Developers"] description = "Code share between string_cache and string_cache_codegen." license = "MIT / Apache-2.0" repository = "https://github.com/servo/string-cache" [lib] path = "lib.rs" string_cache_shared-0.3.0/Cargo.toml.orig01006440001750000175000000000432130063664710016606 0ustar0000000000000000[package] name = "string_cache_shared" version = "0.3.0" authors = [ "The Servo Project Developers" ] description = "Code share between string_cache and string_cache_codegen." license = "MIT / Apache-2.0" repository = "https://github.com/servo/string-cache" [lib] path = "lib.rs" string_cache_shared-0.3.0/lib.rs01006440001750000175000000001637130063643400015034 0ustar0000000000000000// Copyright 2015 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. // FIXME(rust-lang/rust#18153): generate these from an enum pub const DYNAMIC_TAG: u8 = 0b_00; pub const INLINE_TAG: u8 = 0b_01; // len in upper nybble pub const STATIC_TAG: u8 = 0b_10; pub const TAG_MASK: u64 = 0b_11; pub const ENTRY_ALIGNMENT: usize = 4; // Multiples have TAG_MASK bits unset, available for tagging. pub const MAX_INLINE_LEN: usize = 7; pub const STATIC_SHIFT_BITS: usize = 32; pub fn pack_static(n: u32) -> u64 { (STATIC_TAG as u64) | ((n as u64) << STATIC_SHIFT_BITS) }