Skip to content

Commit

Permalink
Merge 686d614 into 59d328e
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat authored Sep 7, 2020
2 parents 59d328e + 686d614 commit bb5b1c3
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 34 deletions.
2 changes: 1 addition & 1 deletion boa/examples/classes.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use boa::{
builtins::property::Attribute,
class::{Class, ClassBuilder},
exec::Interpreter,
forward_val,
property::Attribute,
realm::Realm,
Finalize, Result, Trace, Value,
};
Expand Down
6 changes: 2 additions & 4 deletions boa/src/builtins/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ mod tests;

use super::function::{make_builtin_fn, make_constructor_fn};
use crate::{
builtins::{
object::{ObjectData, PROTOTYPE},
property::{Attribute, Property},
},
builtins::object::{ObjectData, PROTOTYPE},
exec::Interpreter,
property::{Attribute, Property},
value::{same_value_zero, Value},
BoaProfiler, Result,
};
Expand Down
2 changes: 1 addition & 1 deletion boa/src/builtins/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
use crate::{
builtins::{
object::{Object, ObjectData, PROTOTYPE},
property::{Attribute, Property},
Array,
},
environment::lexical_environment::Environment,
exec::Interpreter,
property::{Attribute, Property},
syntax::ast::node::{statement_list::RcStatementList, FormalParameter},
BoaProfiler, Result, Value,
};
Expand Down
6 changes: 2 additions & 4 deletions boa/src/builtins/json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
//! [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON

use crate::{
builtins::{
function::make_builtin_fn,
property::{Property, PropertyKey},
},
builtins::function::make_builtin_fn,
exec::Interpreter,
property::{Property, PropertyKey},
BoaProfiler, Result, Value,
};
use serde_json::{self, Value as JSONValue};
Expand Down
6 changes: 2 additions & 4 deletions boa/src/builtins/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

use super::function::{make_builtin_fn, make_constructor_fn};
use crate::{
builtins::{
object::{ObjectData, PROTOTYPE},
property::{Attribute, Property},
},
builtins::object::{ObjectData, PROTOTYPE},
exec::Interpreter,
property::{Attribute, Property},
BoaProfiler, Result, Value,
};
use ordered_map::OrderedMap;
Expand Down
1 change: 0 additions & 1 deletion boa/src/builtins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub mod math;
pub mod nan;
pub mod number;
pub mod object;
pub mod property;
pub mod regexp;
pub mod string;
pub mod symbol;
Expand Down
6 changes: 2 additions & 4 deletions boa/src/builtins/object/internal_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
//! [spec]: https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots

use crate::{
builtins::{
object::Object,
property::{Attribute, Property, PropertyKey},
},
builtins::object::Object,
property::{Attribute, Property, PropertyKey},
value::{same_value, Value},
BoaProfiler,
};
Expand Down
2 changes: 1 addition & 1 deletion boa/src/builtins/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ use crate::{
builtins::{
function::{make_builtin_fn, make_constructor_fn, Function},
map::ordered_map::OrderedMap,
property::{Property, PropertyKey},
BigInt, Date, RegExp,
},
exec::Interpreter,
property::{Property, PropertyKey},
value::{same_value, RcBigInt, RcString, RcSymbol, Value},
BoaProfiler, Result,
};
Expand Down
3 changes: 2 additions & 1 deletion boa/src/builtins/regexp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ use regex::Regex;

use super::function::{make_builtin_fn, make_constructor_fn};
use crate::{
builtins::{object::ObjectData, property::Property},
builtins::object::ObjectData,
exec::Interpreter,
property::Property,
value::{RcString, Value},
BoaProfiler, Result,
};
Expand Down
2 changes: 1 addition & 1 deletion boa/src/builtins/string/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ use super::function::{make_builtin_fn, make_constructor_fn};
use crate::{
builtins::{
object::{Object, ObjectData},
property::Property,
RegExp,
},
exec::Interpreter,
property::Property,
value::{RcString, Value},
BoaProfiler, Result,
};
Expand Down
2 changes: 1 addition & 1 deletion boa/src/builtins/symbol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ mod tests;

use super::function::{make_builtin_fn, make_constructor_fn};
use crate::{
builtins::property::{Attribute, Property},
exec::Interpreter,
property::{Attribute, Property},
value::{RcString, RcSymbol, Value},
BoaProfiler, Result,
};
Expand Down
4 changes: 2 additions & 2 deletions boa/src/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! Native classes are implemented through the [`Class`][class-trait] trait.
//! ```
//!# use boa::{
//!# builtins::property::Attribute,
//!# property::Attribute,
//!# class::{Class, ClassBuilder},
//!# exec::Interpreter,
//!# forward_val,
Expand Down Expand Up @@ -66,8 +66,8 @@ use crate::{
builtins::{
function::{BuiltInFunction, Function, FunctionFlags, NativeFunction},
object::{GcObject, NativeObject, Object, ObjectData, PROTOTYPE},
property::{Attribute, Property, PropertyKey},
},
property::{Attribute, Property, PropertyKey},
Interpreter, Result, Value,
};
use std::fmt::Debug;
Expand Down
2 changes: 1 addition & 1 deletion boa/src/environment/global_environment_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
//! More info: <https://tc39.es/ecma262/#sec-global-environment-records>

use crate::{
builtins::property::{Attribute, Property},
environment::{
declarative_environment_record::DeclarativeEnvironmentRecord,
environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType},
object_environment_record::ObjectEnvironmentRecord,
},
property::{Attribute, Property},
Value,
};
use gc::{Finalize, Trace};
Expand Down
2 changes: 1 addition & 1 deletion boa/src/environment/object_environment_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//! More info: [Object Records](https://tc39.es/ecma262/#sec-object-environment-records)

use crate::{
builtins::property::{Attribute, Property},
environment::{
environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType},
},
property::{Attribute, Property},
Value,
};
use gc::{Finalize, Trace};
Expand Down
2 changes: 1 addition & 1 deletion boa/src/exec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ use crate::{
builtins::{
function::{Function, FunctionFlags, NativeFunction},
object::{GcObject, Object, ObjectData, PROTOTYPE},
property::{Property, PropertyKey},
Console, Symbol,
},
class::{Class, ClassBuilder},
property::{Property, PropertyKey},
realm::Realm,
syntax::ast::{
constant::Const,
Expand Down
1 change: 1 addition & 0 deletions boa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub mod class;
pub mod environment;
pub mod exec;
pub mod profiler;
pub mod property;
pub mod realm;
pub mod syntax;
pub mod value;
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion boa/src/builtins/property/mod.rs → boa/src/property/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ use gc::{Finalize, Trace};
use std::convert::TryFrom;
use std::fmt;

pub mod attribute;
mod attribute;

pub use attribute::Attribute;

/// This represents a Javascript Property AKA The Property Descriptor.
Expand Down
12 changes: 7 additions & 5 deletions boa/src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#[cfg(test)]
mod tests;

use crate::builtins::{
number::{f64_to_int32, f64_to_uint32},
object::{GcObject, Object, ObjectData, PROTOTYPE},
use crate::exec::Interpreter;
use crate::{
builtins::{
number::{f64_to_int32, f64_to_uint32},
object::{GcObject, Object, ObjectData, PROTOTYPE},
BigInt, Number,
},
property::{Attribute, Property, PropertyKey},
BigInt, Number,
};
use crate::exec::Interpreter;
use crate::{BoaProfiler, Result};
use gc::{Finalize, GcCellRef, GcCellRefMut, Trace};
use serde_json::{map::Map, Number as JSONNumber, Value as JSONValue};
Expand Down

0 comments on commit bb5b1c3

Please sign in to comment.