Browse Source

Move `property` module to root (#684)

pull/656/head
Halid Odat 4 years ago committed by GitHub
parent
commit
a12ce8200e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      boa/examples/classes.rs
  2. 6
      boa/src/builtins/array/mod.rs
  3. 2
      boa/src/builtins/function/mod.rs
  4. 6
      boa/src/builtins/json/mod.rs
  5. 6
      boa/src/builtins/map/mod.rs
  6. 1
      boa/src/builtins/mod.rs
  7. 6
      boa/src/builtins/object/internal_methods.rs
  8. 2
      boa/src/builtins/object/mod.rs
  9. 3
      boa/src/builtins/regexp/mod.rs
  10. 2
      boa/src/builtins/string/mod.rs
  11. 2
      boa/src/builtins/symbol/mod.rs
  12. 4
      boa/src/class.rs
  13. 2
      boa/src/environment/global_environment_record.rs
  14. 2
      boa/src/environment/object_environment_record.rs
  15. 2
      boa/src/exec/mod.rs
  16. 1
      boa/src/lib.rs
  17. 0
      boa/src/property/attribute/mod.rs
  18. 0
      boa/src/property/attribute/tests.rs
  19. 3
      boa/src/property/mod.rs
  20. 12
      boa/src/value/mod.rs

2
boa/examples/classes.rs

@ -1,8 +1,8 @@
use boa::{
builtins::property::Attribute,
class::{Class, ClassBuilder},
exec::Interpreter,
forward_val,
property::Attribute,
realm::Realm,
Finalize, Result, Trace, Value,
};

6
boa/src/builtins/array/mod.rs

@ -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,
};

2
boa/src/builtins/function/mod.rs

@ -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,
};

6
boa/src/builtins/json/mod.rs

@ -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};

6
boa/src/builtins/map/mod.rs

@ -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;

1
boa/src/builtins/mod.rs

@ -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;

6
boa/src/builtins/object/internal_methods.rs

@ -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,
};

2
boa/src/builtins/object/mod.rs

@ -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,
};

3
boa/src/builtins/regexp/mod.rs

@ -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,
};

2
boa/src/builtins/string/mod.rs

@ -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,
};

2
boa/src/builtins/symbol/mod.rs

@ -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,
};

4
boa/src/class.rs

@ -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,
@ -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;

2
boa/src/environment/global_environment_record.rs

@ -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};

2
boa/src/environment/object_environment_record.rs

@ -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};

2
boa/src/exec/mod.rs

@ -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,

1
boa/src/lib.rs

@ -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;

0
boa/src/builtins/property/attribute/mod.rs → boa/src/property/attribute/mod.rs

0
boa/src/builtins/property/attribute/tests.rs → boa/src/property/attribute/tests.rs

3
boa/src/builtins/property/mod.rs → boa/src/property/mod.rs

@ -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.

12
boa/src/value/mod.rs

@ -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};

Loading…
Cancel
Save