Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate JsString into its own crate #3837

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ABOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Try out the most recent release with Boa's live demo
- [**`boa_profiler`**][profiler] - Boa's code profiler.
- [**`boa_icu_provider`**][icu] - Boa's ICU4X data provider.
- [**`boa_runtime`**][runtime] - Boa's WebAPI features.
- [**`boa_string`**][string] - Boa's ECMAScript string implementation.

[boa-conformance]: https://boajs.dev/conformance
[boa-web]: https://boajs.dev/
Expand All @@ -30,3 +31,4 @@ Try out the most recent release with Boa's live demo
[profiler]: https://docs.rs/boa_profiler/latest/boa_profiler/index.html
[icu]: https://docs.rs/boa_icu_provider/latest/boa_icu_provider/index.html
[runtime]: https://docs.rs/boa_runtime/latest/boa_runtime/index.html
[string]: https://docs.rs/boa_string/latest/boa_string/index.html
16 changes: 14 additions & 2 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ boa_macros = { version = "~0.18.0", path = "core/macros" }
boa_parser = { version = "~0.18.0", path = "core/parser" }
boa_profiler = { version = "~0.18.0", path = "core/profiler" }
boa_runtime = { version = "~0.18.0", path = "core/runtime" }
boa_string = { version = "~0.18.0", path = "core/string" }

# Shared deps
arbitrary = "1"
Expand Down
2 changes: 2 additions & 0 deletions cli/ABOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Try out the most recent release with Boa's live demo
- [**`boa_profiler`**][profiler] - Boa's code profiler.
- [**`boa_icu_provider`**][icu] - Boa's ICU4X data provider.
- [**`boa_runtime`**][runtime] - Boa's WebAPI features.
- [**`boa_string`**][string] - Boa's ECMAScript string implementation.

[boa-conformance]: https://boajs.dev/conformance
[boa-web]: https://boajs.dev/
Expand All @@ -30,3 +31,4 @@ Try out the most recent release with Boa's live demo
[profiler]: https://docs.rs/boa_profiler/latest/boa_profiler/index.html
[icu]: https://docs.rs/boa_icu_provider/latest/boa_icu_provider/index.html
[runtime]: https://docs.rs/boa_runtime/latest/boa_runtime/index.html
[string]: https://docs.rs/boa_string/latest/boa_string/index.html
2 changes: 2 additions & 0 deletions core/ast/ABOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Try out the most recent release with Boa's live demo
- [**`boa_profiler`**][profiler] - Boa's code profiler.
- [**`boa_icu_provider`**][icu] - Boa's ICU4X data provider.
- [**`boa_runtime`**][runtime] - Boa's WebAPI features.
- [**`boa_string`**][string] - Boa's ECMAScript string implementation.

[boa-conformance]: https://boajs.dev/conformance
[boa-web]: https://boajs.dev/
Expand All @@ -30,3 +31,4 @@ Try out the most recent release with Boa's live demo
[profiler]: https://docs.rs/boa_profiler/latest/boa_profiler/index.html
[icu]: https://docs.rs/boa_icu_provider/latest/boa_icu_provider/index.html
[runtime]: https://docs.rs/boa_runtime/latest/boa_runtime/index.html
[string]: https://docs.rs/boa_string/latest/boa_string/index.html
2 changes: 2 additions & 0 deletions core/engine/ABOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Try out the most recent release with Boa's live demo
- [**`boa_profiler`**][profiler] - Boa's code profiler.
- [**`boa_icu_provider`**][icu] - Boa's ICU4X data provider.
- [**`boa_runtime`**][runtime] - Boa's WebAPI features.
- [**`boa_string`**][string] - Boa's ECMAScript string implementation.

[boa-conformance]: https://boajs.dev/conformance
[boa-web]: https://boajs.dev/
Expand All @@ -30,3 +31,4 @@ Try out the most recent release with Boa's live demo
[profiler]: https://docs.rs/boa_profiler/latest/boa_profiler/index.html
[icu]: https://docs.rs/boa_icu_provider/latest/boa_icu_provider/index.html
[runtime]: https://docs.rs/boa_runtime/latest/boa_runtime/index.html
[string]: https://docs.rs/boa_string/latest/boa_string/index.html
5 changes: 2 additions & 3 deletions core/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ js = ["dep:web-time"]

[dependencies]
boa_interner.workspace = true
boa_gc = { workspace = true, features = ["thin-vec"] }
boa_gc = { workspace = true, features = ["thin-vec", "boa_string"] }
boa_profiler.workspace = true
boa_macros.workspace = true
boa_ast.workspace = true
boa_parser.workspace = true
boa_string.workspace = true
serde = { workspace = true, features = ["derive", "rc"] }
serde_json.workspace = true
rand = "0.8.5"
Expand All @@ -89,15 +90,13 @@ fast-float.workspace = true
once_cell = { workspace = true, features = ["std"] }
tap = "1.0.1"
sptr = "0.3.2"
static_assertions.workspace = true
thiserror = "1.0.59"
dashmap = "5.5.3"
num_enum = "0.7.2"
pollster.workspace = true
thin-vec.workspace = true
itertools = { version = "0.12.1", default-features = false }
icu_normalizer = { workspace = true, features = ["compiled_data"] }
paste = "1.0"
portable-atomic = "1.6.0"
bytemuck = { version = "1.15.0", features = ["derive"] }
arrayvec = "0.7.4"
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use crate::{
},
property::{Attribute, PropertyDescriptor, PropertyKey, PropertyNameKind},
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::{IntegerOrInfinity, JsValue},
Context, JsArgs, JsResult, JsString,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/array_buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject, Object},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
Context, JsArgs, JsData, JsResult, JsString, JsValue,
};
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/array_buffer/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
object::internal_methods::get_prototype_from_constructor,
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsData, JsNativeError, JsObject, JsResult, JsString, JsSymbol, JsValue,
};

Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/async_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
context::intrinsics::{Intrinsics, StandardConstructor, StandardConstructors},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
Context, JsResult, JsString, JsValue,
};
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/async_generator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{
object::{FunctionObjectBuilder, JsObject, CONSTRUCTOR},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::JsValue,
vm::{CompletionRecord, GeneratorResumeKind},
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/async_generator_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
object::{JsObject, PROTOTYPE},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::JsValue,
Context, JsResult, JsString,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/atomics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::sync::atomic::Ordering;

use crate::{
builtins::BuiltInObject, context::intrinsics::Intrinsics, js_string, object::JsObject,
property::Attribute, realm::Realm, string::common::StaticJsStrings, symbol::JsSymbol,
property::Attribute, realm::Realm, string::StaticJsStrings, symbol::JsSymbol,
sys::time::Duration, value::IntegerOrInfinity, Context, JsArgs, JsNativeError, JsResult,
JsString, JsValue,
};
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/bigint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
object::JsObject,
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::{IntegerOrInfinity, PreferredType},
Context, JsArgs, JsBigInt, JsResult, JsString, JsValue,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/boolean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{
js_string,
object::{internal_methods::get_prototype_from_constructor, JsObject},
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsResult, JsString, JsValue,
};
use boa_profiler::Profiler;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
},
property::{Attribute, PropertyDescriptor, PropertyKey},
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
JsObject, JsString, JsValue, NativeFunction,
};

Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/dataview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::JsValue,
Context, JsArgs, JsData, JsResult, JsString,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/date/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::{JsValue, PreferredType},
Context, JsArgs, JsData, JsError, JsResult, JsString,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::{Attribute, PropertyDescriptorBuilder},
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsResult, JsString, JsValue,
};
use boa_macros::js_str;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsResult, JsString, JsValue,
};
use boa_macros::js_str;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsData, JsResult, JsString, JsValue,
};
use boa_gc::{Finalize, Trace};
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsResult, JsString, JsValue,
};
use boa_macros::js_str;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsResult, JsString, JsValue,
};
use boa_macros::js_str;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsResult, JsString, JsValue,
};
use boa_macros::js_str;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsResult, JsString, JsValue, NativeFunction,
};
use boa_macros::js_str;
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/error/uri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsArgs, JsResult, JsString, JsValue,
};
use boa_macros::js_str;
Expand Down
4 changes: 2 additions & 2 deletions core/engine/src/builtins/escape/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//! [spec]: https://tc39.es/ecma262/#sec-additional-properties-of-the-global-object

use crate::{
context::intrinsics::Intrinsics, js_string, realm::Realm, string::common::StaticJsStrings,
Context, JsArgs, JsObject, JsResult, JsString, JsValue,
context::intrinsics::Intrinsics, js_string, realm::Realm, string::StaticJsStrings, Context,
JsArgs, JsObject, JsResult, JsString, JsValue,
};

use super::{BuiltInBuilder, BuiltInObject, IntrinsicObject};
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/eval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
js_string,
object::JsObject,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
vm::{CallFrame, CallFrameFlags, Opcode},
Context, JsArgs, JsResult, JsString, JsValue,
};
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::{
},
property::{Attribute, PropertyDescriptor, PropertyKey},
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::IntegerOrInfinity,
vm::{ActiveRunnable, CallFrame, CallFrameFlags, CodeBlock},
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/generator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
object::{JsObject, CONSTRUCTOR},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::JsValue,
vm::{CallFrame, CallFrameFlags, CompletionRecord, GeneratorResumeKind},
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/generator_function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
object::PROTOTYPE,
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
value::JsValue,
Context, JsResult, JsString,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/collator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{
},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
Context, JsArgs, JsData, JsNativeError, JsResult, JsString, JsValue,
};
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/date_time_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
js_string,
object::{internal_methods::get_prototype_from_constructor, JsObject},
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
Context, JsData, JsResult, JsString, JsValue,
};

Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/builtins/intl/list_format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
object::{internal_methods::get_prototype_from_constructor, JsObject},
property::Attribute,
realm::Realm,
string::common::StaticJsStrings,
string::StaticJsStrings,
symbol::JsSymbol,
Context, JsArgs, JsData, JsNativeError, JsResult, JsString, JsValue,
};
Expand Down
Loading
Loading