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. 4
      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. 8
      boa/src/value/mod.rs

2
boa/examples/classes.rs

@ -1,8 +1,8 @@
use boa::{ use boa::{
builtins::property::Attribute,
class::{Class, ClassBuilder}, class::{Class, ClassBuilder},
exec::Interpreter, exec::Interpreter,
forward_val, forward_val,
property::Attribute,
realm::Realm, realm::Realm,
Finalize, Result, Trace, Value, 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 super::function::{make_builtin_fn, make_constructor_fn};
use crate::{ use crate::{
builtins::{ builtins::object::{ObjectData, PROTOTYPE},
object::{ObjectData, PROTOTYPE},
property::{Attribute, Property},
},
exec::Interpreter, exec::Interpreter,
property::{Attribute, Property},
value::{same_value_zero, Value}, value::{same_value_zero, Value},
BoaProfiler, Result, BoaProfiler, Result,
}; };

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

@ -14,11 +14,11 @@
use crate::{ use crate::{
builtins::{ builtins::{
object::{Object, ObjectData, PROTOTYPE}, object::{Object, ObjectData, PROTOTYPE},
property::{Attribute, Property},
Array, Array,
}, },
environment::lexical_environment::Environment, environment::lexical_environment::Environment,
exec::Interpreter, exec::Interpreter,
property::{Attribute, Property},
syntax::ast::node::{statement_list::RcStatementList, FormalParameter}, syntax::ast::node::{statement_list::RcStatementList, FormalParameter},
BoaProfiler, Result, Value, 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 //! [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
use crate::{ use crate::{
builtins::{ builtins::function::make_builtin_fn,
function::make_builtin_fn,
property::{Property, PropertyKey},
},
exec::Interpreter, exec::Interpreter,
property::{Property, PropertyKey},
BoaProfiler, Result, Value, BoaProfiler, Result, Value,
}; };
use serde_json::{self, Value as JSONValue}; 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 super::function::{make_builtin_fn, make_constructor_fn};
use crate::{ use crate::{
builtins::{ builtins::object::{ObjectData, PROTOTYPE},
object::{ObjectData, PROTOTYPE},
property::{Attribute, Property},
},
exec::Interpreter, exec::Interpreter,
property::{Attribute, Property},
BoaProfiler, Result, Value, BoaProfiler, Result, Value,
}; };
use ordered_map::OrderedMap; use ordered_map::OrderedMap;

1
boa/src/builtins/mod.rs

@ -15,7 +15,6 @@ pub mod math;
pub mod nan; pub mod nan;
pub mod number; pub mod number;
pub mod object; pub mod object;
pub mod property;
pub mod regexp; pub mod regexp;
pub mod string; pub mod string;
pub mod symbol; pub mod symbol;

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

@ -6,10 +6,8 @@
//! [spec]: https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots //! [spec]: https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots
use crate::{ use crate::{
builtins::{ builtins::object::Object,
object::Object,
property::{Attribute, Property, PropertyKey}, property::{Attribute, Property, PropertyKey},
},
value::{same_value, Value}, value::{same_value, Value},
BoaProfiler, BoaProfiler,
}; };

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

@ -17,10 +17,10 @@ use crate::{
builtins::{ builtins::{
function::{make_builtin_fn, make_constructor_fn, Function}, function::{make_builtin_fn, make_constructor_fn, Function},
map::ordered_map::OrderedMap, map::ordered_map::OrderedMap,
property::{Property, PropertyKey},
BigInt, Date, RegExp, BigInt, Date, RegExp,
}, },
exec::Interpreter, exec::Interpreter,
property::{Property, PropertyKey},
value::{same_value, RcBigInt, RcString, RcSymbol, Value}, value::{same_value, RcBigInt, RcString, RcSymbol, Value},
BoaProfiler, Result, 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 super::function::{make_builtin_fn, make_constructor_fn};
use crate::{ use crate::{
builtins::{object::ObjectData, property::Property}, builtins::object::ObjectData,
exec::Interpreter, exec::Interpreter,
property::Property,
value::{RcString, Value}, value::{RcString, Value},
BoaProfiler, Result, BoaProfiler, Result,
}; };

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

@ -16,10 +16,10 @@ use super::function::{make_builtin_fn, make_constructor_fn};
use crate::{ use crate::{
builtins::{ builtins::{
object::{Object, ObjectData}, object::{Object, ObjectData},
property::Property,
RegExp, RegExp,
}, },
exec::Interpreter, exec::Interpreter,
property::Property,
value::{RcString, Value}, value::{RcString, Value},
BoaProfiler, Result, 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 super::function::{make_builtin_fn, make_constructor_fn};
use crate::{ use crate::{
builtins::property::{Attribute, Property},
exec::Interpreter, exec::Interpreter,
property::{Attribute, Property},
value::{RcString, RcSymbol, Value}, value::{RcString, RcSymbol, Value},
BoaProfiler, Result, BoaProfiler, Result,
}; };

4
boa/src/class.rs

@ -3,7 +3,7 @@
//! Native classes are implemented through the [`Class`][class-trait] trait. //! Native classes are implemented through the [`Class`][class-trait] trait.
//! ``` //! ```
//!# use boa::{ //!# use boa::{
//!# builtins::property::Attribute, //!# property::Attribute,
//!# class::{Class, ClassBuilder}, //!# class::{Class, ClassBuilder},
//!# exec::Interpreter, //!# exec::Interpreter,
//!# forward_val, //!# forward_val,
@ -66,8 +66,8 @@ use crate::{
builtins::{ builtins::{
function::{BuiltInFunction, Function, FunctionFlags, NativeFunction}, function::{BuiltInFunction, Function, FunctionFlags, NativeFunction},
object::{GcObject, NativeObject, Object, ObjectData, PROTOTYPE}, object::{GcObject, NativeObject, Object, ObjectData, PROTOTYPE},
property::{Attribute, Property, PropertyKey},
}, },
property::{Attribute, Property, PropertyKey},
Interpreter, Result, Value, Interpreter, Result, Value,
}; };
use std::fmt::Debug; 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> //! More info: <https://tc39.es/ecma262/#sec-global-environment-records>
use crate::{ use crate::{
builtins::property::{Attribute, Property},
environment::{ environment::{
declarative_environment_record::DeclarativeEnvironmentRecord, declarative_environment_record::DeclarativeEnvironmentRecord,
environment_record_trait::EnvironmentRecordTrait, environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType}, lexical_environment::{Environment, EnvironmentType},
object_environment_record::ObjectEnvironmentRecord, object_environment_record::ObjectEnvironmentRecord,
}, },
property::{Attribute, Property},
Value, Value,
}; };
use gc::{Finalize, Trace}; 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) //! More info: [Object Records](https://tc39.es/ecma262/#sec-object-environment-records)
use crate::{ use crate::{
builtins::property::{Attribute, Property},
environment::{ environment::{
environment_record_trait::EnvironmentRecordTrait, environment_record_trait::EnvironmentRecordTrait,
lexical_environment::{Environment, EnvironmentType}, lexical_environment::{Environment, EnvironmentType},
}, },
property::{Attribute, Property},
Value, Value,
}; };
use gc::{Finalize, Trace}; use gc::{Finalize, Trace};

2
boa/src/exec/mod.rs

@ -27,10 +27,10 @@ use crate::{
builtins::{ builtins::{
function::{Function, FunctionFlags, NativeFunction}, function::{Function, FunctionFlags, NativeFunction},
object::{GcObject, Object, ObjectData, PROTOTYPE}, object::{GcObject, Object, ObjectData, PROTOTYPE},
property::{Property, PropertyKey},
Console, Symbol, Console, Symbol,
}, },
class::{Class, ClassBuilder}, class::{Class, ClassBuilder},
property::{Property, PropertyKey},
realm::Realm, realm::Realm,
syntax::ast::{ syntax::ast::{
constant::Const, constant::Const,

1
boa/src/lib.rs

@ -39,6 +39,7 @@ pub mod class;
pub mod environment; pub mod environment;
pub mod exec; pub mod exec;
pub mod profiler; pub mod profiler;
pub mod property;
pub mod realm; pub mod realm;
pub mod syntax; pub mod syntax;
pub mod value; 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::convert::TryFrom;
use std::fmt; use std::fmt;
pub mod attribute; mod attribute;
pub use attribute::Attribute; pub use attribute::Attribute;
/// This represents a Javascript Property AKA The Property Descriptor. /// This represents a Javascript Property AKA The Property Descriptor.

8
boa/src/value/mod.rs

@ -5,13 +5,15 @@
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;
use crate::builtins::{ use crate::exec::Interpreter;
use crate::{
builtins::{
number::{f64_to_int32, f64_to_uint32}, number::{f64_to_int32, f64_to_uint32},
object::{GcObject, Object, ObjectData, PROTOTYPE}, object::{GcObject, Object, ObjectData, PROTOTYPE},
property::{Attribute, Property, PropertyKey},
BigInt, Number, BigInt, Number,
},
property::{Attribute, Property, PropertyKey},
}; };
use crate::exec::Interpreter;
use crate::{BoaProfiler, Result}; use crate::{BoaProfiler, Result};
use gc::{Finalize, GcCellRef, GcCellRefMut, Trace}; use gc::{Finalize, GcCellRef, GcCellRefMut, Trace};
use serde_json::{map::Map, Number as JSONNumber, Value as JSONValue}; use serde_json::{map::Map, Number as JSONNumber, Value as JSONValue};

Loading…
Cancel
Save