Skip to content

Commit

Permalink
Revert "Use jemallocator (#298)" (#310)
Browse files Browse the repository at this point in the history
This reverts commit 795a70e.
  • Loading branch information
jasonwilliams authored Apr 13, 2020
1 parent f1f49d1 commit 0274858
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 100 deletions.
35 changes: 0 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion boa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ serde = { version = "1.0.105", features = ["derive"], optional = true }

[dev-dependencies]
criterion = "0.3.1"
jemallocator = "0.3.2"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
9 changes: 5 additions & 4 deletions boa/benches/exec.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use boa::{exec, realm::Realm};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
#[macro_use]
extern crate criterion;

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
use boa::exec;
use boa::realm::Realm;
use criterion::{black_box, Criterion};

static SRC: &str = r#"
let a = Symbol();
Expand Down
9 changes: 5 additions & 4 deletions boa/benches/fib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use boa::exec;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
#[macro_use]
extern crate criterion;

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
use boa::exec;
use criterion::black_box;
use criterion::Criterion;

static SRC: &str = r#"
let num = 12;
Expand Down
10 changes: 6 additions & 4 deletions boa/benches/parser.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use boa::syntax::{lexer::Lexer, parser::Parser};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
#[macro_use]
extern crate criterion;

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
use boa::syntax::lexer::Lexer;
use boa::syntax::parser::Parser;
use criterion::black_box;
use criterion::Criterion;

static EXPRESSION: &str = r#"
1 + 1 + 1 + 1 + 1 + 1 / 1 + 1 + 1 * 1 + 1 + 1 + 1;
Expand Down
14 changes: 7 additions & 7 deletions boa/benches/string.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use boa::{
exec,
syntax::{lexer::Lexer, parser::Parser},
};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
#[macro_use]
extern crate criterion;

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
use boa::exec;
use boa::syntax::lexer::Lexer;
use boa::syntax::parser::Parser;
use criterion::black_box;
use criterion::Criterion;

static SRC: &str = "let foo = 'hello world!'; foo;";

Expand Down
1 change: 0 additions & 1 deletion boa_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ edition = "2018"
[dependencies]
Boa = { path = "../boa", features = ["serde-ast"], default-features = false }
structopt = "0.3.12"
jemallocator = "0.3.2"
56 changes: 12 additions & 44 deletions boa_cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,47 +1,15 @@
#![deny(
unused_qualifications,
clippy::all,
unused_qualifications,
unused_import_braces,
unused_lifetimes,
unreachable_pub,
trivial_numeric_casts,
rustdoc,
missing_debug_implementations,
missing_copy_implementations,
deprecated_in_future,
non_ascii_idents,
rust_2018_compatibility,
rust_2018_idioms,
future_incompatible,
nonstandard_style
)]
#![warn(clippy::perf, clippy::single_match_else, clippy::dbg_macro)]
#![allow(
clippy::missing_inline_in_public_items,
clippy::cognitive_complexity,
clippy::must_use_candidate,
clippy::missing_errors_doc,
clippy::as_conversions
)]

use boa::{
builtins::console::log,
exec::Executor,
forward_val,
realm::Realm,
serde_json,
syntax::ast::{node::Node, token::Token},
};
use std::{
fs::read_to_string,
io::{self, Write},
path::PathBuf,
};
use structopt::{clap::arg_enum, StructOpt};

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
#![deny(unused_qualifications, clippy::correctness, clippy::style)]
#![warn(clippy::perf)]
#![allow(clippy::cognitive_complexity)]

use boa::builtins::console::log;
use boa::serde_json;
use boa::syntax::ast::{node::Node, token::Token};
use boa::{exec::Executor, forward_val, realm::Realm};
use std::io::{self, Write};
use std::{fs::read_to_string, path::PathBuf};
use structopt::clap::arg_enum;
use structopt::StructOpt;

/// CLI configuration for Boa.
//
Expand Down

0 comments on commit 0274858

Please sign in to comment.