Bug 1630936: Use log macros explicitly instead of ye olde extern crate way; r=rhunt
authorBenjamin Bouvier <benj@benj.me>
Tue, 21 Apr 2020 09:20:17 +0000
changeset 525048 54f41fca4bdacaa52a4f524969c047faef8e9fd9
parent 525047 28e7b71243ed49cf38f93860a5b3c8012b535a15
child 525049 bb3910236cadc8bf1ee655b32b7d09ae25883df4
push id37334
push useraiakab@mozilla.com
push dateTue, 21 Apr 2020 22:25:03 +0000
treeherdermozilla-central@263963426b56 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhunt
bugs1630936
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1630936: Use log macros explicitly instead of ye olde extern crate way; r=rhunt Differential Revision: https://phabricator.services.mozilla.com/D71312
js/src/wasm/cranelift/src/compile.rs
js/src/wasm/cranelift/src/isa.rs
js/src/wasm/cranelift/src/lib.rs
--- a/js/src/wasm/cranelift/src/compile.rs
+++ b/js/src/wasm/cranelift/src/compile.rs
@@ -13,16 +13,17 @@
  * limitations under the License.
  */
 
 //! Cranelift WebAssembly function compiler.
 //!
 //! This module defines the `compile()` function which uses Cranelift to compile a single
 //! WebAssembly function.
 
+use log::{debug, info};
 use std::fmt;
 use std::mem;
 
 use cranelift_codegen::binemit::{
     Addend, CodeInfo, CodeOffset, NullStackmapSink, Reloc, RelocSink, Stackmap, TrapSink,
 };
 use cranelift_codegen::entity::EntityRef;
 use cranelift_codegen::ir::{
--- a/js/src/wasm/cranelift/src/isa.rs
+++ b/js/src/wasm/cranelift/src/isa.rs
@@ -16,16 +16,17 @@
 //! CPU detection and configuration of Cranelift's `TargetISA`.
 //!
 //! This module deals with the configuration of Cranelift to generate code for the current CPU that
 //! is compatible with the SpiderMonkey JIT.
 //!
 //! The main entry point is the `make_isa()` function which allocates a configured `TargetISA`
 //! object.
 
+use log::warn;
 use std::env;
 
 use cranelift_codegen::isa;
 use cranelift_codegen::settings::{self, Configurable};
 
 use crate::bindings::StaticEnvironment;
 use crate::utils::{BasicError, DashResult};
 
--- a/js/src/wasm/cranelift/src/lib.rs
+++ b/js/src/wasm/cranelift/src/lib.rs
@@ -8,25 +8,23 @@
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
-#[macro_use]
-extern crate log;
-
 mod bindings; // High-level bindings for C++ data structures.
 mod compile; // Cranelift function compiler.
 mod isa; // `TargetISA` configuration.
 mod utils; // Helpers for other source files.
 mod wasm2clif; // WebAssembly to Cranelift translation callbacks.
 
+use log::{self, error, info};
 use std::ptr;
 
 use crate::bindings::{CompiledFunc, FuncCompileInput, ModuleEnvironment, StaticEnvironment};
 use crate::compile::BatchCompiler;
 
 #[no_mangle]
 pub extern "C" fn cranelift_initialize() {
     // Gecko might set a logger before we do, which is all fine; try to initialize ours, and reset