diff --git a/.github/codecov.yml b/.github/codecov.yml index 5e8fdb5a89899..de4391876ed4c 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -24,6 +24,5 @@ ignore: - "crates/oxc_type_synthesis" - "crates/oxc_query" # Not aiming for test coverage right now with @u9g - "crates/oxc_linter_plugin" - - "crates/oxc_formatter" # The formatter is not being actively worked on - "crates/oxc_transformer" # not ready - "crates/oxc_js_regex" # not ready diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 0380a79e407ea..6720afba0daab 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -12,7 +12,6 @@ on: - 'website/**' - 'crates/oxc/**' - 'crates/oxc_cli/**' - - 'crates/oxc_formatter/**' - 'crates/oxc_linter/**' - 'crates/oxc_query/**' - 'crates/oxc_type_synthesis/**' @@ -30,7 +29,6 @@ on: - 'website/**' - 'crates/oxc/**' - 'crates/oxc_cli/**' - - 'crates/oxc_formatter/**' - 'crates/oxc_linter/**' - 'crates/oxc_query/**' - 'crates/oxc_type_synthesis/**' @@ -55,6 +53,12 @@ jobs: - name: Set up Bun uses: oven-sh/setup-bun@v1 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + - run: cargo coverage - run: cargo run --release -p oxc_transform_conformance -- --exec - run: cargo run --release -p oxc_prettier_conformance diff --git a/Cargo.lock b/Cargo.lock index a15c7637e7e9f..d16cd774c00c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1530,7 +1530,6 @@ dependencies = [ "oxc_ast", "oxc_codegen", "oxc_diagnostics", - "oxc_formatter", "oxc_index", "oxc_minifier", "oxc_parser", @@ -1642,6 +1641,7 @@ dependencies = [ "oxc_semantic", "oxc_span", "oxc_tasks_common", + "phf", "pico-args", "project-root", "rayon", @@ -1665,17 +1665,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "oxc_formatter" -version = "0.4.0" -dependencies = [ - "oxc_allocator", - "oxc_ast", - "oxc_parser", - "oxc_span", - "oxc_syntax", -] - [[package]] name = "oxc_index" version = "0.4.0" @@ -1706,7 +1695,6 @@ dependencies = [ "oxc_allocator", "oxc_diagnostics", "oxc_linter", - "oxc_linter_plugin", "oxc_parser", "oxc_semantic", "oxc_span", @@ -1734,8 +1722,8 @@ dependencies = [ "once_cell", "oxc_allocator", "oxc_ast", + "oxc_codegen", "oxc_diagnostics", - "oxc_formatter", "oxc_index", "oxc_macros", "oxc_parser", @@ -3190,6 +3178,8 @@ dependencies = [ "once_cell", "rustls", "rustls-webpki", + "serde", + "serde_json", "url", "webpki-roots", ] diff --git a/Cargo.toml b/Cargo.toml index 4618c8fb590f9..e66bec822d4f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,6 @@ oxc_allocator = { version = "0.4.0", path = "crates/oxc_allocator" } oxc_ast = { version = "0.4.0", path = "crates/oxc_ast" } oxc_codegen = { version = "0.4.0", path = "crates/oxc_codegen" } oxc_diagnostics = { version = "0.4.0", path = "crates/oxc_diagnostics" } -oxc_formatter = { version = "0.4.0", path = "crates/oxc_formatter" } oxc_index = { version = "0.4.0", path = "crates/oxc_index" } oxc_minifier = { version = "0.4.0", path = "crates/oxc_minifier" } oxc_parser = { version = "0.4.0", path = "crates/oxc_parser" } @@ -122,7 +121,7 @@ thiserror = { version = "1.0.56" } tokio = { version = "1" } tower-lsp = { version = "0.20.0", features = ["proposed"] } unicode-id-start = { version = "1.1.2" } -ureq = { version = "2.9.1", default-features = false, features = ["tls"] } +ureq = { version = "2.9.1", default-features = false, features = ["tls", "json"] } url = { version = "2.5.0" } walkdir = { version = "2.4.0" } indexmap = { version = "2.1.0" } diff --git a/MAINTENANCE.md b/MAINTENANCE.md index 13585a3d31277..ca5ef65b1db11 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -34,7 +34,6 @@ sed -i '' 's/0.3.0/0.4.0/' crates/oxc_allocator/Cargo.toml sed -i '' 's/0.3.0/0.4.0/' crates/oxc_ast/Cargo.toml sed -i '' 's/0.3.0/0.4.0/' crates/oxc_codegen/Cargo.toml sed -i '' 's/0.3.0/0.4.0/' crates/oxc_diagnostics/Cargo.toml -sed -i '' 's/0.3.0/0.4.0/' crates/oxc_formatter/Cargo.toml sed -i '' 's/0.3.0/0.4.0/' crates/oxc_index/Cargo.toml sed -i '' 's/0.3.0/0.4.0/' crates/oxc_minifier/Cargo.toml sed -i '' 's/0.3.0/0.4.0/' crates/oxc_parser/Cargo.toml @@ -60,7 +59,6 @@ cargo publish -p oxc_ast cargo publish -p oxc_diagnostics cargo publish -p oxc_parser cargo publish -p oxc_semantic -cargo publish -p oxc_formatter cargo publish -p oxc_transformer cargo publish -p oxc_codegen cargo publish -p oxc_minifier diff --git a/crates/oxc/Cargo.toml b/crates/oxc/Cargo.toml index 4d76361dd6448..95c3f87ad744c 100644 --- a/crates/oxc/Cargo.toml +++ b/crates/oxc/Cargo.toml @@ -28,7 +28,6 @@ oxc_parser = { workspace = true } oxc_span = { workspace = true } oxc_syntax = { workspace = true } oxc_semantic = { workspace = true, optional = true } -oxc_formatter = { workspace = true, optional = true } oxc_transformer = { workspace = true, optional = true } oxc_minifier = { workspace = true, optional = true } oxc_codegen = { workspace = true, optional = true } @@ -36,7 +35,6 @@ oxc_codegen = { workspace = true, optional = true } [features] serde = ["oxc_ast/serde", "oxc_semantic/serde"] semantic = ["oxc_semantic"] -formatter = ["oxc_formatter"] transformer = ["oxc_transformer"] minifier = ["oxc_minifier"] codegen = ["oxc_codegen"] diff --git a/crates/oxc/src/lib.rs b/crates/oxc/src/lib.rs index 1288987c429dd..6cb4db384da0c 100644 --- a/crates/oxc/src/lib.rs +++ b/crates/oxc/src/lib.rs @@ -43,12 +43,6 @@ pub mod semantic { pub use oxc_semantic::*; } -#[cfg(feature = "formatter")] -pub mod formatter { - #[doc(inline)] - pub use oxc_formatter::*; -} - #[cfg(feature = "transformer")] pub mod transformer { #[doc(inline)] diff --git a/crates/oxc_cli/src/lint/mod.rs b/crates/oxc_cli/src/lint/mod.rs index be7c1cff507c8..fa85fe16e4927 100644 --- a/crates/oxc_cli/src/lint/mod.rs +++ b/crates/oxc_cli/src/lint/mod.rs @@ -320,7 +320,7 @@ mod test { let args = &["-c", "fixtures/eslintrc_off/eslintrc.json", "fixtures/eslintrc_off/test.js"]; let result = test(args); assert_eq!(result.number_of_files, 1); - assert_eq!(result.number_of_warnings, 0); + assert_eq!(result.number_of_warnings, 1); // triggered by no_empty_file assert_eq!(result.number_of_errors, 0); } diff --git a/crates/oxc_codegen/src/context.rs b/crates/oxc_codegen/src/context.rs index b8056011d15d0..211bd8c267c78 100644 --- a/crates/oxc_codegen/src/context.rs +++ b/crates/oxc_codegen/src/context.rs @@ -21,6 +21,7 @@ impl Context { } #[inline] + #[must_use] pub fn and_in(self, include: bool) -> Self { self.and(Self::In, include) } diff --git a/crates/oxc_codegen/src/gen.rs b/crates/oxc_codegen/src/gen.rs index ed37a28bb05c8..db7ca36e69374 100644 --- a/crates/oxc_codegen/src/gen.rs +++ b/crates/oxc_codegen/src/gen.rs @@ -129,7 +129,7 @@ impl<'a, const MINIFY: bool> Gen for ExpressionStatement<'a> { fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) { p.print_indent(); p.start_of_stmt = p.code_len(); - self.expression.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.expression); if self.expression.is_specific_id("let") { p.print_semicolon(); } else { @@ -153,7 +153,7 @@ fn print_if( p.print_str(b"if"); p.print_soft_space(); p.print(b'('); - if_stmt.test.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&if_stmt.test); p.print(b')'); p.print_soft_space(); @@ -251,14 +251,14 @@ impl<'a, const MINIFY: bool> Gen for ForStatement<'a> { p.print_soft_space(); if let Some(test) = self.test.as_ref() { - test.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(test); } p.print_semicolon(); p.print_soft_space(); if let Some(update) = self.update.as_ref() { - update.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(update); } p.print(b')'); @@ -277,7 +277,7 @@ impl<'a, const MINIFY: bool> Gen for ForInStatement<'a> { p.print_space_before_identifier(); p.print_str(b"in"); p.print_hard_space(); - self.right.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.right); p.print(b')'); p.print_soft_space(); self.body.gen(p, ctx); @@ -320,7 +320,7 @@ impl<'a, const MINIFY: bool> Gen for WhileStatement<'a> { p.print_indent(); p.print_str(b"while"); p.print(b'('); - self.test.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.test); p.print(b')'); self.body.gen(p, ctx); } @@ -342,7 +342,7 @@ impl<'a, const MINIFY: bool> Gen for DoWhileStatement<'a> { } p.print_str(b"while"); p.print(b'('); - self.test.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.test); p.print(b')'); p.print_semicolon_after_statement(); } @@ -384,7 +384,7 @@ impl<'a, const MINIFY: bool> Gen for SwitchStatement<'a> { p.print_indent(); p.print_str(b"switch"); p.print(b'('); - self.discriminant.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.discriminant); p.print(b')'); p.print_block_start(); for case in &self.cases { @@ -404,7 +404,7 @@ impl<'a, const MINIFY: bool> Gen for SwitchCase<'a> { Some(test) => { p.print_str(b"case"); p.print_hard_space(); - test.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(test); } None => p.print_str(b"default"), } @@ -425,7 +425,7 @@ impl<'a, const MINIFY: bool> Gen for ReturnStatement<'a> { p.print_str(b"return"); if let Some(arg) = &self.argument { p.print_hard_space(); - arg.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(arg); } p.print_semicolon_after_statement(); } @@ -465,7 +465,7 @@ impl<'a, const MINIFY: bool> Gen for ThrowStatement<'a> { fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) { p.print_indent(); p.print_str(b"throw "); - self.argument.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.argument); p.print_semicolon_after_statement(); } } @@ -475,7 +475,7 @@ impl<'a, const MINIFY: bool> Gen for WithStatement<'a> { p.print_indent(); p.print_str(b"with"); p.print(b'('); - self.object.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.object); p.print(b')'); self.body.gen(p, ctx); } @@ -1645,7 +1645,7 @@ impl<'a, const MINIFY: bool> Gen for TemplateLiteral<'a> { if let Some(expr) = expressions.next() { p.print_str(b"${"); - expr.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(expr); p.print(b'}'); } } @@ -1825,7 +1825,7 @@ impl Gen for JSXEmptyExpression { impl<'a, const MINIFY: bool> Gen for JSXExpression<'a> { fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) { match self { - Self::Expression(expr) => expr.gen_expr(p, Precedence::lowest(), Context::default()), + Self::Expression(expr) => p.print_expression(expr), Self::EmptyExpression(expr) => expr.gen(p, ctx), } } @@ -1853,7 +1853,7 @@ impl<'a, const MINIFY: bool> Gen for JSXAttributeValue<'a> { impl<'a, const MINIFY: bool> Gen for JSXSpreadAttribute<'a> { fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) { p.print_str(b"{..."); - self.argument.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.argument); p.print(b'}'); } } @@ -1924,7 +1924,7 @@ impl Gen for JSXText { impl<'a, const MINIFY: bool> Gen for JSXSpreadChild<'a> { fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) { p.print_str(b"..."); - self.expression.gen_expr(p, Precedence::lowest(), Context::default()); + p.print_expression(&self.expression); } } @@ -1933,9 +1933,7 @@ impl<'a, const MINIFY: bool> Gen for JSXChild<'a> { match self { Self::Fragment(fragment) => fragment.gen(p, ctx), Self::Element(el) => el.gen(p, ctx), - Self::Spread(spread) => { - spread.expression.gen_expr(p, Precedence::lowest(), Context::default()); - } + Self::Spread(spread) => p.print_expression(&spread.expression), Self::ExpressionContainer(expr_container) => expr_container.gen(p, ctx), Self::Text(text) => text.gen(p, ctx), } diff --git a/crates/oxc_codegen/src/lib.rs b/crates/oxc_codegen/src/lib.rs index 6d388cb84100b..6775c48cd7907 100644 --- a/crates/oxc_codegen/src/lib.rs +++ b/crates/oxc_codegen/src/lib.rs @@ -24,7 +24,7 @@ use oxc_syntax::{ symbol::SymbolId, }; -use self::{ +pub use crate::{ context::Context, gen::{Gen, GenExpr}, operator::Operator, @@ -111,12 +111,12 @@ impl Codegen { } /// Push a single character into the buffer - fn print(&mut self, ch: u8) { + pub fn print(&mut self, ch: u8) { self.code.push(ch); } /// Push a string into the buffer - fn print_str(&mut self, s: &[u8]) { + pub fn print_str(&mut self, s: &[u8]) { self.code.extend_from_slice(s); } @@ -126,7 +126,7 @@ impl Codegen { } } - fn print_hard_space(&mut self) { + pub fn print_hard_space(&mut self) { self.print(b' '); } @@ -197,7 +197,7 @@ impl Codegen { self.print_str(b"..."); } - fn print_colon(&mut self) { + pub fn print_colon(&mut self) { self.print(b':'); } @@ -256,6 +256,10 @@ impl Codegen { } } + pub fn print_expression(&mut self, expr: &Expression<'_>) { + expr.gen_expr(self, Precedence::lowest(), Context::default()); + } + fn print_expressions>( &mut self, items: &[T], diff --git a/crates/oxc_formatter/Cargo.toml b/crates/oxc_formatter/Cargo.toml deleted file mode 100644 index 85c3f5de44252..0000000000000 --- a/crates/oxc_formatter/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "oxc_formatter" -version = "0.4.0" -authors.workspace = true -description.workspace = true -edition.workspace = true -homepage.workspace = true -keywords.workspace = true -license.workspace = true -repository.workspace = true -rust-version.workspace = true -categories.workspace = true - -[lints] -workspace = true - -[lib] -doctest = false - -[dependencies] -oxc_allocator = { workspace = true } -oxc_ast = { workspace = true } -oxc_span = { workspace = true } -oxc_syntax = { workspace = true } - -[dev-dependencies] -oxc_parser = { workspace = true } diff --git a/crates/oxc_formatter/README.md b/crates/oxc_formatter/README.md deleted file mode 100644 index 4bf60694b1f1f..0000000000000 --- a/crates/oxc_formatter/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Formatter (Prettier) - -TBD diff --git a/crates/oxc_formatter/examples/formatter.rs b/crates/oxc_formatter/examples/formatter.rs deleted file mode 100644 index 091d15b0a0c2e..0000000000000 --- a/crates/oxc_formatter/examples/formatter.rs +++ /dev/null @@ -1,32 +0,0 @@ -use std::{env, path::Path}; - -use oxc_allocator::Allocator; -use oxc_formatter::{Formatter, FormatterOptions}; -use oxc_parser::Parser; -use oxc_span::SourceType; - -// Instruction: -// create a `test.js`, -// run `cargo run -p oxc_formatter --example formatter` -// or `cargo watch -x "run -p oxc_formatter --example formatter"` - -fn main() { - let name = env::args().nth(1).unwrap_or_else(|| "test.js".to_string()); - let path = Path::new(&name); - let source_text = std::fs::read_to_string(path).expect("{name} not found"); - let allocator = Allocator::default(); - let source_type = SourceType::from_path(path).unwrap(); - let ret = Parser::new(&allocator, &source_text, source_type).parse(); - - if !ret.errors.is_empty() { - for error in ret.errors { - let error = error.with_source_code(source_text.clone()); - println!("{error:?}"); - } - return; - } - - let formatter_options = FormatterOptions::default(); - let printed = Formatter::new(source_text.len(), formatter_options).build(&ret.program); - println!("{printed}"); -} diff --git a/crates/oxc_formatter/src/gen.rs b/crates/oxc_formatter/src/gen.rs deleted file mode 100644 index b3567284d11de..0000000000000 --- a/crates/oxc_formatter/src/gen.rs +++ /dev/null @@ -1,1852 +0,0 @@ -use oxc_allocator::{Box, Vec}; -#[allow(clippy::wildcard_imports)] -use oxc_ast::ast::*; -use oxc_syntax::operator::BinaryOperator; - -use crate::{Formatter, Separator}; - -pub trait Gen { - fn gen(&self, p: &mut Formatter); -} - -impl<'a, T> Gen for Box<'a, T> -where - T: Gen, -{ - fn gen(&self, p: &mut Formatter) { - (**self).gen(p); - } -} - -impl<'a> Gen for Program<'a> { - fn gen(&self, p: &mut Formatter) { - for directive in &self.directives { - directive.gen(p); - } - for stmt in &self.body { - p.print_semicolon_if_needed(); - stmt.gen(p); - } - } -} - -impl Gen for Directive { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print(b'"'); - p.print_str(self.directive.as_bytes()); - p.print(b'"'); - p.print_semicolon(); - p.print_newline(); - } -} - -impl<'a> Gen for Statement<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::BlockStatement(stmt) => stmt.gen(p), - Self::BreakStatement(stmt) => stmt.gen(p), - Self::ContinueStatement(stmt) => stmt.gen(p), - Self::DebuggerStatement(stmt) => stmt.gen(p), - Self::DoWhileStatement(stmt) => stmt.gen(p), - Self::EmptyStatement(stmt) => stmt.gen(p), - Self::ExpressionStatement(stmt) => stmt.gen(p), - Self::ForInStatement(stmt) => stmt.gen(p), - Self::ForOfStatement(stmt) => stmt.gen(p), - Self::ForStatement(stmt) => stmt.gen(p), - Self::IfStatement(stmt) => stmt.gen(p), - Self::LabeledStatement(stmt) => stmt.gen(p), - Self::ModuleDeclaration(decl) => decl.gen(p), - Self::ReturnStatement(stmt) => stmt.gen(p), - Self::SwitchStatement(stmt) => stmt.gen(p), - Self::ThrowStatement(stmt) => stmt.gen(p), - Self::TryStatement(stmt) => stmt.gen(p), - Self::WhileStatement(stmt) => stmt.gen(p), - Self::WithStatement(stmt) => stmt.gen(p), - Self::Declaration(decl) => decl.gen(p), - } - } -} - -impl<'a> Gen for ExpressionStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - self.expression.gen(p); - if self.expression.is_specific_id("let") { - p.print_semicolon(); - } else { - p.print_semicolon_after_statement(); - } - } -} - -impl Gen for EmptyStatement { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_semicolon(); - p.print_newline(); - } -} - -impl<'a> Gen for IfStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - print_if(self, p); - } -} - -fn print_if(if_stmt: &IfStatement<'_>, p: &mut Formatter) { - p.print_str(b"if"); - p.print_space(); - p.print(b'('); - if_stmt.test.gen(p); - p.print(b')'); - p.print_space(); - if let Statement::BlockStatement(block) = &if_stmt.consequent { - p.print_block1(block); - } else { - p.print(b'{'); - p.print_newline(); - p.indent(); - if_stmt.consequent.gen(p); - p.needs_semicolon = false; - p.dedent(); - p.print_indent(); - p.print(b'}'); - } - if if_stmt.alternate.is_some() { - p.print_space(); - } else { - p.print_newline(); - } - if let Some(alternate) = if_stmt.alternate.as_ref() { - p.print_semicolon_if_needed(); - p.print_space(); - p.print_str(b"else"); - p.print_space(); - match alternate { - Statement::BlockStatement(block) => { - p.print_block1(block); - p.print_newline(); - } - Statement::IfStatement(if_stmt) => { - print_if(if_stmt, p); - } - _ => { - p.print_newline(); - p.indent(); - alternate.gen(p); - p.dedent(); - } - } - } -} - -impl<'a> Gen for BlockStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_block1(self); - p.print_newline(); - } -} - -impl<'a> Gen for ForStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"for"); - p.print_space(); - p.print(b'('); - - if let Some(init) = self.init.as_ref() { - match init { - ForStatementInit::Expression(expr) => expr.gen(p), - ForStatementInit::VariableDeclaration(var) => var.gen(p), - ForStatementInit::UsingDeclaration(decl) => decl.gen(p), - } - } - - p.print_semicolon(); - p.print_space(); - - if let Some(test) = self.test.as_ref() { - test.gen(p); - } - - p.print_semicolon(); - p.print_space(); - - if let Some(update) = self.update.as_ref() { - update.gen(p); - } - - p.print(b')'); - p.print_body(&self.body); - } -} - -impl<'a> Gen for ForInStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"for"); - gen_for_statement_brack_content(&self.left, &self.right, &self.body, b"in", p); - } -} - -impl<'a> Gen for ForOfStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"for"); - if self.r#await { - p.print_str(b" await"); - } - gen_for_statement_brack_content(&self.left, &self.right, &self.body, b"of", p); - } -} - -fn gen_for_statement_brack_content<'a>( - left: &ForStatementLeft<'a>, - right: &Expression<'a>, - body: &Statement, - key: &[u8], - p: &mut Formatter, -) { - p.print_space(); - p.print(b'('); - left.gen(p); - p.print_space(); - p.print_str(key); - p.print_space(); - right.gen(p); - p.print(b')'); - p.print_body(body); -} - -impl<'a> Gen for ForStatementLeft<'a> { - fn gen(&self, p: &mut Formatter) { - match &self { - ForStatementLeft::VariableDeclaration(var) => var.gen(p), - ForStatementLeft::AssignmentTarget(target) => target.gen(p), - ForStatementLeft::UsingDeclaration(decl) => decl.gen(p), - } - } -} - -impl<'a> Gen for WhileStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"while"); - p.print_space(); - p.print(b'('); - self.test.gen(p); - p.print(b')'); - p.print_body(&self.body); - } -} - -impl<'a> Gen for DoWhileStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"do"); - p.print_space(); - if let Statement::BlockStatement(block) = &self.body { - p.print_space(); - p.print_block1(block); - p.print_space(); - } else { - p.print_newline(); - p.indent(); - self.body.gen(p); - p.print_semicolon_if_needed(); - p.dedent(); - p.print_indent(); - } - p.print_str(b"while"); - p.print_space(); - p.print(b'('); - self.test.gen(p); - p.print(b')'); - p.print_semicolon_after_statement(); - } -} - -impl Gen for ContinueStatement { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"continue"); - if let Some(label) = &self.label { - p.print_space(); - label.gen(p); - } - p.print_semicolon_after_statement(); - } -} - -impl Gen for BreakStatement { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"break"); - if let Some(label) = &self.label { - p.print_space(); - label.gen(p); - } - p.print_semicolon_after_statement(); - } -} - -impl<'a> Gen for SwitchStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"switch"); - p.print_space(); - p.print(b'('); - self.discriminant.gen(p); - p.print(b')'); - p.print_space(); - p.print(b'{'); - p.print_newline(); - p.indent(); - for case in &self.cases { - case.gen(p); - } - p.dedent(); - p.print_indent(); - p.print(b'}'); - p.print_newline(); - p.needs_semicolon = false; - } -} - -impl<'a> Gen for SwitchCase<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_semicolon_if_needed(); - p.print_indent(); - match &self.test { - Some(test) => { - p.print_str(b"case"); - p.print_space(); - test.gen(p); - } - None => p.print_str(b"default"), - } - p.print_colon(); - p.print_newline(); - p.indent(); - for item in &self.consequent { - p.print_semicolon_if_needed(); - item.gen(p); - } - p.dedent(); - } -} - -impl<'a> Gen for ReturnStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"return"); - if let Some(arg) = &self.argument { - p.print_space(); - arg.gen(p); - } - p.print_semicolon_after_statement(); - } -} - -impl<'a> Gen for LabeledStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - self.label.gen(p); - p.print_colon(); - p.print_newline(); - self.body.gen(p); - } -} - -impl<'a> Gen for TryStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"try"); - p.print_space(); - p.print_block1(&self.block); - if let Some(handler) = &self.handler { - p.print_space(); - p.print_str(b"catch"); - if let Some(param) = &handler.param { - p.print_space(); - p.print_str(b"("); - param.gen(p); - p.print_str(b")"); - } - p.print_space(); - p.print_block1(&handler.body); - } - if let Some(finalizer) = &self.finalizer { - p.print_space(); - p.print_str(b"finally"); - p.print_space(); - p.print_block1(finalizer); - } - p.print_newline(); - } -} - -impl<'a> Gen for ThrowStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"throw"); - p.print_space(); - self.argument.gen(p); - p.print_semicolon_after_statement(); - } -} - -impl<'a> Gen for WithStatement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"with"); - p.print_space(); - p.print(b'('); - self.object.gen(p); - p.print(b')'); - p.print_space(); - self.body.gen(p); - } -} - -impl Gen for DebuggerStatement { - fn gen(&self, p: &mut Formatter) { - p.print_indent(); - p.print_str(b"debugger"); - p.print_semicolon_after_statement(); - } -} - -impl<'a> Gen for ModuleDeclaration<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::ImportDeclaration(decl) => decl.gen(p), - Self::ExportAllDeclaration(decl) => decl.gen(p), - Self::ExportDefaultDeclaration(decl) => decl.gen(p), - Self::ExportNamedDeclaration(decl) => decl.gen(p), - Self::TSExportAssignment(_) | Self::TSNamespaceExportDeclaration(_) => {} - } - } -} - -impl<'a> Gen for Declaration<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::VariableDeclaration(stmt) => { - p.print_indent(); - stmt.gen(p); - p.print_semicolon_after_statement(); - } - Self::FunctionDeclaration(stmt) => { - p.print_indent(); - stmt.gen(p); - p.print_newline(); - } - Self::ClassDeclaration(declaration) => { - declaration.gen(p); - p.print_newline(); - } - Self::UsingDeclaration(declaration) => { - declaration.gen(p); - p.print_newline(); - } - Self::TSTypeAliasDeclaration(_) - | Self::TSInterfaceDeclaration(_) - | Self::TSEnumDeclaration(_) - | Self::TSModuleDeclaration(_) - | Self::TSImportEqualsDeclaration(_) => {} - } - } -} - -impl<'a> Gen for VariableDeclaration<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(match self.kind { - VariableDeclarationKind::Const => b"const", - VariableDeclarationKind::Let => b"let", - VariableDeclarationKind::Var => b"var", - }); - p.print_space(); - p.print_list(&self.declarations); - } -} -impl<'a> Gen for UsingDeclaration<'a> { - fn gen(&self, p: &mut Formatter) { - if self.is_await { - p.print_str(b"await"); - p.print_space(); - } - p.print_str(b"using"); - p.print_space(); - p.print_list(&self.declarations); - p.print_semicolon(); - } -} - -impl<'a> Gen for VariableDeclarator<'a> { - fn gen(&self, p: &mut Formatter) { - self.id.gen(p); - if let Some(init) = &self.init { - p.print_space(); - p.print_equal(); - p.print_space(); - init.gen(p); - } - } -} - -impl<'a> Gen for Function<'a> { - fn gen(&self, p: &mut Formatter) { - if self.r#async { - p.print_str(b"async"); - p.print_space(); - } - p.print_str(b"function"); - if self.generator { - p.print(b'*'); - } - if let Some(id) = &self.id { - if !self.generator { - p.print_space(); - } - id.gen(p); - p.print_space(); - } - p.print(b'('); - self.params.gen(p); - p.print(b')'); - p.print_space(); - if let Some(body) = &self.body { - body.gen(p); - } - } -} - -impl<'a> Gen for FunctionBody<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'{'); - p.indent(); - p.print_newline(); - for directive in &self.directives { - directive.gen(p); - } - p.needs_semicolon = false; - for stmt in &self.statements { - p.print_semicolon_if_needed(); - stmt.gen(p); - } - p.dedent(); - p.print_indent(); - p.print(b'}'); - p.needs_semicolon = false; - } -} - -impl<'a> Gen for FormalParameter<'a> { - fn gen(&self, p: &mut Formatter) { - self.pattern.gen(p); - } -} - -impl<'a> Gen for FormalParameters<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_list(&self.items); - if let Some(rest) = &self.rest { - if !self.items.is_empty() { - p.print_comma(); - } - rest.gen(p); - } - } -} - -impl<'a> Gen for ImportDeclaration<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"import "); - if let Some(specifiers) = &self.specifiers { - if specifiers.is_empty() { - p.print(b'\''); - p.print_str(self.source.value.as_bytes()); - p.print(b'\''); - self.with_clause.gen(p); - p.print_semicolon_after_statement(); - return; - } - - let mut in_block = false; - for (index, specifier) in specifiers.iter().enumerate() { - match specifier { - ImportDeclarationSpecifier::ImportDefaultSpecifier(spec) => { - if in_block { - p.print_space(); - p.print_str(b"},"); - p.print_space(); - in_block = false; - } else if index != 0 { - p.print_comma(); - p.print_space(); - } - spec.local.gen(p); - } - ImportDeclarationSpecifier::ImportNamespaceSpecifier(spec) => { - if in_block { - p.print_space(); - p.print_str(b"},"); - p.print_space(); - in_block = false; - } else if index != 0 { - p.print_comma(); - p.print_space(); - } - p.print_str(b"* as "); - spec.local.gen(p); - } - ImportDeclarationSpecifier::ImportSpecifier(spec) => { - if in_block { - p.print_comma(); - } else { - if index != 0 { - p.print_comma(); - p.print_space(); - } - in_block = true; - p.print(b'{'); - } - p.print_space(); - - let imported_name = match &spec.imported { - ModuleExportName::Identifier(identifier) => { - identifier.gen(p); - identifier.name.as_bytes() - } - ModuleExportName::StringLiteral(literal) => { - literal.gen(p); - literal.value.as_bytes() - } - }; - - let local_name = spec.local.name.as_bytes(); - - if imported_name != local_name { - p.print_str(b" as "); - spec.local.gen(p); - } - } - } - } - if in_block { - p.print_space(); - p.print(b'}'); - } - p.print_str(b" from "); - } - self.source.gen(p); - self.with_clause.gen(p); - p.print_semicolon_after_statement(); - } -} - -impl<'a> Gen for Option> { - fn gen(&self, p: &mut Formatter) { - if let Some(with_clause) = self { - p.print_space(); - with_clause.attributes_keyword.gen(p); - p.print_space(); - with_clause.with_entries.gen(p); - } - } -} - -impl<'a> Gen for Vec<'a, ImportAttribute> { - fn gen(&self, p: &mut Formatter) { - p.print_block(self, Separator::Comma); - } -} - -impl Gen for ImportAttribute { - fn gen(&self, p: &mut Formatter) { - match &self.key { - ImportAttributeKey::Identifier(identifier) => { - p.print_str(identifier.name.as_bytes()); - } - ImportAttributeKey::StringLiteral(literal) => literal.gen(p), - }; - p.print_colon(); - p.print_space(); - self.value.gen(p); - } -} - -impl<'a> Gen for ExportNamedDeclaration<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"export "); - match &self.declaration { - Some(decl) => decl.gen(p), - None => { - p.print(b'{'); - if !self.specifiers.is_empty() { - p.print_space(); - p.print_list(&self.specifiers); - p.print_space(); - } - p.print(b'}'); - if let Some(source) = &self.source { - p.print_space(); - p.print_str(b"from"); - p.print_space(); - source.gen(p); - } - p.print_semicolon_after_statement(); - } - } - } -} - -impl Gen for ExportSpecifier { - fn gen(&self, p: &mut Formatter) { - self.local.gen(p); - if self.local.name() != self.exported.name() { - p.print_str(b" as "); - self.exported.gen(p); - } - } -} - -impl Gen for ModuleExportName { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Identifier(identifier) => { - p.print_str(identifier.name.as_bytes()); - } - Self::StringLiteral(literal) => literal.gen(p), - }; - } -} - -impl<'a> Gen for ExportAllDeclaration<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"export"); - p.print_space(); - p.print(b'*'); - - if let Some(exported) = &self.exported { - p.print_space(); - p.print_str(b"as "); - exported.gen(p); - } - - p.print_str(b" from"); - p.print_space(); - self.source.gen(p); - self.with_clause.gen(p); - - p.print_semicolon_after_statement(); - } -} - -impl<'a> Gen for ExportDefaultDeclaration<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"export default "); - self.declaration.gen(p); - } -} -impl<'a> Gen for ExportDefaultDeclarationKind<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Expression(expr) => { - expr.gen(p); - p.print_semicolon_after_statement(); - } - Self::FunctionDeclaration(fun) => fun.gen(p), - Self::ClassDeclaration(value) => value.gen(p), - Self::TSInterfaceDeclaration(_) | Self::TSEnumDeclaration(_) => {} - } - } -} - -impl<'a> Gen for Expression<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::BooleanLiteral(lit) => lit.gen(p), - Self::NullLiteral(lit) => lit.gen(p), - Self::NumberLiteral(lit) => lit.gen(p), - Self::BigintLiteral(lit) => lit.gen(p), - Self::RegExpLiteral(lit) => lit.gen(p), - Self::StringLiteral(lit) => lit.gen(p), - Self::Identifier(ident) => ident.gen(p), - Self::ThisExpression(expr) => expr.gen(p), - Self::MemberExpression(expr) => expr.gen(p), - Self::CallExpression(expr) => expr.gen(p), - Self::ArrayExpression(expr) => expr.gen(p), - Self::ObjectExpression(expr) => expr.gen(p), - Self::FunctionExpression(expr) => expr.gen(p), - Self::ArrowExpression(expr) => expr.gen(p), - Self::YieldExpression(expr) => expr.gen(p), - Self::UpdateExpression(expr) => expr.gen(p), - Self::UnaryExpression(expr) => expr.gen(p), - Self::BinaryExpression(expr) => expr.gen(p), - Self::PrivateInExpression(expr) => expr.gen(p), - Self::LogicalExpression(expr) => expr.gen(p), - Self::ConditionalExpression(expr) => expr.gen(p), - Self::AssignmentExpression(expr) => expr.gen(p), - Self::SequenceExpression(expr) => expr.gen(p), - Self::ParenthesizedExpression(expr) => expr.gen(p), - Self::ImportExpression(expr) => expr.gen(p), - Self::TemplateLiteral(literal) => literal.gen(p), - Self::TaggedTemplateExpression(expr) => expr.gen(p), - Self::Super(sup) => sup.gen(p), - Self::AwaitExpression(expr) => expr.gen(p), - Self::ChainExpression(expr) => expr.gen(p), - Self::NewExpression(expr) => expr.gen(p), - Self::MetaProperty(expr) => expr.gen(p), - Self::ClassExpression(expr) => expr.gen(p), - Self::JSXElement(el) => el.gen(p), - Self::JSXFragment(fragment) => fragment.gen(p), - Self::TSAsExpression(expr) => expr.expression.gen(p), - Self::TSSatisfiesExpression(expr) => expr.expression.gen(p), - Self::TSTypeAssertion(expr) => expr.expression.gen(p), - Self::TSNonNullExpression(expr) => expr.expression.gen(p), - Self::TSInstantiationExpression(expr) => expr.expression.gen(p), - } - } -} - -impl Gen for IdentifierReference { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.name.as_bytes()); - } -} - -impl Gen for IdentifierName { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.name.as_bytes()); - } -} - -impl Gen for BindingIdentifier { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.name.as_bytes()); - } -} - -impl Gen for LabelIdentifier { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.name.as_bytes()); - } -} - -impl Gen for BooleanLiteral { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.as_str().as_bytes()); - } -} - -impl Gen for NullLiteral { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"null"); - } -} - -impl<'a> Gen for NumberLiteral<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.raw.as_bytes()); - } -} - -impl Gen for BigintLiteral { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.value.to_string().as_bytes()); - p.print(b'n'); - } -} - -impl Gen for RegExpLiteral { - fn gen(&self, p: &mut Formatter) { - p.print(b'/'); - p.print_str(self.regex.pattern.as_bytes()); - p.print(b'/'); - p.print_str(self.regex.flags.to_string().as_bytes()); - } -} - -impl Gen for StringLiteral { - fn gen(&self, p: &mut Formatter) { - p.print_quote(); - for c in self.value.chars() { - p.print_str(c.escape_default().to_string().as_bytes()); - } - p.print_quote(); - } -} - -impl Gen for ThisExpression { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"this"); - } -} - -impl<'a> Gen for MemberExpression<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::ComputedMemberExpression(expr) => expr.gen(p), - Self::StaticMemberExpression(expr) => expr.gen(p), - Self::PrivateFieldExpression(expr) => expr.gen(p), - } - } -} - -impl<'a> Gen for ComputedMemberExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.object.gen(p); - if self.optional { - p.print_str(b"?."); - } - p.print(b'['); - self.expression.gen(p); - p.print(b']'); - } -} - -impl<'a> Gen for StaticMemberExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.object.gen(p); - if self.optional { - p.print(b'?'); - } - p.print(b'.'); - self.property.gen(p); - } -} - -impl<'a> Gen for PrivateFieldExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.object.gen(p); - if self.optional { - p.print_str(b"?"); - } - p.print(b'.'); - self.field.gen(p); - } -} - -impl<'a> Gen for CallExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.callee.gen(p); - - if self.optional { - p.print_str(b"?."); - } - p.print(b'('); - p.print_list(&self.arguments); - p.print(b')'); - } -} - -impl<'a> Gen for Argument<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::SpreadElement(elem) => elem.gen(p), - Self::Expression(elem) => elem.gen(p), - } - } -} - -impl<'a> Gen for ArrayExpressionElement<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Expression(expr) => expr.gen(p), - Self::SpreadElement(elem) => elem.gen(p), - Self::Elision(_span) => {} - } - } -} - -impl<'a> Gen for SpreadElement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_ellipsis(); - self.argument.gen(p); - } -} - -impl<'a> Gen for ArrayExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'['); - p.print_list(&self.elements); - if self.trailing_comma.is_some() { - p.print_comma(); - } - p.print(b']'); - } -} - -impl<'a> Gen for ObjectExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'{'); - p.indent(); - for (i, item) in self.properties.iter().enumerate() { - if i != 0 { - p.print_comma(); - } - p.print_newline(); - p.print_indent(); - item.gen(p); - } - p.print_newline(); - p.dedent(); - p.print_indent(); - p.print(b'}'); - } -} - -impl<'a> Gen for ObjectPropertyKind<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::ObjectProperty(prop) => prop.gen(p), - Self::SpreadProperty(elem) => elem.gen(p), - } - } -} - -impl<'a> Gen for ObjectProperty<'a> { - fn gen(&self, p: &mut Formatter) { - if let Expression::FunctionExpression(func) = &self.value { - let is_accessor = match &self.kind { - PropertyKind::Init => false, - PropertyKind::Get => { - p.print_str(b"get "); - true - } - PropertyKind::Set => { - p.print_str(b"set "); - true - } - }; - if self.method || is_accessor { - if func.r#async { - p.print_str(b"async "); - } - if func.generator { - p.print_str(b"*"); - } - if self.computed { - p.print(b'['); - } - self.key.gen(p); - if self.computed { - p.print(b']'); - } - p.print(b'('); - func.params.gen(p); - p.print(b')'); - p.print_space(); - if let Some(body) = &func.body { - body.gen(p); - } - return; - } - } - if self.computed { - p.print(b'['); - } - self.key.gen(p); - if self.computed { - p.print(b']'); - } - p.print_colon(); - p.print_space(); - self.value.gen(p); - } -} - -impl<'a> Gen for PropertyKey<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Identifier(ident) => { - if p.quote_property_with_double_quotes { - p.print(b'\"'); - } - ident.gen(p); - if p.quote_property_with_double_quotes { - p.print(b'\"'); - } - } - Self::PrivateIdentifier(ident) => ident.gen(p), - Self::Expression(expr) => expr.gen(p), - } - } -} - -impl<'a> Gen for ArrowExpression<'a> { - fn gen(&self, p: &mut Formatter) { - if self.r#async { - p.print_str(b"async"); - p.print_space(); - } - p.print(b'('); - self.params.gen(p); - p.print(b')'); - p.print_space(); - p.print_str(b"=>"); - p.print_space(); - if self.expression { - if let Statement::ExpressionStatement(stmt) = &self.body.statements[0] { - stmt.expression.gen(p); - } - } else { - self.body.gen(p); - } - } -} - -impl<'a> Gen for YieldExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"yield"); - if self.delegate { - p.print_space(); - p.print(b'*'); - } - - if let Some(argument) = self.argument.as_ref() { - p.print_space(); - argument.gen(p); - } - } -} - -impl<'a> Gen for UpdateExpression<'a> { - fn gen(&self, p: &mut Formatter) { - let operator = self.operator.as_str().as_bytes(); - if self.prefix { - p.print_space(); - p.print_str(operator); - self.argument.gen(p); - } else { - self.argument.gen(p); - p.print_str(operator); - } - } -} - -impl<'a> Gen for UnaryExpression<'a> { - fn gen(&self, p: &mut Formatter) { - let operator = self.operator.as_str().as_bytes(); - if self.operator.is_keyword() { - p.print_str(operator); - p.print_space(); - } else { - p.print_space(); - p.print_str(operator); - } - self.argument.gen(p); - } -} - -impl<'a> Gen for BinaryExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.left.gen(p); - self.operator.gen(p); - self.right.gen(p); - } -} - -impl Gen for BinaryOperator { - fn gen(&self, p: &mut Formatter) { - let operator = self.as_str().as_bytes(); - p.print_space(); - p.print_str(operator); - p.print_space(); - } -} - -impl<'a> Gen for PrivateInExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.left.gen(p); - p.print_space(); - p.print_str(self.operator.as_str().as_bytes()); - p.print_space(); - self.right.gen(p); - } -} - -impl<'a> Gen for LogicalExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.left.gen(p); - p.print_space(); - p.print_str(self.operator.as_str().as_bytes()); - p.print_space(); - self.right.gen(p); - } -} - -impl<'a> Gen for ConditionalExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.test.gen(p); - p.print_space(); - p.print(b'?'); - p.print_space(); - self.consequent.gen(p); - p.print_space(); - p.print(b':'); - p.print_space(); - self.alternate.gen(p); - } -} - -impl<'a> Gen for AssignmentExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.left.gen(p); - p.print_space(); - p.print_str(self.operator.as_str().as_bytes()); - p.print_space(); - self.right.gen(p); - } -} - -impl<'a> Gen for AssignmentTarget<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::SimpleAssignmentTarget(target) => target.gen(p), - Self::AssignmentTargetPattern(pat) => pat.gen(p), - } - } -} - -impl<'a> Gen for SimpleAssignmentTarget<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::AssignmentTargetIdentifier(ident) => ident.gen(p), - Self::MemberAssignmentTarget(member_expr) => member_expr.gen(p), - Self::TSAsExpression(expr) => expr.expression.gen(p), - Self::TSSatisfiesExpression(expr) => expr.expression.gen(p), - Self::TSNonNullExpression(expr) => expr.expression.gen(p), - Self::TSTypeAssertion(expr) => expr.expression.gen(p), - } - } -} - -impl<'a> Gen for AssignmentTargetPattern<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::ArrayAssignmentTarget(target) => target.gen(p), - Self::ObjectAssignmentTarget(target) => target.gen(p), - } - } -} - -impl<'a> Gen for ArrayAssignmentTarget<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'['); - p.print_list(&self.elements); - if let Some(target) = &self.rest { - p.print_comma(); - p.print_ellipsis(); - target.gen(p); - } - if self.trailing_comma.is_some() { - p.print_comma(); - } - p.print(b']'); - } -} - -impl<'a> Gen for Option> { - fn gen(&self, p: &mut Formatter) { - if let Some(arg) = self { - arg.gen(p); - } - } -} - -impl<'a> Gen for ObjectAssignmentTarget<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'{'); - p.print_list(&self.properties); - if let Some(target) = &self.rest { - if !self.properties.is_empty() { - p.print_comma(); - } - p.print_ellipsis(); - target.gen(p); - } - p.print(b'}'); - } -} - -impl<'a> Gen for AssignmentTargetMaybeDefault<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::AssignmentTarget(target) => target.gen(p), - Self::AssignmentTargetWithDefault(target) => target.gen(p), - } - } -} - -impl<'a> Gen for AssignmentTargetWithDefault<'a> { - fn gen(&self, p: &mut Formatter) { - self.binding.gen(p); - p.print_equal(); - self.init.gen(p); - } -} - -impl<'a> Gen for AssignmentTargetProperty<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::AssignmentTargetPropertyIdentifier(ident) => ident.gen(p), - Self::AssignmentTargetPropertyProperty(prop) => prop.gen(p), - } - } -} - -impl<'a> Gen for AssignmentTargetPropertyIdentifier<'a> { - fn gen(&self, p: &mut Formatter) { - self.binding.gen(p); - if let Some(expr) = &self.init { - p.print_space(); - p.print_equal(); - p.print_space(); - expr.gen(p); - } - } -} - -impl<'a> Gen for AssignmentTargetPropertyProperty<'a> { - fn gen(&self, p: &mut Formatter) { - match &self.name { - PropertyKey::Identifier(ident) => { - ident.gen(p); - } - PropertyKey::PrivateIdentifier(ident) => { - ident.gen(p); - } - PropertyKey::Expression(expr) => { - p.print(b'['); - expr.gen(p); - p.print(b']'); - } - } - p.print_colon(); - p.print_space(); - self.binding.gen(p); - } -} - -impl<'a> Gen for SequenceExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_list(&self.expressions); - } -} - -impl<'a> Gen for ParenthesizedExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'('); - self.expression.gen(p); - p.print(b')'); - } -} - -impl<'a> Gen for ImportExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"import("); - self.source.gen(p); - if !self.arguments.is_empty() { - p.print_comma(); - p.print_space(); - p.print_list(&self.arguments); - } - p.print(b')'); - } -} - -impl<'a> Gen for TemplateLiteral<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'`'); - let mut expressions = self.expressions.iter(); - - for quasi in &self.quasis { - p.print_str(quasi.value.raw.as_bytes()); - - if let Some(expr) = expressions.next() { - p.print_str(b"${"); - expr.gen(p); - p.print(b'}'); - } - } - - p.print(b'`'); - } -} - -impl<'a> Gen for TaggedTemplateExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.tag.gen(p); - self.quasi.gen(p); - } -} - -impl Gen for Super { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"super"); - } -} - -impl<'a> Gen for AwaitExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"await "); - self.argument.gen(p); - } -} - -impl<'a> Gen for ChainExpression<'a> { - fn gen(&self, p: &mut Formatter) { - match &self.expression { - ChainElement::CallExpression(expr) => expr.gen(p), - ChainElement::MemberExpression(expr) => expr.gen(p), - } - } -} - -impl<'a> Gen for NewExpression<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"new "); - self.callee.gen(p); - p.print(b'('); - p.print_list(&self.arguments); - p.print(b')'); - } -} - -impl Gen for MetaProperty { - fn gen(&self, p: &mut Formatter) { - self.meta.gen(p); - p.print(b'.'); - self.property.gen(p); - } -} - -impl<'a> Gen for Class<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"class"); - if let Some(id) = &self.id { - p.print_space(); - id.gen(p); - } - if let Some(super_class) = self.super_class.as_ref() { - p.print_str(b" extends "); - super_class.gen(p); - } - p.print_space(); - p.print(b'{'); - p.print_newline(); - p.indent(); - for item in &self.body.body { - p.print_semicolon_if_needed(); - p.print_indent(); - item.gen(p); - if matches!( - item, - ClassElement::PropertyDefinition(_) | ClassElement::AccessorProperty(_) - ) { - p.print_semicolon_after_statement(); - } else { - p.print_newline(); - } - } - p.needs_semicolon = false; - p.dedent(); - p.print_indent(); - p.print(b'}'); - } -} - -impl<'a> Gen for ClassElement<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::StaticBlock(elem) => elem.gen(p), - Self::MethodDefinition(elem) => elem.gen(p), - Self::PropertyDefinition(elem) => elem.gen(p), - Self::AccessorProperty(elem) => elem.gen(p), - Self::TSAbstractMethodDefinition(_) - | Self::TSAbstractPropertyDefinition(_) - | Self::TSIndexSignature(_) => {} - } - } -} - -impl Gen for JSXIdentifier { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.name.as_bytes()); - } -} - -impl<'a> Gen for JSXMemberExpressionObject<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Identifier(ident) => ident.gen(p), - Self::MemberExpression(member_expr) => member_expr.gen(p), - } - } -} - -impl<'a> Gen for JSXMemberExpression<'a> { - fn gen(&self, p: &mut Formatter) { - self.object.gen(p); - p.print(b'.'); - self.property.gen(p); - } -} - -impl<'a> Gen for JSXElementName<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Identifier(identifier) => identifier.gen(p), - Self::NamespacedName(namespaced_name) => namespaced_name.gen(p), - Self::MemberExpression(member_expr) => member_expr.gen(p), - } - } -} - -impl Gen for JSXNamespacedName { - fn gen(&self, p: &mut Formatter) { - self.namespace.gen(p); - p.print(b'.'); - self.property.gen(p); - } -} - -impl<'a> Gen for JSXAttributeName<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Identifier(ident) => ident.gen(p), - Self::NamespacedName(namespaced_name) => namespaced_name.gen(p), - } - } -} - -impl<'a> Gen for JSXAttribute<'a> { - fn gen(&self, p: &mut Formatter) { - self.name.gen(p); - p.print(b'='); - if let Some(value) = &self.value { - value.gen(p); - } - } -} - -impl Gen for JSXEmptyExpression { - fn gen(&self, _: &mut Formatter) {} -} - -impl<'a> Gen for JSXExpression<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Expression(expr) => expr.gen(p), - Self::EmptyExpression(expr) => expr.gen(p), - } - } -} - -impl<'a> Gen for JSXExpressionContainer<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'{'); - self.expression.gen(p); - p.print(b'}'); - } -} - -impl<'a> Gen for JSXAttributeValue<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Fragment(fragment) => fragment.gen(p), - Self::Element(el) => el.gen(p), - Self::StringLiteral(lit) => lit.gen(p), - Self::ExpressionContainer(expr_container) => expr_container.gen(p), - } - } -} - -impl<'a> Gen for JSXSpreadAttribute<'a> { - fn gen(&self, p: &mut Formatter) { - self.argument.gen(p); - } -} - -impl<'a> Gen for JSXAttributeItem<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Attribute(attr) => attr.gen(p), - Self::SpreadAttribute(spread_attr) => spread_attr.gen(p), - } - } -} - -impl<'a> Gen for JSXOpeningElement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"<"); - self.name.gen(p); - for attr in &self.attributes { - attr.gen(p); - } - if self.self_closing { - p.print_space(); - p.print_str(b"/>"); - } else { - p.print(b'>'); - } - } -} - -impl<'a> Gen for JSXClosingElement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"'); - } -} - -impl<'a> Gen for JSXElement<'a> { - fn gen(&self, p: &mut Formatter) { - self.opening_element.gen(p); - for child in &self.children { - child.gen(p); - } - if let Some(closing_element) = &self.closing_element { - closing_element.gen(p); - } - } -} - -impl Gen for JSXOpeningFragment { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"<>"); - } -} - -impl Gen for JSXClosingFragment { - fn gen(&self, p: &mut Formatter) { - p.print_str(b""); - } -} - -impl Gen for JSXText { - fn gen(&self, p: &mut Formatter) { - p.print_str(self.value.as_bytes()); - } -} - -impl<'a> Gen for JSXSpreadChild<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"..."); - self.expression.gen(p); - } -} - -impl<'a> Gen for JSXChild<'a> { - fn gen(&self, p: &mut Formatter) { - match self { - Self::Fragment(fragment) => fragment.gen(p), - Self::Element(el) => el.gen(p), - Self::Spread(spread) => spread.expression.gen(p), - Self::ExpressionContainer(expr_container) => expr_container.gen(p), - Self::Text(text) => text.gen(p), - } - } -} - -impl<'a> Gen for JSXFragment<'a> { - fn gen(&self, p: &mut Formatter) { - self.opening_fragment.gen(p); - for child in &self.children { - child.gen(p); - } - self.closing_fragment.gen(p); - } -} - -impl<'a> Gen for StaticBlock<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_str(b"static"); - p.print_space(); - p.print(b'{'); - p.print_newline(); - p.indent(); - for stmt in &self.body { - p.print_semicolon_if_needed(); - stmt.gen(p); - } - p.dedent(); - p.needs_semicolon = false; - p.print_indent(); - p.print(b'}'); - } -} - -impl<'a> Gen for MethodDefinition<'a> { - fn gen(&self, p: &mut Formatter) { - if self.r#static { - p.print_str(b"static "); - } - - match &self.kind { - MethodDefinitionKind::Constructor | MethodDefinitionKind::Method => {} - MethodDefinitionKind::Get => p.print_str(b"get "), - MethodDefinitionKind::Set => p.print_str(b"set "), - } - - if self.value.r#async { - p.print_str(b"async "); - } - - if self.value.generator { - p.print_str(b"*"); - } - - if self.computed { - p.print(b'['); - } - self.key.gen(p); - if self.computed { - p.print(b']'); - } - p.print(b'('); - self.value.params.gen(p); - p.print(b')'); - p.print_space(); - if let Some(body) = &self.value.body { - body.gen(p); - } - } -} - -impl<'a> Gen for PropertyDefinition<'a> { - fn gen(&self, p: &mut Formatter) { - if self.r#static { - p.print_str(b"static "); - } - if self.computed { - p.print(b'['); - } - self.key.gen(p); - if self.computed { - p.print(b']'); - } - if let Some(value) = &self.value { - p.print_space(); - p.print_equal(); - p.print_space(); - value.gen(p); - } - } -} - -impl<'a> Gen for AccessorProperty<'a> { - fn gen(&self, p: &mut Formatter) { - if self.r#static { - p.print_str(b"static "); - } - p.print_str(b"accessor "); - if self.computed { - p.print(b'['); - } - self.key.gen(p); - if self.computed { - p.print(b']'); - } - if let Some(value) = &self.value { - p.print_space(); - p.print_equal(); - p.print_space(); - value.gen(p); - } - } -} - -impl Gen for PrivateIdentifier { - fn gen(&self, p: &mut Formatter) { - p.print(b'#'); - p.print_str(self.name.as_bytes()); - } -} - -impl<'a> Gen for BindingPattern<'a> { - fn gen(&self, p: &mut Formatter) { - match &self.kind { - BindingPatternKind::BindingIdentifier(ident) => ident.gen(p), - BindingPatternKind::ObjectPattern(pattern) => pattern.gen(p), - BindingPatternKind::ArrayPattern(pattern) => pattern.gen(p), - BindingPatternKind::AssignmentPattern(pattern) => pattern.gen(p), - } - } -} - -impl<'a> Gen for ObjectPattern<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'{'); - p.print_space(); - p.print_list(&self.properties); - if let Some(rest) = &self.rest { - if !self.properties.is_empty() { - p.print_comma(); - } - rest.gen(p); - } - p.print_space(); - p.print(b'}'); - } -} - -impl<'a> Gen for BindingProperty<'a> { - fn gen(&self, p: &mut Formatter) { - if self.computed { - p.print(b'['); - } - self.key.gen(p); - if self.computed { - p.print(b']'); - } - p.print(b':'); - p.print_space(); - self.value.gen(p); - } -} - -impl<'a> Gen for RestElement<'a> { - fn gen(&self, p: &mut Formatter) { - p.print_ellipsis(); - self.argument.gen(p); - } -} - -impl<'a> Gen for ArrayPattern<'a> { - fn gen(&self, p: &mut Formatter) { - p.print(b'['); - for (index, item) in self.elements.iter().enumerate() { - if index != 0 { - p.print_comma(); - } - if let Some(item) = item { - item.gen(p); - } - if index == self.elements.len() - 1 && (item.is_none() || self.rest.is_some()) { - p.print_comma(); - } - } - if let Some(rest) = &self.rest { - rest.gen(p); - } - p.print(b']'); - } -} - -impl<'a> Gen for AssignmentPattern<'a> { - fn gen(&self, p: &mut Formatter) { - self.left.gen(p); - p.print_space(); - p.print_equal(); - p.print_space(); - self.right.gen(p); - } -} diff --git a/crates/oxc_formatter/src/lib.rs b/crates/oxc_formatter/src/lib.rs deleted file mode 100644 index b07a06340e97c..0000000000000 --- a/crates/oxc_formatter/src/lib.rs +++ /dev/null @@ -1,323 +0,0 @@ -//! Prettier -//! -//! This crate is intended to be [prettier](https://prettier.io). -//! Please use the `oxc_codegen ` for code generation. - -mod gen; - -#[allow(clippy::wildcard_imports)] -use oxc_ast::ast::*; - -pub use crate::gen::Gen; - -#[derive(Debug, PartialEq, Eq, Clone)] -/// @see [prettier](https://prettier.io/docs/en/options.html#end-of-line) -pub enum EndOfLine { - /// Line Feed only (`\n`), common on Linux and macOS as well as inside git repos - LF, - /// Carriage Return + Line Feed characters (`\r\n`), common on Windows - CRLF, - /// Carriage Return character only (`\r`), used very rarely - CR, - /// Maintain existing line endings (mixed values within one file are normalised by looking at what’s used after the first line) - Auto(String), -} - -impl EndOfLine { - pub fn get_final_end_of_line(&self) -> FinalEndOfLine { - match self { - Self::Auto(raw_input) => Self::auto_detect_end_of_line(raw_input), - Self::LF => FinalEndOfLine::LF, - Self::CRLF => FinalEndOfLine::CRLF, - Self::CR => FinalEndOfLine::CR, - } - } - - pub fn auto_detect_end_of_line(raw_input_text: &str) -> FinalEndOfLine { - let first_line_feed_pos = raw_input_text.chars().position(|ch| ch == '\n'); - first_line_feed_pos.map_or(FinalEndOfLine::CR, |first_line_feed_pos| { - let char_before_line_feed_pos = first_line_feed_pos.saturating_sub(1); - let char_before_line_feed = raw_input_text.chars().nth(char_before_line_feed_pos); - match char_before_line_feed { - Some('\r') => FinalEndOfLine::CRLF, - _ => FinalEndOfLine::LF, - } - }) - } -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum FinalEndOfLine { - LF, - CRLF, - CR, -} - -#[derive(Debug, Clone)] -pub struct FormatterOptions { - pub indentation: u8, - // - pub single_quote: bool, - pub end_of_line: EndOfLine, -} - -impl Default for FormatterOptions { - fn default() -> Self { - Self { indentation: 4, single_quote: false, end_of_line: EndOfLine::LF } - } -} - -#[derive(Debug)] -/// processed and reserved for internal use -pub struct InnerOptions { - pub indentation: u8, - pub end_of_line: FinalEndOfLine, - pub single_quote: bool, -} - -impl From for InnerOptions { - fn from(options: FormatterOptions) -> Self { - Self { - indentation: options.indentation, - single_quote: options.single_quote, - end_of_line: options.end_of_line.get_final_end_of_line(), - } - } -} - -pub struct Formatter { - options: InnerOptions, - - /// Output Code - code: Vec, - - /// Current indentation tracking - indentation: u8, - - // states - needs_semicolon: bool, - - // Quote property with double quotes - quote_property_with_double_quotes: bool, -} - -#[derive(Debug, Clone, Copy)] -pub enum Separator { - Comma, - Semicolon, - None, -} - -/// Codegen interface for pretty print or minification -impl Formatter { - pub fn new(source_len: usize, options: FormatterOptions) -> Self { - Self { - options: options.into(), - code: Vec::with_capacity(source_len), - indentation: 0, - needs_semicolon: false, - quote_property_with_double_quotes: false, - } - } - - pub fn build(mut self, program: &Program<'_>) -> String { - program.gen(&mut self); - self.into_code() - } - - #[inline] - pub fn into_code(self) -> String { - // SAFETY: criteria of `from_utf8_unchecked`.are met. - unsafe { String::from_utf8_unchecked(self.code) } - } - - pub fn code(&self) -> &Vec { - &self.code - } - - /// Push a single character into the buffer - #[inline] - pub fn print(&mut self, ch: u8) { - self.code.push(ch); - } - - /// Push a string into the buffer - #[inline] - pub fn print_str(&mut self, s: &[u8]) { - self.code.extend_from_slice(s); - } - - #[inline] - pub fn print_space(&mut self) { - self.code.push(b' '); - } - - #[inline] - pub fn print_newline(&mut self) { - match self.options.end_of_line { - FinalEndOfLine::LF => { - self.code.push(b'\n'); - } - FinalEndOfLine::CRLF => { - self.code.push(b'\r'); - self.code.push(b'\n'); - } - FinalEndOfLine::CR => { - self.code.push(b'\r'); - } - } - } - - #[inline] - pub fn indent(&mut self) { - self.indentation += self.options.indentation; - } - - #[inline] - pub fn dedent(&mut self) { - self.indentation -= self.options.indentation; - } - - #[inline] - pub fn print_semicolon(&mut self) { - self.print(b';'); - } - - #[inline] - pub fn print_comma(&mut self) { - self.print(b','); - } - - fn print_semicolon_after_statement(&mut self) { - self.print_semicolon(); - self.print_newline(); - } - - fn print_semicolon_if_needed(&mut self) { - if self.needs_semicolon { - self.print_semicolon(); - self.needs_semicolon = false; - } - } - - #[inline] - pub fn print_ellipsis(&mut self) { - self.print_str(b"..."); - } - - #[inline] - pub fn print_colon(&mut self) { - self.print(b':'); - } - - #[inline] - pub fn print_equal(&mut self) { - self.print(b'='); - } - - #[inline] - pub fn print_quote(&mut self) { - self.print(if self.options.single_quote { b'\'' } else { b'"' }); - } - - pub fn print_indent(&mut self) { - for _ in 0..self.indentation { - self.print(b' '); - } - } - - #[inline] - pub fn print_sequence(&mut self, items: &[T], separator: Separator) { - let len = items.len(); - for (index, item) in items.iter().enumerate() { - item.gen(self); - match separator { - Separator::Semicolon => self.print_semicolon(), - Separator::Comma => self.print(b','), - Separator::None => {} - } - if index != len - 1 { - self.print_newline(); - } - } - } - - #[inline] - pub fn print_body(&mut self, stmt: &Statement<'_>) { - if let Statement::BlockStatement(block) = stmt { - self.print_space(); - self.print_block1(block); - self.print_newline(); - } else { - self.print_newline(); - self.indent(); - stmt.gen(self); - self.dedent(); - } - } - - #[inline] - pub fn print_block1(&mut self, stmt: &BlockStatement<'_>) { - self.print(b'{'); - self.print_newline(); - self.indent(); - for item in &stmt.body { - self.print_semicolon_if_needed(); - item.gen(self); - } - self.dedent(); - self.needs_semicolon = false; - self.print_indent(); - self.print(b'}'); - } - - #[inline] - pub fn print_block(&mut self, items: &[T], separator: Separator) { - self.print(b'{'); - self.indent(); - if !items.is_empty() { - self.print_newline(); - } - self.print_sequence(items, separator); - self.dedent(); - if !items.is_empty() { - self.print_newline(); - } - self.print(b'}'); - } - - #[inline] - pub fn print_list(&mut self, items: &[T]) { - for (index, item) in items.iter().enumerate() { - if index != 0 { - self.print_comma(); - self.print_space(); - } - item.gen(self); - } - } - - pub fn last_char(&self) -> Option<&u8> { - self.code.last() - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn auto_detects_lf() { - assert_eq!(FinalEndOfLine::LF, EndOfLine::auto_detect_end_of_line("One\nTwo\nThree")); - } - - #[test] - fn auto_detects_crlf() { - assert_eq!(FinalEndOfLine::CRLF, EndOfLine::auto_detect_end_of_line("One\r\nTwo\r\nThree")); - } - - #[test] - fn auto_detects_cr() { - assert_eq!(FinalEndOfLine::CR, EndOfLine::auto_detect_end_of_line("One\rTwo\rThree")); - } -} diff --git a/crates/oxc_language_server/Cargo.toml b/crates/oxc_language_server/Cargo.toml index 05653454b7838..c00e25b3df42a 100644 --- a/crates/oxc_language_server/Cargo.toml +++ b/crates/oxc_language_server/Cargo.toml @@ -26,7 +26,6 @@ oxc_linter = { workspace = true } oxc_parser = { workspace = true } oxc_semantic = { workspace = true } oxc_span = { workspace = true } -oxc_linter_plugin = { workspace = true } dashmap = { workspace = true } env_logger = { workspace = true } futures = { workspace = true } diff --git a/crates/oxc_linter/Cargo.toml b/crates/oxc_linter/Cargo.toml index 02333400bb5ff..9b0a31ba97002 100644 --- a/crates/oxc_linter/Cargo.toml +++ b/crates/oxc_linter/Cargo.toml @@ -27,7 +27,7 @@ oxc_diagnostics = { workspace = true } oxc_macros = { workspace = true } oxc_semantic = { workspace = true } oxc_syntax = { workspace = true } -oxc_formatter = { workspace = true } +oxc_codegen = { workspace = true } oxc_index = { workspace = true } oxc_resolver = { version = "1.2.0" } diff --git a/crates/oxc_linter/src/config/mod.rs b/crates/oxc_linter/src/config/mod.rs index 9b6053502a483..306fcce1f543f 100644 --- a/crates/oxc_linter/src/config/mod.rs +++ b/crates/oxc_linter/src/config/mod.rs @@ -1,163 +1,119 @@ -use std::{collections::HashSet, path::PathBuf}; +use std::path::Path; pub mod errors; use oxc_diagnostics::{Error, FailedToOpenFileError, Report}; -use phf::{phf_map, Map}; -use rustc_hash::FxHashMap; +use rustc_hash::{FxHashMap, FxHashSet}; use serde_json::Value; -use crate::{ - rules::{RuleEnum, RULES}, - AllowWarnDeny, JsxA11y, LintSettings, -}; +use crate::{rules::RuleEnum, AllowWarnDeny, JsxA11y, LintSettings}; use self::errors::{ - FailedToParseConfigError, FailedToParseConfigJsonError, FailedToParseConfigPropertyError, - FailedToParseRuleValueError, + FailedToParseConfigError, FailedToParseConfigJsonError, FailedToParseRuleValueError, }; pub struct ESLintConfig { - rules: std::vec::Vec, + rules: Vec, settings: LintSettings, } +#[derive(Debug)] +pub struct ESLintRuleConfig { + plugin_name: String, + rule_name: String, + severity: AllowWarnDeny, + config: Option, +} + impl ESLintConfig { - pub fn new(path: &PathBuf) -> Result { + pub fn new(path: &Path) -> Result { + let json = Self::read_json(path)?; + let rules = parse_rules(&json)?; + let settings = parse_settings_from_root(&json); + Ok(Self { rules, settings }) + } + + pub fn settings(self) -> LintSettings { + self.settings + } + + fn read_json(path: &Path) -> Result { let file = match std::fs::read_to_string(path) { Ok(file) => file, Err(e) => { return Err(FailedToParseConfigError(vec![Error::new(FailedToOpenFileError( - path.clone(), + path.to_path_buf(), e, ))]) .into()); } }; - let file = match serde_json::from_str::(&file) { - Ok(file) => file, - Err(e) => { - let guess = mime_guess::from_path(path); - let err = match guess.first() { - // syntax error - Some(mime) if mime.subtype() == "json" => e.to_string(), - Some(_) => "only json configuration is supported".to_string(), - None => { - format!( - "{e}, if the configuration is not a json file, please use json instead." - ) - } - }; - return Err(FailedToParseConfigError(vec![Error::new( - FailedToParseConfigJsonError(path.clone(), err), - )]) - .into()); - } - }; - - // See https://github.com/oxc-project/oxc/issues/1672 - let extends_hm: HashSet<&str> = HashSet::new(); - - let roles_hm = match parse_rules(&file) { - Ok(roles_hm) => roles_hm - .into_iter() - .map(|(plugin_name, rule_name, allow_warn_deny, config)| { - ((plugin_name, rule_name), (allow_warn_deny, config)) - }) - .collect::>(), - Err(e) => { - return Err(e); - } - }; - - let settings = parse_settings_from_root(&file); - - // `extends` provides the defaults - // `rules` provides the overrides - let rules = RULES.clone().into_iter().filter_map(|rule| { - // Check if the extends set is empty or contains the plugin name - let in_extends = extends_hm.contains(rule.plugin_name()); - - // Check if there's a custom rule that explicitly handles this rule - let (is_explicitly_handled, policy, config) = - if let Some((policy, config)) = roles_hm.get(&(rule.plugin_name(), rule.name())) { - // Return true for handling, and also whether it's enabled or not - (true, *policy, config) - } else { - // Not explicitly handled - (false, AllowWarnDeny::Allow, &None) - }; - - // The rule is included if it's in the extends set and not explicitly disabled, - // or if it's explicitly enabled - if (in_extends && !is_explicitly_handled) || policy.is_enabled() { - Some(rule.read_json(config.clone())) - } else { - None - } - }); - - Ok(Self { rules: rules.collect::>(), settings }) - } - - pub fn into_rules(mut self) -> Self { - self.rules.sort_unstable_by_key(RuleEnum::name); - self + serde_json::from_str::(&file).map_err(|err| { + let guess = mime_guess::from_path(path); + let err = match guess.first() { + // syntax error + Some(mime) if mime.subtype() == "json" => err.to_string(), + Some(_) => "only json configuration is supported".to_string(), + None => { + format!( + "{err}, if the configuration is not a json file, please use json instead." + ) + } + }; + FailedToParseConfigError(vec![Error::new(FailedToParseConfigJsonError( + path.to_path_buf(), + err, + ))]) + .into() + }) } - pub fn get_config(self) -> (std::vec::Vec, LintSettings) { - (self.rules, self.settings) + pub fn override_rules(&self, rules_to_override: &mut FxHashSet) { + let mut rules_to_replace = vec![]; + let mut rules_to_remove = vec![]; + for rule in rules_to_override.iter() { + let plugin_name = rule.plugin_name(); + let rule_name = rule.name(); + if let Some(rule_to_configure) = + self.rules.iter().find(|r| r.plugin_name == plugin_name && r.rule_name == rule_name) + { + match rule_to_configure.severity { + AllowWarnDeny::Warn | AllowWarnDeny::Deny => { + rules_to_replace.push(rule.read_json(rule_to_configure.config.clone())); + } + AllowWarnDeny::Allow => { + rules_to_remove.push(rule.clone()); + } + } + } + } + for rule in rules_to_remove { + rules_to_override.remove(&rule); + } + for rule in rules_to_replace { + rules_to_override.replace(rule); + } } } -#[allow(unused)] -fn parse_extends(root_json: &Value) -> Result>, Report> { - let Some(extends) = root_json.get("extends") else { - return Ok(None); - }; +fn parse_rules(root_json: &Value) -> Result, Error> { + let Value::Object(rules_object) = root_json else { return Ok(Vec::default()) }; - let extends_obj = match extends { - Value::Array(v) => v, - _ => { - return Err(FailedToParseConfigPropertyError("extends", "Expected an array.").into()); - } + let Some(Value::Object(rules_object)) = rules_object.get("rules") else { + return Ok(Vec::default()); }; - let extends_rule_groups = extends_obj - .iter() - .filter_map(|v| { - let v = match v { - Value::String(s) => s, - _ => return None, - }; - - if let Some(m) = EXTENDS_MAP.get(v.as_str()) { - return Some(*m); - } - - None - }) - .collect::>(); - - Ok(Some(extends_rule_groups)) -} - -#[allow(clippy::type_complexity)] -fn parse_rules( - root_json: &Value, -) -> Result)>, Error> { - let Value::Object(rules_object) = root_json else { return Ok(vec![]) }; - - let Some(Value::Object(rules_object)) = rules_object.get("rules") else { return Ok(vec![]) }; - rules_object - .iter() + .into_iter() .map(|(key, value)| { - let (plugin_name, name) = parse_rule_name(key); - - let (rule_severity, rule_config) = resolve_rule_value(value)?; - - Ok((plugin_name, name, rule_severity, rule_config)) + let (plugin_name, rule_name) = parse_rule_name(key); + let (severity, config) = resolve_rule_value(value)?; + Ok(ESLintRuleConfig { + plugin_name: plugin_name.to_string(), + rule_name: rule_name.to_string(), + severity, + config, + }) }) .collect::, Error>>() } @@ -198,15 +154,6 @@ pub fn parse_settings(setting_value: &Value) -> LintSettings { LintSettings::default() } -pub const EXTENDS_MAP: Map<&'static str, &'static str> = phf_map! { - "eslint:recommended" => "eslint", - "plugin:react/recommended" => "react", - "plugin:@typescript-eslint/recommended" => "typescript", - "plugin:react-hooks/recommended" => "react", - "plugin:unicorn/recommended" => "unicorn", - "plugin:jest/recommended" => "jest", -}; - fn parse_rule_name(name: &str) -> (&str, &str) { if let Some((category, name)) = name.split_once('/') { let category = category.trim_start_matches('@'); diff --git a/crates/oxc_linter/src/config/snapshots/oxc_linter__config__test__parse_rules.snap b/crates/oxc_linter/src/config/snapshots/oxc_linter__config__test__parse_rules.snap index 83f244a81ef6f..b8e3fd4b8e63a 100644 --- a/crates/oxc_linter/src/config/snapshots/oxc_linter__config__test__parse_rules.snap +++ b/crates/oxc_linter/src/config/snapshots/oxc_linter__config__test__parse_rules.snap @@ -3,17 +3,17 @@ source: crates/oxc_linter/src/config/mod.rs expression: rules --- [ - ( - "eslint", - "no-console", - Allow, - None, - ), - ( - "eslint", - "no-bitwise", - Deny, - Some( + ESLintRuleConfig { + plugin_name: "eslint", + rule_name: "no-console", + severity: Allow, + config: None, + }, + ESLintRuleConfig { + plugin_name: "eslint", + rule_name: "no-bitwise", + severity: Deny, + config: Some( Array [ Object { "allow": Array [ @@ -22,12 +22,12 @@ expression: rules }, ], ), - ), - ( - "eslint", - "eqeqeq", - Deny, - Some( + }, + ESLintRuleConfig { + plugin_name: "eslint", + rule_name: "eqeqeq", + severity: Deny, + config: Some( Array [ String("always"), Object { @@ -35,17 +35,17 @@ expression: rules }, ], ), - ), - ( - "typescript", - "ban-types", - Deny, - None, - ), - ( - "jsx_a11y", - "alt-text", - Warn, - None, - ), + }, + ESLintRuleConfig { + plugin_name: "typescript", + rule_name: "ban-types", + severity: Deny, + config: None, + }, + ESLintRuleConfig { + plugin_name: "jsx_a11y", + rule_name: "alt-text", + severity: Warn, + config: None, + }, ] diff --git a/crates/oxc_linter/src/context.rs b/crates/oxc_linter/src/context.rs index 7683d6f09301e..79a3153e8964a 100644 --- a/crates/oxc_linter/src/context.rs +++ b/crates/oxc_linter/src/context.rs @@ -1,7 +1,7 @@ use std::{cell::RefCell, path::Path, rc::Rc}; +use oxc_codegen::{Codegen, CodegenOptions}; use oxc_diagnostics::Error; -use oxc_formatter::{Formatter, FormatterOptions}; use oxc_semantic::{AstNodes, JSDocComment, ScopeTree, Semantic, SymbolTable}; use oxc_span::SourceType; @@ -119,8 +119,8 @@ impl<'a> LintContext<'a> { } #[allow(clippy::unused_self)] - pub fn formatter(&self) -> Formatter { - Formatter::new(0, FormatterOptions::default()) + pub fn codegen(&self) -> Codegen { + Codegen::::new(0, CodegenOptions) } /* JSDoc */ diff --git a/crates/oxc_linter/src/lib.rs b/crates/oxc_linter/src/lib.rs index 40d92761b2ae8..284f6334fe094 100644 --- a/crates/oxc_linter/src/lib.rs +++ b/crates/oxc_linter/src/lib.rs @@ -18,7 +18,7 @@ mod rules; mod service; mod utils; -use std::{self, fs, io::Write, rc::Rc, time::Duration}; +use std::{io::Write, rc::Rc, time::Duration}; use oxc_diagnostics::Report; pub(crate) use oxc_semantic::AstNode; @@ -167,14 +167,6 @@ impl Linter { pub fn get_settings(&self) -> LintSettings { self.settings.clone() } - #[allow(unused)] - fn read_rules_configuration() -> Option> { - fs::read_to_string(".eslintrc.json") - .ok() - .and_then(|s| serde_json::from_str(&s).ok()) - .and_then(|v: serde_json::Value| v.get("rules").cloned()) - .and_then(|v| v.as_object().cloned()) - } pub fn print_rules(writer: &mut W) { let rules_by_category = RULES.iter().fold( diff --git a/crates/oxc_linter/src/options.rs b/crates/oxc_linter/src/options.rs index 4e0897baaf888..312de4c9bc32f 100644 --- a/crates/oxc_linter/src/options.rs +++ b/crates/oxc_linter/src/options.rs @@ -11,7 +11,7 @@ use crate::{ rules::RULES, LintSettings, RuleCategory, RuleEnum, }; -use oxc_diagnostics::{Error, Report}; +use oxc_diagnostics::Error; use rustc_hash::FxHashSet; use serde_json::{Number, Value}; @@ -153,15 +153,12 @@ const NEXTJS_PLUGIN_NAME: &str = "nextjs"; impl LintOptions { /// # Errors - /// Returns `Err` if there are any errors parsing the configuration file. - pub fn derive_rules_and_settings(&self) -> Result<(Vec, LintSettings), Report> { - let mut rules: FxHashSet = FxHashSet::default(); - - if let Some(path) = &self.config_path { - let (rules, settings) = ESLintConfig::new(path)?.into_rules().get_config(); - return Ok((rules, settings)); - } + /// + /// * Returns `Err` if there are any errors parsing the configuration file. + pub fn derive_rules_and_settings(&self) -> Result<(Vec, LintSettings), Error> { + let config = self.config_path.as_ref().map(|path| ESLintConfig::new(path)).transpose()?; + let mut rules: FxHashSet = FxHashSet::default(); let all_rules = self.get_filtered_rules(); for (allow_warn_deny, name_or_category) in &self.filter { @@ -201,10 +198,14 @@ impl LintOptions { } } + if let Some(config) = &config { + config.override_rules(&mut rules); + } + let mut rules = rules.into_iter().collect::>(); // for stable diagnostics output ordering rules.sort_unstable_by_key(RuleEnum::name); - Ok((rules, LintSettings::default())) + Ok((rules, config.map(ESLintConfig::settings).unwrap_or_default())) } // get final filtered rules by reading `self.jest_plugin` and `self.jsx_a11y_plugin` diff --git a/crates/oxc_linter/src/rules.rs b/crates/oxc_linter/src/rules.rs index 4db4989b9659f..68487df2e05bc 100644 --- a/crates/oxc_linter/src/rules.rs +++ b/crates/oxc_linter/src/rules.rs @@ -147,6 +147,7 @@ mod react { pub mod jsx_no_useless_fragment; pub mod no_children_prop; pub mod no_dangerously_set_inner_html; + pub mod no_direct_mutation_state; pub mod no_find_dom_node; pub mod no_is_mounted; pub mod no_render_return_value; @@ -484,6 +485,7 @@ oxc_macros::declare_all_lint_rules! { react::react_in_jsx_scope, react::no_children_prop, react::no_dangerously_set_inner_html, + react::no_direct_mutation_state, react::no_find_dom_node, react::no_render_return_value, react::no_string_refs, diff --git a/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs b/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs index f039b265e0e41..7595737ea3a36 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs @@ -6,7 +6,6 @@ use oxc_diagnostics::{ miette::{self, Diagnostic}, thiserror::{self, Error}, }; -use oxc_formatter::Gen; use oxc_macros::declare_oxc_lint; use oxc_span::{GetSpan, Span}; use oxc_syntax::operator::{BinaryOperator, UnaryOperator}; @@ -83,21 +82,22 @@ impl NoUnsafeNegation { /// Precondition: /// expr.left is `UnaryExpression` whose operator is '!' fn report_with_fix(expr: &BinaryExpression, ctx: &LintContext<'_>) { + use oxc_codegen::{Context, Gen}; // Diagnostic points at the unexpected negation let diagnostic = NoUnsafeNegationDiagnostic(expr.operator.as_str(), expr.left.span()); let fix_producer = || { // modify `!a instance of B` to `!(a instanceof B)` let modified_code = { - let mut formatter = ctx.formatter(); - formatter.print(b'!'); + let mut codegen = ctx.codegen(); + codegen.print(b'!'); let Expression::UnaryExpression(left) = &expr.left else { unreachable!() }; - formatter.print(b'('); - left.argument.gen(&mut formatter); - expr.operator.gen(&mut formatter); - expr.right.gen(&mut formatter); - formatter.print(b')'); - formatter.into_code() + codegen.print(b'('); + codegen.print_expression(&left.argument); + expr.operator.gen(&mut codegen, Context::default()); + codegen.print_expression(&expr.right); + codegen.print(b')'); + codegen.into_code() }; Fix::new(modified_code, expr.span) }; diff --git a/crates/oxc_linter/src/rules/jest/prefer_todo.rs b/crates/oxc_linter/src/rules/jest/prefer_todo.rs index abb92d837c609..721c734d2980a 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_todo.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_todo.rs @@ -147,7 +147,7 @@ fn get_fix_content<'a>(expr: &'a CallExpression<'a>) -> (&'a str, Span) { } fn build_code(expr: &CallExpression, ctx: &LintContext) -> (String, Span) { - let mut formatter = ctx.formatter(); + let mut formatter = ctx.codegen(); if let Expression::Identifier(ident) = &expr.callee { formatter.print_str(ident.name.as_bytes()); diff --git a/crates/oxc_linter/src/rules/react/no_direct_mutation_state.rs b/crates/oxc_linter/src/rules/react/no_direct_mutation_state.rs new file mode 100644 index 0000000000000..83147353600be --- /dev/null +++ b/crates/oxc_linter/src/rules/react/no_direct_mutation_state.rs @@ -0,0 +1,460 @@ +use oxc_ast::{ + ast::{ + AssignmentTarget, Expression, MemberExpression, MethodDefinitionKind, + SimpleAssignmentTarget, StaticMemberExpression, + }, + AstKind, +}; +use oxc_diagnostics::{ + miette::{self, Diagnostic}, + thiserror::Error, +}; +use oxc_macros::declare_oxc_lint; +use oxc_span::{GetSpan, Span}; + +use crate::{ + context::LintContext, + rule::Rule, + utils::{is_es5_component, is_es6_component}, + AstNode, +}; + +#[derive(Debug, Error, Diagnostic)] +#[error("eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly.")] +#[diagnostic( + severity(warning), + help("calling setState() afterwards may replace the mutation you made.") +)] +struct NoDirectMutationStateDiagnostic(#[label] pub Span); + +#[derive(Debug, Default, Clone)] +pub struct NoDirectMutationState; + +// code: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/no-direct-mutation-state.js +// doc: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md +// test: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/tests/lib/rules/no-direct-mutation-state.js + +declare_oxc_lint!( + /// ### What it does + /// The restriction coder cannot directly change the value of this.state + /// + /// ### Why is this bad? + /// calling setState() afterwards may replace the mutation you made + /// + /// ### Example + /// ```javascript + /// // error + /// var Hello = createReactClass({ + /// componentDidMount: function() { + /// this.state.name = this.props.name.toUpperCase(); + /// }, + /// render: function() { + /// return
Hello {this.state.name}
; + /// } + /// }); + /// + /// class Hello extends React.Component { + /// constructor(props) { + /// super(props) + /// + /// doSomethingAsync(() => { + /// this.state = 'bad'; + /// }); + /// } + /// } + /// + /// // success + /// var Hello = createReactClass({ + /// componentDidMount: function() { + /// this.setState({ + /// name: this.props.name.toUpperCase(); + /// }); + /// }, + /// render: function() { + /// return
Hello {this.state.name}
; + /// } + /// }); + /// + /// class Hello extends React.Component { + /// constructor(props) { + /// super(props) + /// + /// this.state = { + /// foo: 'bar', + /// } + /// } + /// } + /// ``` + NoDirectMutationState, + correctness +); + +// check current node is this.state.xx +fn is_state_member_expression(expression: &StaticMemberExpression<'_>) -> bool { + if let Expression::ThisExpression(_) = &expression.object { + return expression.property.name == "state"; + } + + false +} + +// get the top iterator +// example: this.state.a.b.c.d => this.state +fn get_outer_member_expression<'a, 'b>( + assignment: &'b SimpleAssignmentTarget<'a>, +) -> Option<&'b StaticMemberExpression<'a>> { + if let SimpleAssignmentTarget::MemberAssignmentTarget(member_expr) = assignment { + match &member_expr.0 { + MemberExpression::StaticMemberExpression(expr) => { + let mut node = expr; + loop { + if node.object.is_null() { + return Some(node); + } + + if let Some(object) = get_static_member_expression_obj(&node.object) { + if !object.property.name.is_empty() { + node = object; + + continue; + } + } + + return Some(node); + } + } + MemberExpression::PrivateFieldExpression(_) + | MemberExpression::ComputedMemberExpression(_) => {} + } + } + + None +} + +// Because node.object is of type &Expression<'_> +// We need a function to get static_member_expression +fn get_static_member_expression_obj<'a, 'b>( + expression: &'b Expression<'a>, +) -> Option<&'b StaticMemberExpression<'a>> { + match expression { + Expression::MemberExpression(member_expr) => match &member_expr.0 { + MemberExpression::StaticMemberExpression(expr) => Some(expr), + _ => None, + }, + _ => None, + } +} + +fn should_ignore_component<'a, 'b>(node: &'b AstNode<'a>, ctx: &'b LintContext<'a>) -> bool { + let mut is_constructor: bool = false; + let mut is_call_expression_node: bool = false; + let mut is_component: bool = false; + + for parent in ctx.nodes().iter_parents(node.id()) { + if let AstKind::MethodDefinition(method_def) = parent.kind() { + if method_def.kind == MethodDefinitionKind::Constructor { + is_constructor = true; + } + } + + if let AstKind::CallExpression(_) = parent.kind() { + is_call_expression_node = true; + } + + if is_es6_component(parent) || is_es5_component(parent) { + is_component = true; + } + } + + is_constructor && !is_call_expression_node || !is_component +} + +impl Rule for NoDirectMutationState { + fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { + match node.kind() { + AstKind::AssignmentExpression(assignment_expr) => { + if should_ignore_component(node, ctx) { + return; + } + + if let AssignmentTarget::SimpleAssignmentTarget(assignment) = &assignment_expr.left + { + if let Some(outer_member_expression) = get_outer_member_expression(assignment) { + if is_state_member_expression(outer_member_expression) { + ctx.diagnostic(NoDirectMutationStateDiagnostic( + assignment_expr.left.span(), + )); + } + } + } + } + + AstKind::UpdateExpression(update_expr) => { + if should_ignore_component(node, ctx) { + return; + } + + if let Some(outer_member_expression) = + get_outer_member_expression(&update_expr.argument) + { + if is_state_member_expression(outer_member_expression) { + ctx.diagnostic(NoDirectMutationStateDiagnostic(update_expr.span)); + } + } + } + + _ => {} + } + } +} + +#[test] +fn test() { + use crate::tester::Tester; + + let pass = vec![ + ( + "var Hello = createReactClass({ + render: function() { + return
Hello {this.props.name}
; + } + });", + None, + ), + ( + " + var Hello = createReactClass({ + render: function() { + var obj = {state: {}}; + obj.state.name = 'foo'; + return
Hello {obj.state.name}
; + } + }); + ", + None, + ), + ( + " + var Hello = 'foo'; + module.exports = {}; + ", + None, + ), + ( + " + class Hello { + getFoo() { + this.state.foo = 'bar' + return this.state.foo; + } + } + ", + None, + ), + ( + " + class Hello extends React.Component { + constructor() { + this.state.foo = 'bar' + } + } + ", + None, + ), + ( + " + class Hello extends React.Component { + constructor() { + this.state.foo = 1; + } + } + ", + None, + ), + ( + " + class OneComponent extends Component { + constructor() { + super(); + class AnotherComponent extends Component { + constructor() { + super(); + } + } + this.state = {}; + } + } + ", + None, + ), + ]; + + let fail = vec![ + ( + r#" + var Hello = createReactClass({ + + componentWillMount() { + this.state.foo = "Chicken, you're so beautiful" + }, + + render: function() { + this.state.foo = "Chicken, you're so beautiful" + return
Hello{this.props.name}
; + } + }); + + var Hello2 = createReactClass({ + render: () => { + this.state.foo = "Chicken, you're so beautiful" + return
Hello {this.props.name}
; + } + }); + "#, + None, + ), + ( + " + var Hello = createReactClass({ + render: function() { + this.state.foo++; + return
Hello {this.props.name}
; + } + }); + ", + None, + ), + ( + r#" + var Hello = createReactClass({ + render: function() { + this.state.person.name= "bar" + return
Hello {this.props.name}
; + } + }); + "#, + None, + ), + ( + r#" + var Hello = createReactClass({ + render: function() { + this.state.person.name.first = "bar" + return
Hello
; + } + }); + "#, + None, + ), + ( + r#" + var Hello = createReactClass({ + render: function() { + this.state.person.name.first = "bar" + this.state.person.name.last = "baz" + return
Hello
; + } + }); + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + constructor() { + someFn() + } + someFn() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + constructor(props) { + super(props) + doSomethingAsync(() => { + this.state = "bad"; + }); + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + componentWillMount() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + componentDidMount() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + componentWillReceiveProps() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + shouldComponentUpdate() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + componentWillUpdate() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + componentDidUpdate() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ( + r#" + class Hello extends React.Component { + componentWillUnmount() { + this.state.foo = "bar" + } + } + "#, + None, + ), + ]; + + Tester::new(NoDirectMutationState::NAME, pass, fail).test_and_snapshot(); +} diff --git a/crates/oxc_linter/src/rules/unicorn/no_instanceof_array.rs b/crates/oxc_linter/src/rules/unicorn/no_instanceof_array.rs index ca69e8732140c..b13beda79f804 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_instanceof_array.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_instanceof_array.rs @@ -4,9 +4,8 @@ use oxc_diagnostics::{ miette::{self, Diagnostic}, thiserror::Error, }; -use oxc_formatter::Gen; use oxc_macros::declare_oxc_lint; -use oxc_span::Span; +use oxc_span::{GetSpan, Span}; use oxc_syntax::operator::BinaryOperator; use crate::{context::LintContext, fixer::Fix, rule::Rule, AstNode}; @@ -46,11 +45,11 @@ impl Rule for NoInstanceofArray { Expression::Identifier(identifier) if identifier.name == "Array" => { ctx.diagnostic_with_fix(NoInstanceofArrayDiagnostic(expr.span), || { let modified_code = { - let mut formatter = ctx.formatter(); - formatter.print_str(b"Array.isArray("); - expr.left.gen(&mut formatter); - formatter.print(b')'); - formatter.into_code() + let mut codegen = String::new(); + codegen.push_str("Array.isArray("); + codegen.push_str(expr.left.span().source_text(ctx.source_text())); + codegen.push(')'); + codegen }; Fix::new(modified_code, expr.span) }); @@ -90,7 +89,7 @@ fn test() { let fix = vec![ ("arr instanceof Array", "Array.isArray(arr)", None), ("[] instanceof Array", "Array.isArray([])", None), - ("[1,2,3] instanceof Array === true", "Array.isArray([1, 2, 3]) === true", None), + ("[1,2,3] instanceof Array === true", "Array.isArray([1,2,3]) === true", None), ("fun.call(1, 2, 3) instanceof Array", "Array.isArray(fun.call(1, 2, 3))", None), ("obj.arr instanceof Array", "Array.isArray(obj.arr)", None), ("foo.bar[2] instanceof Array", "Array.isArray(foo.bar[2])", None), diff --git a/crates/oxc_linter/src/rules/unicorn/no_unnecessary_await.rs b/crates/oxc_linter/src/rules/unicorn/no_unnecessary_await.rs index 038352ad08f7c..c31051b6bdc8b 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_unnecessary_await.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_unnecessary_await.rs @@ -3,9 +3,8 @@ use oxc_diagnostics::{ miette::{self, Diagnostic}, thiserror::Error, }; -use oxc_formatter::Gen; use oxc_macros::declare_oxc_lint; -use oxc_span::Span; +use oxc_span::{GetSpan, Span}; use crate::{context::LintContext, rule::Rule, AstNode, Fix}; @@ -64,9 +63,9 @@ impl Rule for NoUnnecessaryAwait { ctx.diagnostic_with_fix( NoUnnecessaryAwaitDiagnostic(Span::new(expr.span.start, expr.span.start + 5)), || { - let mut formatter = ctx.formatter(); - expr.argument.gen(&mut formatter); - Fix::new(formatter.into_code(), expr.span) + let mut codegen = String::new(); + codegen.push_str(expr.argument.span().source_text(ctx.source_text())); + Fix::new(codegen, expr.span) }, ); }; @@ -158,8 +157,8 @@ fn test() { let fix = vec![ ("await []", "[]", None), ("await (a == b)", "(a == b)", None), - ("+await -1", "+ -1", None), - ("-await +1", "- +1", None), + ("+await -1", "+-1", None), + ("-await +1", "-+1", None), ("await function() {}", "await function() {}", None), // no autofix ("await class {}", "await class {}", None), // no autofix ("+await +1", "+await +1", None), // no autofix diff --git a/crates/oxc_linter/src/rules/unicorn/require_number_to_fixed_digits_argument.rs b/crates/oxc_linter/src/rules/unicorn/require_number_to_fixed_digits_argument.rs index df28609fd6f7a..2725ca4b47a9c 100644 --- a/crates/oxc_linter/src/rules/unicorn/require_number_to_fixed_digits_argument.rs +++ b/crates/oxc_linter/src/rules/unicorn/require_number_to_fixed_digits_argument.rs @@ -64,7 +64,7 @@ impl Rule for RequireNumberToFixedDigitsArgument { RequireNumberToFixedDigitsArgumentDiagnostic(parenthesis_span), || { let modified_code = { - let mut formatter = ctx.formatter(); + let mut formatter = ctx.codegen(); let mut parenthesis_span_without_right_one = parenthesis_span; parenthesis_span_without_right_one.end -= 1; diff --git a/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs b/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs index 287fbc93090ff..1c8765c06c858 100644 --- a/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs +++ b/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs @@ -3,7 +3,6 @@ use oxc_diagnostics::{ miette::{self, Diagnostic}, thiserror::Error, }; -use oxc_formatter::Gen; use oxc_macros::declare_oxc_lint; use oxc_span::{GetSpan, Span}; @@ -76,20 +75,23 @@ impl Rule for SwitchCaseBraces { }; ctx.diagnostic_with_fix(SwitchCaseBracesDiagnostic(case_body_span), || { + use oxc_codegen::{Context, Gen}; let modified_code = { - let mut formatter = ctx.formatter(); + let mut formatter = ctx.codegen(); if let Some(case_test) = &case.test { formatter.print_str(b"case "); - case_test.gen(&mut formatter); + formatter.print_expression(case_test); } else { formatter.print_str(b"default"); } formatter.print_colon(); - formatter.print_space(); + formatter.print_hard_space(); formatter.print(b'{'); - case.consequent.iter().for_each(|x| x.gen(&mut formatter)); + case.consequent + .iter() + .for_each(|x| x.gen(&mut formatter, Context::default())); formatter.print(b'}'); formatter.into_code() @@ -140,7 +142,7 @@ fn test() { ), ( "switch(something) { case 1: {} case 2: console.log('something'); break;}", - "switch(something) { case 1: case 2: {console.log(\"something\");\nbreak;\n}}", + "switch(something) { case 1: case 2: {console.log('something');\nbreak;\n}}", None, ), ( diff --git a/crates/oxc_linter/src/snapshots/no_direct_mutation_state.snap b/crates/oxc_linter/src/snapshots/no_direct_mutation_state.snap new file mode 100644 index 0000000000000..dd3db8454f887 --- /dev/null +++ b/crates/oxc_linter/src/snapshots/no_direct_mutation_state.snap @@ -0,0 +1,159 @@ +--- +source: crates/oxc_linter/src/tester.rs +assertion_line: 144 +expression: no_direct_mutation_state +--- + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:4:1] + 4 │ componentWillMount() { + 5 │ this.state.foo = "Chicken, you're so beautiful" + · ────────────── + 6 │ }, + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:8:1] + 8 │ render: function() { + 9 │ this.state.foo = "Chicken, you're so beautiful" + · ────────────── + 10 │ return
Hello{this.props.name}
; + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:15:1] + 15 │ render: () => { + 16 │ this.state.foo = "Chicken, you're so beautiful" + · ────────────── + 17 │ return
Hello {this.props.name}
; + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ render: function() { + 4 │ this.state.foo++; + · ──────────────── + 5 │ return
Hello {this.props.name}
; + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ render: function() { + 4 │ this.state.person.name= "bar" + · ────────────────────── + 5 │ return
Hello {this.props.name}
; + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ render: function() { + 4 │ this.state.person.name.first = "bar" + · ──────────────────────────── + 5 │ return
Hello
; + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ render: function() { + 4 │ this.state.person.name.first = "bar" + · ──────────────────────────── + 5 │ this.state.person.name.last = "baz" + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:4:1] + 4 │ this.state.person.name.first = "bar" + 5 │ this.state.person.name.last = "baz" + · ─────────────────────────── + 6 │ return
Hello
; + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:6:1] + 6 │ someFn() { + 7 │ this.state.foo = "bar" + · ────────────── + 8 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:5:1] + 5 │ doSomethingAsync(() => { + 6 │ this.state = "bad"; + · ────────── + 7 │ }); + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ componentWillMount() { + 4 │ this.state.foo = "bar" + · ────────────── + 5 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ componentDidMount() { + 4 │ this.state.foo = "bar" + · ────────────── + 5 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ componentWillReceiveProps() { + 4 │ this.state.foo = "bar" + · ────────────── + 5 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ shouldComponentUpdate() { + 4 │ this.state.foo = "bar" + · ────────────── + 5 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ componentWillUpdate() { + 4 │ this.state.foo = "bar" + · ────────────── + 5 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ componentDidUpdate() { + 4 │ this.state.foo = "bar" + · ────────────── + 5 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. + ╭─[no_direct_mutation_state.tsx:3:1] + 3 │ componentWillUnmount() { + 4 │ this.state.foo = "bar" + · ────────────── + 5 │ } + ╰──── + help: calling setState() afterwards may replace the mutation you made. + + diff --git a/crates/oxc_wasm/Cargo.toml b/crates/oxc_wasm/Cargo.toml index 60995f4fde39b..af6ae3529c489 100644 --- a/crates/oxc_wasm/Cargo.toml +++ b/crates/oxc_wasm/Cargo.toml @@ -21,7 +21,7 @@ doctest = false default = ["console_error_panic_hook"] [dependencies] -oxc = { workspace = true, features = ["serde", "semantic", "formatter", "transformer", "minifier", "codegen"] } +oxc = { workspace = true, features = ["serde", "semantic", "transformer", "minifier", "codegen"] } oxc_linter = { workspace = true } oxc_prettier = { workspace = true } diff --git a/crates/oxc_wasm/src/lib.rs b/crates/oxc_wasm/src/lib.rs index a8b6f5ea11fcb..9135e03a0ab8c 100644 --- a/crates/oxc_wasm/src/lib.rs +++ b/crates/oxc_wasm/src/lib.rs @@ -6,7 +6,6 @@ use oxc::{ allocator::Allocator, codegen::{Codegen, CodegenOptions}, diagnostics::Error, - formatter::{Formatter, FormatterOptions}, minifier::{CompressOptions, Minifier, MinifierOptions}, parser::{Parser, ParserReturn}, semantic::{ScopeId, Semantic, SemanticBuilder, SemanticBuilderReturn}, @@ -22,7 +21,7 @@ use trustfall::{execute_query, TransparentValue}; use wasm_bindgen::prelude::*; use crate::options::{ - OxcFormatterOptions, OxcLinterOptions, OxcMinifierOptions, OxcParserOptions, OxcRunOptions, + OxcCodegenOptions, OxcLinterOptions, OxcMinifierOptions, OxcParserOptions, OxcRunOptions, OxcTypeCheckingOptions, }; @@ -182,7 +181,7 @@ impl Oxc { run_options: &OxcRunOptions, parser_options: &OxcParserOptions, _linter_options: &OxcLinterOptions, - formatter_options: &OxcFormatterOptions, + _codegen_options: &OxcCodegenOptions, minifier_options: &OxcMinifierOptions, _type_checking_options: &OxcTypeCheckingOptions, ) -> Result<(), serde_wasm_bindgen::Error> { @@ -226,15 +225,6 @@ impl Oxc { self.save_diagnostics(diagnostics); } - if run_options.format() { - let formatter_options = FormatterOptions { - indentation: formatter_options.indentation, - ..Default::default() - }; - let printed = Formatter::new(source_text.len(), formatter_options).build(program); - self.formatted_text = printed; - } - if run_options.prettier_format() { let ret = Parser::new(&allocator, source_text, source_type) .allow_return_outside_function(parser_options.allow_return_outside_function) diff --git a/crates/oxc_wasm/src/options.rs b/crates/oxc_wasm/src/options.rs index 6eb37ceaafcb2..7d87d7dfdac32 100644 --- a/crates/oxc_wasm/src/options.rs +++ b/crates/oxc_wasm/src/options.rs @@ -141,12 +141,12 @@ impl OxcLinterOptions { #[wasm_bindgen] #[derive(Default, Clone, Copy)] -pub struct OxcFormatterOptions { +pub struct OxcCodegenOptions { pub indentation: u8, } #[wasm_bindgen] -impl OxcFormatterOptions { +impl OxcCodegenOptions { #[wasm_bindgen(constructor)] pub fn new() -> Self { Self::default() diff --git a/tasks/coverage/Cargo.toml b/tasks/coverage/Cargo.toml index dc99f65bb2ce7..716e1479e770e 100644 --- a/tasks/coverage/Cargo.toml +++ b/tasks/coverage/Cargo.toml @@ -40,6 +40,7 @@ pico-args = { workspace = true } lazy_static = { workspace = true } walkdir = { workspace = true } regex = { workspace = true } +phf = { workspace = true, features = ["macros"] } console = "0.15.7" encoding_rs = "0.8.33" diff --git a/tasks/coverage/codegen_runtime_test262.snap b/tasks/coverage/codegen_runtime_test262.snap new file mode 100644 index 0000000000000..a1e249e408efb --- /dev/null +++ b/tasks/coverage/codegen_runtime_test262.snap @@ -0,0 +1,2814 @@ +codegen_runtime_test262 Summary: +AST Parsed : 34664/34664 (100.00%) +Positive Passed: 33728/34664 (97.30%) +Expect to run correctly: "annexB/built-ins/String/prototype/substr/surrogate-pairs.js" +But got a runtime error: Test262Error: start: 1 Expected SameValue(«�», «\udf06») to be true + +Expect to run correctly: "annexB/language/comments/multi-line-html-close.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "annexB/language/comments/single-line-html-close-asi.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "annexB/language/comments/single-line-html-close-unicode-separators.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "annexB/language/comments/single-line-html-close.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "annexB/language/comments/single-line-html-open.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-block-decl-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-switch-case-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/direct/global-switch-dflt-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-block-decl-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-switch-case-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/eval-code/indirect/global-switch-dflt-eval-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/function-code/block-decl-func-skip-arguments.js" +But got a runtime error: Test262Error: Expected SameValue(«function arguments() { + }», «[object Arguments]») to be true + +Expect to run correctly: "annexB/language/global-code/block-decl-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/global-code/if-decl-else-decl-a-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/global-code/if-decl-else-decl-b-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/global-code/if-decl-else-stmt-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/global-code/if-decl-no-else-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/global-code/if-stmt-else-decl-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/global-code/switch-case-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "annexB/language/global-code/switch-dflt-global-init.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "built-ins/Array/prototype/concat/Array.prototype.concat_spreadable-string-wrapper.js" +But got a runtime error: Test262Error: Expected [y, u, c, k, \ud83d, \udca9] and [y, u, c, k, �, �] to have the same contents. ["y", "u", "c", "k", "uD83D", "uDCA9"] must return the same value returned by [].concat(str1) + +Expect to run correctly: "built-ins/Array/prototype/concat/arg-length-near-integer-limit.js" +But got a runtime error: Test262Error: [].concat(spreadableHasPoisonedIndex) throws a Test262Error exception Expected a Test262Error to be thrown but no exception was thrown at all + +Expect to run correctly: "built-ins/Array/prototype/push/set-length-zero-array-length-is-non-writable.js" +But got a runtime error: Test262Error: Expected a TypeError to be thrown but no exception was thrown at all + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/byteLength/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/descriptor.js" +But got a runtime error: Test262Error: obj should have an own property transfer + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/extensible.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-larger-no-resizable.js" +But got a runtime error: TypeError: source.transfer is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-same-no-resizable.js" +But got a runtime error: TypeError: source.transfer is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-smaller-no-resizable.js" +But got a runtime error: TypeError: source.transfer is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/from-fixed-to-zero-no-resizable.js" +But got a runtime error: TypeError: source.transfer is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/length.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/new-length-excessive.js" +But got a runtime error: Test262Error: Expected a RangeError but got a TypeError + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/new-length-non-number.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «2») to be true + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/nonconstructor.js" +But got a runtime error: Test262Error: isConstructor invoked with a non-function value + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/this-is-detached.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/this-is-not-arraybuffer-object.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transfer/this-is-not-object.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/descriptor.js" +But got a runtime error: Test262Error: obj should have an own property transferToFixedLength + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/extensible.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/from-fixed-to-larger-no-resizable.js" +But got a runtime error: TypeError: source.transferToFixedLength is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/from-fixed-to-same-no-resizable.js" +But got a runtime error: TypeError: source.transferToFixedLength is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/from-fixed-to-smaller-no-resizable.js" +But got a runtime error: TypeError: source.transferToFixedLength is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/from-fixed-to-zero-no-resizable.js" +But got a runtime error: TypeError: source.transferToFixedLength is not a function + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/length.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/new-length-excessive.js" +But got a runtime error: Test262Error: Expected a RangeError but got a TypeError + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/new-length-non-number.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «2») to be true + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/nonconstructor.js" +But got a runtime error: Test262Error: isConstructor invoked with a non-function value + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/this-is-detached.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/this-is-not-arraybuffer-object.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/ArrayBuffer/prototype/transferToFixedLength/this-is-not-object.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise.js" +But got a runtime error: http://localhost:32055/run: Network Error: Network Error: Error encountered in the status line: timed out reading response + +Expect to run correctly: "built-ins/AsyncGeneratorPrototype/return/return-suspendedStart-broken-promise.js" +But got a runtime error: Error: broken promise + +Expect to run correctly: "built-ins/AsyncGeneratorPrototype/return/return-suspendedYield-broken-promise-try-catch.js" +But got a runtime error: Error: broken promise + +Expect to run correctly: "built-ins/DataView/custom-proto-access-detaches-buffer.js" +But got a runtime error: Test262Error: Expected a TypeError but got a ReferenceError + +Expect to run correctly: "built-ins/DataView/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/buffer/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/byteLength/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/byteLength/instance-has-detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/byteOffset/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getFloat32/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getFloat32/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getFloat32/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getFloat64/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getFloat64/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getFloat64/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt16/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt16/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt16/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt32/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt32/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt32/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt8/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt8/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getInt8/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint16/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint16/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint16/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint32/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint32/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint32/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint8/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint8/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/getUint8/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat32/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat32/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat32/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat32/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat64/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat64/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setFloat64/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt16/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt16/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt16/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt32/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt32/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt32/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt32/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt8/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt8/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt8/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setInt8/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint16/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint16/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint16/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint16/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint32/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint32/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint32/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint32/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint8/detached-buffer-after-number-value.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint8/detached-buffer-after-toindex-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint8/detached-buffer-before-outofrange-byteoffset.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/DataView/prototype/setUint8/detached-buffer.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/Date/prototype/setHours/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf hour] and [valueOf hour, valueOf min, valueOf sec, valueOf ms] to have the same contents. + +Expect to run correctly: "built-ins/Date/prototype/setMinutes/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf min] and [valueOf min, valueOf sec, valueOf ms] to have the same contents. + +Expect to run correctly: "built-ins/Date/prototype/setMonth/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf month] and [valueOf month, valueOf date] to have the same contents. + +Expect to run correctly: "built-ins/Date/prototype/setSeconds/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf sec] and [valueOf sec, valueOf ms] to have the same contents. + +Expect to run correctly: "built-ins/Date/prototype/setUTCHours/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf hour] and [valueOf hour, valueOf min, valueOf sec, valueOf ms] to have the same contents. + +Expect to run correctly: "built-ins/Date/prototype/setUTCMinutes/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf min] and [valueOf min, valueOf sec, valueOf ms] to have the same contents. + +Expect to run correctly: "built-ins/Date/prototype/setUTCMonth/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf month] and [valueOf month, valueOf date] to have the same contents. + +Expect to run correctly: "built-ins/Date/prototype/setUTCSeconds/arg-coercion-order.js" +But got a runtime error: Test262Error: Expected [valueOf sec] and [valueOf sec, valueOf ms] to have the same contents. + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/callback-not-callable-throws.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-reference.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-unregister.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/custom-this.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'call') + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/holdings-multiple-values.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/length.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/not-a-constructor.js" +But got a runtime error: Test262Error: isConstructor invoked with a non-function value + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/prop-desc.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/reentrancy.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js" +But got a runtime error: TypeError: finalizationRegistry.cleanupSome is not a function + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/this-does-not-have-internal-cells-throws.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/cleanupSome/this-not-object-throws.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/FinalizationRegistry/prototype/unregister/unregister-cleaned-up-object-cell.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "built-ins/Function/prototype/apply/S15.3.4.3_A8_T4.js" +But got a runtime error: Test262Error: The result of evaluating (e instanceof TypeError) is expected to be true + +Expect to run correctly: "built-ins/Function/prototype/apply/S15.3.4.3_A8_T6.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'p1') + +Expect to run correctly: "built-ins/Function/prototype/call/S15.3.4.4_A7_T4.js" +But got a runtime error: Test262Error: The result of evaluating (e instanceof TypeError) is expected to be true + +Expect to run correctly: "built-ins/Function/prototype/call/S15.3.4.4_A7_T6.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'p1') + +Expect to run correctly: "built-ins/JSON/stringify/value-string-escape-unicode.js" +But got a runtime error: Test262Error: JSON.stringify("\uD834") Expected SameValue(«"\\ud834"», «"\ud834"») to be true + +Expect to run correctly: "built-ins/Object/defineProperties/15.2.3.7-2-18.js" +But got a runtime error: Test262Error: result !== true + +Expect to run correctly: "built-ins/Object/defineProperties/15.2.3.7-6-a-24.js" +But got a runtime error: Test262Error: Expected obj[prop] to be enumerable, but was not. + +Expect to run correctly: "built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments.js" +But got a runtime error: Test262Error: Expected SameValue(«null», «[object Arguments]») to be true + +Expect to run correctly: "built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller.js" +But got a runtime error: Test262Error: Expected SameValue(«null», «function g() { + return f(); +}») to be true + +Expect to run correctly: "built-ins/Object/seal/seal-arrowfunction.js" +But got a runtime error: TypeError: Object.getPrototypeOf is not a constructor + +Expect to run correctly: "built-ins/Object/seal/seal-asyncarrowfunction.js" +But got a runtime error: TypeError: Object.getPrototypeOf is not a constructor + +Expect to run correctly: "built-ins/Object/seal/seal-asyncfunction.js" +But got a runtime error: TypeError: Object.getPrototypeOf is not a constructor + +Expect to run correctly: "built-ins/Object/seal/seal-asyncgeneratorfunction.js" +But got a runtime error: TypeError: Object.getPrototypeOf is not a constructor + +Expect to run correctly: "built-ins/Object/seal/seal-generatorfunction.js" +But got a runtime error: TypeError: Object.getPrototypeOf is not a constructor + +Expect to run correctly: "built-ins/Promise/withResolvers/ctx-ctor.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'call') + +Expect to run correctly: "built-ins/Promise/withResolvers/promise.js" +But got a runtime error: TypeError: Promise.withResolvers is not a function + +Expect to run correctly: "built-ins/Promise/withResolvers/resolvers.js" +But got a runtime error: TypeError: Promise.withResolvers is not a function + +Expect to run correctly: "built-ins/Promise/withResolvers/result.js" +But got a runtime error: TypeError: Promise.withResolvers is not a function + +Expect to run correctly: "built-ins/RegExp/dotall/with-dotall-unicode.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "built-ins/RegExp/dotall/with-dotall.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "built-ins/RegExp/dotall/without-dotall-unicode.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "built-ins/RegExp/dotall/without-dotall.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "built-ins/RegExp/property-escapes/generated/strings/Basic_Emoji.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/property-escapes/generated/strings/Emoji_Keycap_Sequence.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Flag_Sequence.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Modifier_Sequence.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_Tag_Sequence.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/property-escapes/generated/strings/RGI_Emoji_ZWJ_Sequence.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/prototype/exec/u-captured-value.js" +But got a runtime error: Test262Error: Expected SameValue(«�», «\ud834») to be true + +Expect to run correctly: "built-ins/RegExp/prototype/flags/get-order.js" +But got a runtime error: Test262Error: Expected SameValue(«gimsuyd», «dgimsuy») to be true + +Expect to run correctly: "built-ins/RegExp/prototype/flags/this-val-regexp.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/prototype/unicodeSets/length.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'get') + +Expect to run correctly: "built-ins/RegExp/prototype/unicodeSets/name.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'get') + +Expect to run correctly: "built-ins/RegExp/prototype/unicodeSets/prop-desc.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'set') + +Expect to run correctly: "built-ins/RegExp/prototype/unicodeSets/this-val-invalid-obj.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'get') + +Expect to run correctly: "built-ins/RegExp/prototype/unicodeSets/this-val-non-obj.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'get') + +Expect to run correctly: "built-ins/RegExp/prototype/unicodeSets/this-val-regexp-prototype.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'get') + +Expect to run correctly: "built-ins/RegExp/prototype/unicodeSets/this-val-regexp.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-difference-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-difference-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-difference-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-intersection-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-escape-union-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-intersection-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-union-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-union-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-union-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-class-union-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-difference-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-difference-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-difference-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-difference-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-difference-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-difference-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-intersection-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-intersection-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-intersection-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-intersection-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-difference-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-intersection-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-property-escape-union-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-union-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-union-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-union-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-union-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-union-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/character-union-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-difference-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-intersection-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/property-of-strings-escape-union-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-13.1.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-14.0.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-15.0.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/rgi-emoji-15.1.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-difference-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-intersection-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-class-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-class.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character-property-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-union-character.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-union-property-of-strings-escape.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/RegExp/unicodeSets/generated/string-literal-union-string-literal.js" +But got a runtime error: SyntaxError: Invalid regular expression flags + +Expect to run correctly: "built-ins/String/prototype/at/returns-code-unit.js" +But got a runtime error: Test262Error: s.at(2) must return "\uD800" Expected SameValue(«\», «\ud800») to be true + +Expect to run correctly: "built-ins/String/prototype/codePointAt/return-first-code-unit.js" +But got a runtime error: Test262Error: Expected SameValue(«92», «55296») to be true + +Expect to run correctly: "built-ins/String/prototype/codePointAt/return-single-code-unit.js" +But got a runtime error: Test262Error: Expected SameValue(«92», «56320») to be true + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/length.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/not-a-constructor.js" +But got a runtime error: Test262Error: isConstructor invoked with a non-function value + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/prop-desc.js" +But got a runtime error: Test262Error: The value of `typeof String.prototype.isWellFormed` is "function" Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/return-abrupt-from-this.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/returns-boolean.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/to-string-primitive.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'call') + +Expect to run correctly: "built-ins/String/prototype/isWellFormed/to-string.js" +But got a runtime error: Test262Error: coerces the receiver to a string Expected a Test262Error but got a TypeError + +Expect to run correctly: "built-ins/String/prototype/padEnd/normal-operation.js" +But got a runtime error: Test262Error: Expected SameValue(«abc💩�», «abc💩\ud83d») to be true + +Expect to run correctly: "built-ins/String/prototype/padStart/normal-operation.js" +But got a runtime error: Test262Error: Expected SameValue(«💩�abc», «💩\ud83dabc») to be true + +Expect to run correctly: "built-ins/StringIteratorPrototype/next/next-iteration-surrogate-pairs.js" +But got a runtime error: Test262Error: Surrogate pair `value` (between normal code points) Expected SameValue(«\», «\ud834\udf06») to be true + +Expect to run correctly: "built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js" +But got a runtime error: ReferenceError: $262 is not defined + +Expect to run correctly: "intl402/Array/prototype/toLocaleString/invoke-element-tolocalestring.js" +But got a runtime error: Test262Error: Expected [] and [undefined, undefined] to have the same contents. must invoke element toLocaleString with expected arguments when provided no arguments + +Expect to run correctly: "intl402/Collator/prototype/compare/ignorePunctuation.js" +But got a runtime error: Test262Error: Compare to space Expected SameValue(«-1», «0») to be true + +Expect to run correctly: "intl402/Collator/prototype/resolvedOptions/ignorePunctuation-not-default.js" +But got a runtime error: Test262Error: Expected SameValue(«true», «false») to be true + +Expect to run correctly: "intl402/DateTimeFormat/constructor-options-order-dayPeriod.js" +But got a runtime error: Test262Error: Expected [day, dayPeriod, hour, day, dayPeriod, hour] and [day, dayPeriod, hour] to have the same contents. + +Expect to run correctly: "intl402/DateTimeFormat/constructor-options-order-fractionalSecondDigits.js" +But got a runtime error: Test262Error: Expected [second, fractionalSecondDigits, localeMatcher, second, fractionalSecondDigits, timeZoneName, formatMatcher] and [localeMatcher, second, fractionalSecondDigits, timeZoneName, formatMatcher] to have the same contents. + +Expect to run correctly: "intl402/DateTimeFormat/constructor-options-order-timedate-style.js" +But got a runtime error: Test262Error: Expected [weekday, year, month, day, hour, minute, second, dateStyle, timeStyle, localeMatcher, hour12, hourCycle, timeZone, weekday, era, year, month, day, hour, minute, second, timeZoneName, formatMatcher, dateStyle, timeStyle] and [localeMatcher, hour12, hourCycle, timeZone, weekday, era, year, month, day, hour, minute, second, timeZoneName, formatMatcher, dateStyle, timeStyle] to have the same contents. + +Expect to run correctly: "intl402/DateTimeFormat/constructor-options-order.js" +But got a runtime error: Test262Error: Expected [weekday, year, month, day, hour, minute, second, localeMatcher, hour12, hourCycle, timeZone, weekday, era, year, month, day, hour, minute, second, timeZoneName, formatMatcher] and [localeMatcher, hour12, hourCycle, timeZone, weekday, era, year, month, day, hour, minute, second, timeZoneName, formatMatcher] to have the same contents. + +Expect to run correctly: "intl402/DateTimeFormat/prototype/format/offset-timezone-gmt-same.js" +But got a runtime error: RangeError: Invalid time zone specified: +0300 + +Expect to run correctly: "intl402/DateTimeFormat/prototype/format/timedatestyle-en.js" +But got a runtime error: Test262Error: Result for full with {} Expected SameValue(«2:12:47 PM Coordinated Universal Time», «2:12:47 PM Coordinated Universal Time») to be true + +Expect to run correctly: "intl402/DateTimeFormat/prototype/formatRange/date-x-greater-than-y-not-throws.js" +But got a runtime error: RangeError: Invalid time value + +Expect to run correctly: "intl402/DateTimeFormat/prototype/formatRangeToParts/date-x-greater-than-y-not-throws.js" +But got a runtime error: RangeError: Invalid time value + +Expect to run correctly: "intl402/DateTimeFormat/prototype/formatToParts/offset-timezone-correct.js" +But got a runtime error: RangeError: Invalid time zone specified: +0301 + +Expect to run correctly: "intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle-default.js" +But got a runtime error: Test262Error: Expected SameValue(«h24», «h23») to be true + +Expect to run correctly: "intl402/DateTimeFormat/prototype/resolvedOptions/offset-timezone-basic.js" +But got a runtime error: RangeError: Invalid time zone specified: +03 + +Expect to run correctly: "intl402/DateTimeFormat/prototype/resolvedOptions/offset-timezone-change.js" +But got a runtime error: RangeError: Invalid time zone specified: -00 + +Expect to run correctly: "intl402/DateTimeFormat/timezone-case-insensitive.js" +But got a runtime error: Test262Error: Time zone created from string "America/Argentina/Buenos_Aires" Expected SameValue(«America/Buenos_Aires», «America/Argentina/Buenos_Aires») to be true + +Expect to run correctly: "intl402/DateTimeFormat/timezone-not-canonicalized.js" +But got a runtime error: Test262Error: Expected SameValue(«Asia/Calcutta», «Asia/Kolkata») to be true + +Expect to run correctly: "intl402/DisplayNames/prototype/of/type-language-invalid.js" +But got a runtime error: Test262Error: invalid language subtag - empty string Expected a RangeError to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/DisplayNames/prototype/of/type-region-invalid.js" +But got a runtime error: Test262Error: empty string Expected a RangeError to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-yes-to-true.js" +But got a runtime error: Test262Error: Expected SameValue(«und-u-ka», «und-u-ka-yes») to be true + +Expect to run correctly: "intl402/Intl/supportedValuesOf/collations-accepted-by-Collator.js" +But got a runtime error: Test262Error: pinyin is supported by Collator + +Expect to run correctly: "intl402/Intl/supportedValuesOf/currencies-accepted-by-DisplayNames.js" +But got a runtime error: Test262Error: ADP supported but not returned by supportedValuesOf + +Expect to run correctly: "intl402/Intl/supportedValuesOf/units-accepted-by-NumberFormat.js" +But got a runtime error: RangeError: Invalid unit argument for Intl.NumberFormat() 'microsecond' + +Expect to run correctly: "intl402/Locale/constructor-options-firstDayOfWeek-invalid.js" +But got a runtime error: Test262Error: new Intl.Locale("en", {firstDayOfWeek: ""}) throws RangeError Expected a RangeError to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/Locale/constructor-options-firstDayOfWeek-valid.js" +But got a runtime error: Test262Error: new Intl.Locale("en", { firstDayOfWeek: mon }).toString() returns "en-u-fw-mon" Expected SameValue(«en», «en-u-fw-mon») to be true + +Expect to run correctly: "intl402/Locale/likely-subtags.js" +But got a runtime error: Test262Error: "und-150".maximize() should be "en-Latn-150" Expected SameValue(«ru-Cyrl-RU», «en-Latn-150») to be true + +Expect to run correctly: "intl402/Locale/prototype/firstDayOfWeek/name.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'get') + +Expect to run correctly: "intl402/Locale/prototype/firstDayOfWeek/prop-desc.js" +But got a runtime error: TypeError: Cannot read properties of undefined (reading 'set') + +Expect to run correctly: "intl402/Locale/prototype/firstDayOfWeek/valid-id.js" +But got a runtime error: Test262Error: new Intl.Locale(en-u-fw-mon).firstDayOfWeek returns "1" Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "intl402/Locale/prototype/firstDayOfWeek/valid-options.js" +But got a runtime error: Test262Error: new Intl.Locale("en", { firstDayOfWeek: mon }).firstDayOfWeek returns "1" Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "intl402/Locale/prototype/getCalendars/branding.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getCalendars/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/Locale/prototype/getCalendars/output-array.js" +But got a runtime error: TypeError: (intermediate value).getCalendars is not a function + +Expect to run correctly: "intl402/Locale/prototype/getCalendars/prop-desc.js" +But got a runtime error: Test262Error: typeof Intl.Locale.prototype.getCalendars is function Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getCollations/branding.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getCollations/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/Locale/prototype/getCollations/output-array-values.js" +But got a runtime error: TypeError: (intermediate value).getCollations is not a function + +Expect to run correctly: "intl402/Locale/prototype/getCollations/output-array.js" +But got a runtime error: TypeError: (intermediate value).getCollations is not a function + +Expect to run correctly: "intl402/Locale/prototype/getCollations/prop-desc.js" +But got a runtime error: Test262Error: typeof Intl.Locale.prototype.getCollations is function Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getHourCycles/branding.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getHourCycles/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/Locale/prototype/getHourCycles/output-array-values.js" +But got a runtime error: TypeError: (intermediate value).getHourCycles is not a function + +Expect to run correctly: "intl402/Locale/prototype/getHourCycles/output-array.js" +But got a runtime error: TypeError: (intermediate value).getHourCycles is not a function + +Expect to run correctly: "intl402/Locale/prototype/getHourCycles/prop-desc.js" +But got a runtime error: Test262Error: typeof Intl.Locale.prototype.getHourCycles is function Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getNumberingSystems/branding.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getNumberingSystems/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/Locale/prototype/getNumberingSystems/output-array.js" +But got a runtime error: TypeError: (intermediate value).getNumberingSystems is not a function + +Expect to run correctly: "intl402/Locale/prototype/getNumberingSystems/prop-desc.js" +But got a runtime error: Test262Error: typeof Intl.Locale.prototype.getNumberingSystems is function Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getTextInfo/branding.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getTextInfo/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/Locale/prototype/getTextInfo/output-object-keys.js" +But got a runtime error: TypeError: (intermediate value).getTextInfo is not a function + +Expect to run correctly: "intl402/Locale/prototype/getTextInfo/output-object.js" +But got a runtime error: TypeError: (intermediate value).getTextInfo is not a function + +Expect to run correctly: "intl402/Locale/prototype/getTextInfo/prop-desc.js" +But got a runtime error: Test262Error: typeof Intl.Locale.prototype.getTextInfo is function Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getTimeZones/branding.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getTimeZones/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/Locale/prototype/getTimeZones/output-array-sorted.js" +But got a runtime error: TypeError: (intermediate value).getTimeZones is not a function + +Expect to run correctly: "intl402/Locale/prototype/getTimeZones/output-array-undefined.js" +But got a runtime error: TypeError: (intermediate value).getTimeZones is not a function + +Expect to run correctly: "intl402/Locale/prototype/getTimeZones/output-array.js" +But got a runtime error: TypeError: (intermediate value).getTimeZones is not a function + +Expect to run correctly: "intl402/Locale/prototype/getTimeZones/prop-desc.js" +But got a runtime error: Test262Error: typeof Intl.Locale.prototype.getTimeZones is function Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getWeekInfo/branding.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/getWeekInfo/firstDay-by-id.js" +But got a runtime error: TypeError: (intermediate value).getWeekInfo is not a function + +Expect to run correctly: "intl402/Locale/prototype/getWeekInfo/firstDay-by-option.js" +But got a runtime error: TypeError: (intermediate value).getWeekInfo is not a function + +Expect to run correctly: "intl402/Locale/prototype/getWeekInfo/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/Locale/prototype/getWeekInfo/output-object-keys.js" +But got a runtime error: TypeError: (intermediate value).getWeekInfo is not a function + +Expect to run correctly: "intl402/Locale/prototype/getWeekInfo/output-object.js" +But got a runtime error: TypeError: (intermediate value).getWeekInfo is not a function + +Expect to run correctly: "intl402/Locale/prototype/getWeekInfo/prop-desc.js" +But got a runtime error: Test262Error: typeof Intl.Locale.prototype.getWeekInfo is function Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js" +But got a runtime error: Test262Error: "und-150".minimize() should be "en-150" Expected SameValue(«ru», «en-150») to be true + +Expect to run correctly: "intl402/NumberFormat/constructor-option-read-order.js" +But got a runtime error: Test262Error: Expected [localeMatcher, numberingSystem, style, currency, currencyDisplay, currencySign, unit, unitDisplay, notation, minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, compactDisplay, useGrouping, signDisplay] and [localeMatcher, numberingSystem, style, currency, currencyDisplay, currencySign, unit, unitDisplay, notation, minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, roundingIncrement, roundingMode, roundingPriority, trailingZeroDisplay, compactDisplay, useGrouping, signDisplay] to have the same contents. Intl.NumberFormat options read order + +Expect to run correctly: "intl402/NumberFormat/constructor-options-roundingMode-invalid.js" +But got a runtime error: Test262Error: null Expected a RangeError to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/NumberFormat/constructor-options-throwing-getters-rounding-increment.js" +But got a runtime error: Test262Error: Expected a Test262Error to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/NumberFormat/constructor-options-throwing-getters-rounding-mode.js" +But got a runtime error: Test262Error: Expected a Test262Error to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/NumberFormat/constructor-options-throwing-getters-rounding-priority.js" +But got a runtime error: Test262Error: Expected a Test262Error to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/NumberFormat/constructor-options-throwing-getters-trailing-zero-display.js" +But got a runtime error: Test262Error: Expected a Test262Error to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/NumberFormat/constructor-roundingIncrement-invalid.js" +But got a runtime error: Test262Error: 0 Expected a RangeError to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/NumberFormat/constructor-roundingIncrement.js" +But got a runtime error: Test262Error: has property for value undefined + +Expect to run correctly: "intl402/NumberFormat/constructor-signDisplay-negative.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/constructor-trailingZeroDisplay-invalid.js" +But got a runtime error: Test262Error: empty string Expected a RangeError to be thrown but no exception was thrown at all + +Expect to run correctly: "intl402/NumberFormat/constructor-trailingZeroDisplay.js" +But got a runtime error: Test262Error: has property for value undefined + +Expect to run correctly: "intl402/NumberFormat/constructor-unit.js" +But got a runtime error: RangeError: Invalid unit argument for Intl.NumberFormat() 'acre-per-microsecond' + +Expect to run correctly: "intl402/NumberFormat/currency-digits.js" +But got a runtime error: Test262Error: Didn't get correct minimumFractionDigits for currency AFN. Expected SameValue(«0», «2») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-10.js" +But got a runtime error: Test262Error: Formatted value for 1.125, en-US-u-nu-arab and options {"roundingIncrement":10,"maximumFractionDigits":2,"minimumFractionDigits":2} is ١٫١٣; expected ١٫١٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-100.js" +But got a runtime error: Test262Error: Formatted value for 1.125, en-US-u-nu-arab and options {"roundingIncrement":100,"maximumFractionDigits":3,"minimumFractionDigits":3} is ١٫١٢٥; expected ١٫١٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-1000.js" +But got a runtime error: Test262Error: Formatted value for 1.125, en-US-u-nu-arab and options {"roundingIncrement":1000,"maximumFractionDigits":4,"minimumFractionDigits":4} is ١٫١٢٥٠; expected ١٫١٠٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-2.js" +But got a runtime error: Test262Error: Formatted value for 1.25, en-US-u-nu-arab and options {"roundingIncrement":2,"maximumFractionDigits":1,"minimumFractionDigits":1} is ١٫٣; expected ١٫٢. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-20.js" +But got a runtime error: Test262Error: Formatted value for 1.25, en-US-u-nu-arab and options {"roundingIncrement":20,"maximumFractionDigits":2,"minimumFractionDigits":2} is ١٫٢٥; expected ١٫٢٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-200.js" +But got a runtime error: Test262Error: Formatted value for 1.25, en-US-u-nu-arab and options {"roundingIncrement":200,"maximumFractionDigits":3,"minimumFractionDigits":3} is ١٫٢٥٠; expected ١٫٢٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-2000.js" +But got a runtime error: Test262Error: Formatted value for 1.25, en-US-u-nu-arab and options {"roundingIncrement":2000,"maximumFractionDigits":4,"minimumFractionDigits":4} is ١٫٢٥٠٠; expected ١٫٢٠٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-25.js" +But got a runtime error: Test262Error: Formatted value for 1.3125, en-US-u-nu-arab and options {"roundingIncrement":25,"maximumFractionDigits":2,"minimumFractionDigits":2} is ١٫٣١; expected ١٫٢٥. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-250.js" +But got a runtime error: Test262Error: Formatted value for 1.3125, en-US-u-nu-arab and options {"roundingIncrement":250,"maximumFractionDigits":3,"minimumFractionDigits":3} is ١٫٣١٣; expected ١٫٢٥٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-2500.js" +But got a runtime error: Test262Error: Formatted value for 1.3125, en-US-u-nu-arab and options {"roundingIncrement":2500,"maximumFractionDigits":4,"minimumFractionDigits":4} is ١٫٣١٢٥; expected ١٫٢٥٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-5.js" +But got a runtime error: Test262Error: Formatted value for 1.625, en-US-u-nu-arab and options {"roundingIncrement":5,"maximumFractionDigits":1,"minimumFractionDigits":1} is ١٫٦; expected ١٫٥. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-50.js" +But got a runtime error: Test262Error: Formatted value for 1.625, en-US-u-nu-arab and options {"roundingIncrement":50,"maximumFractionDigits":2,"minimumFractionDigits":2} is ١٫٦٣; expected ١٫٥٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-500.js" +But got a runtime error: Test262Error: Formatted value for 1.625, en-US-u-nu-arab and options {"roundingIncrement":500,"maximumFractionDigits":3,"minimumFractionDigits":3} is ١٫٦٢٥; expected ١٫٥٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-increment-5000.js" +But got a runtime error: Test262Error: Formatted value for 1.625, en-US-u-nu-arab and options {"roundingIncrement":5000,"maximumFractionDigits":4,"minimumFractionDigits":4} is ١٫٦٢٥٠; expected ١٫٥٠٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-ceil.js" +But got a runtime error: Test262Error: Formatted value for 1.101, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"ceil","maximumSignificantDigits":2} is ١٫١; expected ١٫٢. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-expand.js" +But got a runtime error: Test262Error: Formatted value for 1.101, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"expand","maximumSignificantDigits":2} is ١٫١; expected ١٫٢. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-floor.js" +But got a runtime error: Test262Error: Formatted value for 1.15, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"floor","maximumSignificantDigits":2} is ١٫٢; expected ١٫١. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-half-ceil.js" +But got a runtime error: Test262Error: Formatted value for -1.15, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"halfCeil","maximumSignificantDigits":2} is ؜-١٫٢; expected ؜-١٫١. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-half-even.js" +But got a runtime error: Test262Error: Formatted value for 1.25, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"halfEven","maximumSignificantDigits":2} is ١٫٣; expected ١٫٢. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-half-floor.js" +But got a runtime error: Test262Error: Formatted value for 1.15, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"halfFloor","maximumSignificantDigits":2} is ١٫٢; expected ١٫١. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-half-trunc.js" +But got a runtime error: Test262Error: Formatted value for 1.15, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"halfTrunc","maximumSignificantDigits":2} is ١٫٢; expected ١٫١. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-mode-trunc.js" +But got a runtime error: Test262Error: Formatted value for 1.15, en-US-u-nu-arab and options {"useGrouping":false,"roundingMode":"trunc","maximumSignificantDigits":2} is ١٫٢; expected ١٫١. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-priority-less-precision.js" +But got a runtime error: Test262Error: Formatted value for 1, en-US-u-nu-arab and options {"useGrouping":false,"roundingPriority":"lessPrecision","minimumSignificantDigits":2,"minimumFractionDigits":2} is ١٫٠; expected ١٫٠٠. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/format-rounding-priority-more-precision.js" +But got a runtime error: Test262Error: Formatted value for 1.23, en-US-u-nu-arab and options {"useGrouping":false,"roundingPriority":"morePrecision","maximumSignificantDigits":2,"maximumFractionDigits":2} is ١٫٢; expected ١٫٢٣. + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-currency-de-DE.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-currency-en-US.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ja-JP.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-currency-ko-KR.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-currency-zh-TW.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-de-DE.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-en-US.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-ja-JP.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-ko-KR.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/signDisplay-negative-zh-TW.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/format/units.js" +But got a runtime error: RangeError: Invalid unit argument for Number.prototype.toLocaleString() 'acre-per-microsecond' + +Expect to run correctly: "intl402/NumberFormat/prototype/format/useGrouping-extended-de-DE.js" +But got a runtime error: Test262Error: "min2" Expected SameValue(«1.000», «1000») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/format/useGrouping-extended-en-IN.js" +But got a runtime error: Test262Error: "min2" Expected SameValue(«1,000», «1000») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/format/useGrouping-extended-en-US.js" +But got a runtime error: Test262Error: "min2" Expected SameValue(«1,000», «1000») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/format/value-decimal-string.js" +But got a runtime error: Test262Error: Expected SameValue(«1», «1.0000000000000001») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/builtin.js" +But got a runtime error: Test262Error: The [[Class]] internal property of a built-in function must be "Function". Expected SameValue(«[object Undefined]», «[object Function]») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/en-US.js" +But got a runtime error: TypeError: nf.formatRange is not a function + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/invoked-as-func.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/length.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/nan-arguments-throws.js" +But got a runtime error: Test262Error: Expected a RangeError but got a TypeError + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/prop-desc.js" +But got a runtime error: Test262Error: `typeof Intl.NumberFormat.prototype.formatRange` is `function` Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/pt-PT.js" +But got a runtime error: TypeError: nf.formatRange is not a function + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRange/x-greater-than-y-not-throws.js" +But got a runtime error: TypeError: nf.formatRange is not a function + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/builtin.js" +But got a runtime error: Test262Error: The [[Class]] internal property of a built-in function must be "Function". Expected SameValue(«[object Undefined]», «[object Function]») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/en-US.js" +But got a runtime error: TypeError: nf.formatRangeToParts is not a function + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/invoked-as-func.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/length.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/nan-arguments-throws.js" +But got a runtime error: Test262Error: Expected a RangeError but got a TypeError + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/prop-desc.js" +But got a runtime error: Test262Error: `typeof Intl.NumberFormat.prototype.formatRangeToParts` is `function` Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/formatRangeToParts/x-greater-than-y-not-throws.js" +But got a runtime error: TypeError: nf.formatRangeToParts is not a function + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-de-DE.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-en-US.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ja-JP.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-ko-KR.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-currency-zh-TW.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-de-DE.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-en-US.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ja-JP.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-ko-KR.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/formatToParts/signDisplay-negative-zh-TW.js" +But got a runtime error: RangeError: Value negative out of range for Intl.NumberFormat options property signDisplay + +Expect to run correctly: "intl402/NumberFormat/prototype/resolvedOptions/basic.js" +But got a runtime error: Test262Error: Expected SameValue(«true», «auto») to be true + +Expect to run correctly: "intl402/NumberFormat/prototype/resolvedOptions/roundingMode.js" +But got a runtime error: Test262Error: default Expected SameValue(«undefined», «halfExpand») to be true + +Expect to run correctly: "intl402/NumberFormat/test-option-roundingPriority-mixed-options.js" +But got a runtime error: Test262Error: Formatted value for 1.625, en-US-u-nu-arab and options {"maximumSignificantDigits":2,"maximumFractionDigits":2,"roundingPriority":"morePrecision","userGrouping":false} is ١٫٦; expected ١٫٦٣. + +Expect to run correctly: "intl402/NumberFormat/test-option-roundingPriority.js" +But got a runtime error: Test262Error: Option value auto for property roundingPriority was not accepted; got undefined instead. + +Expect to run correctly: "intl402/NumberFormat/test-option-useGrouping-extended.js" +But got a runtime error: Test262Error: (omitted) Expected SameValue(«true», «auto») to be true + +Expect to run correctly: "intl402/NumberFormat/test-option-useGrouping.js" +But got a runtime error: Test262Error: Expected SameValue(«true», «min2») to be true + +Expect to run correctly: "intl402/NumberFormat/throws-for-maximumFractionDigits-over-limit.js" +But got a runtime error: RangeError: maximumFractionDigits value is out of range. + +Expect to run correctly: "intl402/NumberFormat/throws-for-minimumFractionDigits-over-limit.js" +But got a runtime error: RangeError: minimumFractionDigits value is out of range. + +Expect to run correctly: "intl402/PluralRules/constructor-option-read-order.js" +But got a runtime error: Test262Error: Expected [localeMatcher, type, minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits] and [localeMatcher, type, minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, roundingIncrement, roundingMode, roundingPriority, trailingZeroDisplay] to have the same contents. Intl.PluralRules options read order + +Expect to run correctly: "intl402/PluralRules/prototype/selectRange/default-en-us.js" +But got a runtime error: TypeError: pr.selectRange is not a function + +Expect to run correctly: "intl402/PluralRules/prototype/selectRange/invoked-as-func.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/PluralRules/prototype/selectRange/length.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/PluralRules/prototype/selectRange/name.js" +But got a runtime error: TypeError: Cannot convert undefined or null to object + +Expect to run correctly: "intl402/PluralRules/prototype/selectRange/nan-arguments-throws.js" +But got a runtime error: Test262Error: NaN/Number Expected a RangeError but got a TypeError + +Expect to run correctly: "intl402/PluralRules/prototype/selectRange/prop-desc.js" +But got a runtime error: Test262Error: `typeof Intl.PluralRules.prototype.selectRange` is `function` Expected SameValue(«undefined», «function») to be true + +Expect to run correctly: "intl402/PluralRules/prototype/selectRange/x-greater-than-y-not-throws.js" +But got a runtime error: TypeError: pr.selectRange is not a function + +Expect to run correctly: "intl402/Segmenter/prototype/segment/containing/unbreakable-input.js" +But got a runtime error: Test262Error: Expected SameValue(«\ud800», «\») to be true + +Expect to run correctly: "language/directive-prologue/14.1-4-s.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/directive-prologue/14.1-5-s.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-decl-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-func-expr-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-meth-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/async-gen-named-func-expr-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-decl-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/func-expr-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-decl-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-named-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-func-expr-nameless-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/gen-meth-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-fn-body-cntns-arguments-func-decl-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-fn-body-cntns-arguments-func-decl-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-fn-body-cntns-arguments-lex-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-fn-body-cntns-arguments-lex-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-fn-body-cntns-arguments-var-bind-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-fn-body-cntns-arguments-var-bind-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/meth-no-pre-existing-arguments-bindings-are-present-declare-arguments.js" +But got a runtime error: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/direct/non-definable-function-with-function.js" +But got a runtime error: Test262Error: Expected SameValue(«[object Object]», «undefined») to be true + +Expect to run correctly: "language/eval-code/direct/non-definable-function-with-variable.js" +But got a runtime error: Test262Error: Expected SameValue(«[object Object]», «undefined») to be true + +Expect to run correctly: "language/eval-code/direct/non-definable-global-function.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/eval-code/direct/non-definable-global-generator.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/eval-code/direct/strict-caller-global.js" +But got a runtime error: SyntaxError: Unexpected strict mode reserved word + +Expect to run correctly: "language/eval-code/direct/var-env-func-init-global-new.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "language/eval-code/direct/var-env-func-init-global-update-configurable.js" +But got a runtime error: Test262Error: descriptor should be enumerable; descriptor should be writable + +Expect to run correctly: "language/eval-code/direct/var-env-func-init-global-update-non-configurable.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "language/eval-code/direct/var-env-global-lex-non-strict.js" +But got a runtime error: SyntaxError: Identifier 'x' has already been declared + +Expect to run correctly: "language/eval-code/direct/var-env-var-init-global-exstng.js" +But got a runtime error: Test262Error: descriptor should be enumerable; descriptor should not be configurable + +Expect to run correctly: "language/eval-code/direct/var-env-var-init-global-new.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "language/eval-code/indirect/non-definable-function-with-function.js" +But got a runtime error: Test262Error: declaration preceding Expected SameValue(«[object Object]», «undefined») to be true + +Expect to run correctly: "language/eval-code/indirect/non-definable-function-with-variable.js" +But got a runtime error: Test262Error: declaration preceding Expected SameValue(«[object Object]», «undefined») to be true + +Expect to run correctly: "language/eval-code/indirect/non-definable-global-function.js" +But got a runtime error: Test262Error: Expected a TypeError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/indirect/non-definable-global-generator.js" +But got a runtime error: Test262Error: Expected a TypeError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/eval-code/indirect/parse-failure-2.js" +But got a runtime error: SyntaxError: Unexpected end of input + +Expect to run correctly: "language/eval-code/indirect/var-env-func-init-global-new.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "language/eval-code/indirect/var-env-func-init-global-update-configurable.js" +But got a runtime error: Test262Error: descriptor should be enumerable; descriptor should be writable + +Expect to run correctly: "language/eval-code/indirect/var-env-func-init-global-update-non-configurable.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "language/eval-code/indirect/var-env-var-init-global-exstng.js" +But got a runtime error: Test262Error: descriptor should be enumerable; descriptor should not be configurable + +Expect to run correctly: "language/eval-code/indirect/var-env-var-init-global-new.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "language/expressions/addition/S11.6.1_A4_T9.js" +But got a runtime error: Test262Error: #2: (-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE === -Number.MAX_VALUE + (Number.MAX_VALUE + Number.MAX_VALUE). Actual: -1.7976931348623157e+3081.7976931348623157e+3081.7976931348623157e+308 + +Expect to run correctly: "language/expressions/assignment/S11.13.1_A5_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/assignment/S11.13.1_A5_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/assignment/S11.13.1_A5_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/assignment/S11.13.1_A6_T1.js" +But got a runtime error: Test262Error: #1: innerX === undefined. Actual: 1 + +Expect to run correctly: "language/expressions/assignment/S11.13.1_A6_T2.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 1 + +Expect to run correctly: "language/expressions/assignment/S11.13.1_A6_T3.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: 1 + +Expect to run correctly: "language/expressions/assignment/S11.13.1_A7_T3.js" +But got a runtime error: Test262Error: Expected a DummyError but got a Test262Error + +Expect to run correctly: "language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js" +But got a runtime error: Test262Error: Expected [source, iterator, target, target-key, iterator-step, iterator-done, target-key-tostring, set] and [source, iterator, target, target-key, target-key-tostring, iterator-step, iterator-done, set] to have the same contents. + +Expect to run correctly: "language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order.js" +But got a runtime error: Test262Error: Expected [source, source-key, source-key-tostring, target, target-key, get, target-key-tostring, set] and [source, source-key, source-key-tostring, target, target-key, target-key-tostring, get, set] to have the same contents. + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js" +But got a runtime error: TypeError: undefined is not a function + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js" +But got a runtime error: TypeError: undefined is not a function + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-iter-thrw-close-err.js" +But got a runtime error: Test262Error: Expected SameValue(«1», «0») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-iter-thrw-close.js" +But got a runtime error: Test262Error: Expected SameValue(«1», «0») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-lref-err.js" +But got a runtime error: Test262Error: Expected SameValue(«1», «0») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-array-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-array-yield-expr.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «86») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-valid.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «86») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-array.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «1») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-obj-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-obj-undefined-hole.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-obj-undefined-own.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-nested-obj.js" +But got a runtime error: Test262Error: Expected SameValue(«3», «2») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-put-prop-ref-no-get.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-put-prop-ref.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-yield-expr.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/expressions/assignment/dstr/array-rest-yield-ident-valid.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/expressions/assignment/fn-name-lhs-cover.js" +But got a runtime error: Test262Error: descriptor value should be ; object value should be + +Expect to run correctly: "language/expressions/async-generator/generator-created-after-decl-inst.js" +But got a runtime error: Test262Error: Expected SameValue(«[object AsyncGenerator]», «[object AsyncGenerator]») to be false + +Expect to run correctly: "language/expressions/call/eval-spread.js" +But got a runtime error: Test262Error: Expected SameValue(«local», «1») to be true + +Expect to run correctly: "language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/class/cpn-class-expr-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/expressions/class/cpn-class-expr-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/expressions/class/cpn-class-expr-computed-property-name-from-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/expressions/class/cpn-class-expr-fields-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/class/cpn-class-expr-fields-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/class/cpn-class-expr-fields-computed-property-name-from-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/expressions/class/decorator/syntax/class-valid/decorator-member-expr-private-identifier.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/decorator/syntax/valid/decorator-call-expr-identifier-reference-yield.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/decorator/syntax/valid/decorator-call-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/decorator/syntax/valid/decorator-member-expr-decorator-member-expr.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/decorator/syntax/valid/decorator-member-expr-identifier-reference-yield.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/decorator/syntax/valid/decorator-member-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/decorator/syntax/valid/decorator-parenthesized-expr-identifier-reference-yield.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/decorator/syntax/valid/decorator-parenthesized-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/expressions/class/elements/field-definition-accessor-no-line-terminator.js" +But got a runtime error: SyntaxError: Unexpected identifier + +Expect to run correctly: "language/expressions/class/elements/syntax/valid/grammar-field-accessor.js" +But got a runtime error: SyntaxError: Unexpected identifier + +Expect to run correctly: "language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-eval-indirect.js" +But got a runtime error: TypeError: _eval is not a constructor + +Expect to run correctly: "language/expressions/class/private-getter-brand-check-multiple-evaluations-of-class-eval.js" +But got a runtime error: TypeError: eval is not a constructor + +Expect to run correctly: "language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-eval-indirect.js" +But got a runtime error: TypeError: _eval is not a constructor + +Expect to run correctly: "language/expressions/class/private-method-brand-check-multiple-evaluations-of-class-eval.js" +But got a runtime error: TypeError: eval is not a constructor + +Expect to run correctly: "language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-eval-indirect.js" +But got a runtime error: TypeError: _eval is not a constructor + +Expect to run correctly: "language/expressions/class/private-setter-brand-check-multiple-evaluations-of-class-eval.js" +But got a runtime error: TypeError: eval is not a constructor + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.10_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.10_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.10_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.11_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 6. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.11_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 6. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.11_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 6. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.1_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 6. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.1_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 6. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.1_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 6. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.2_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.2_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.2_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.3_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.3_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.3_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.4_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.4_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.4_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.5_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.5_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.5_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.6_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 16. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.6_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 16. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.6_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 16. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.7_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.7_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.7_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.8_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.8_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.8_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 2. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.9_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.9_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A5.9_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.10_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 5 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.11_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 5 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.1_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 12 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.2_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 5 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.3_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 3 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.4_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 4 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.5_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 4 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.6_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 8 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.7_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 4 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.8_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 4 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A6.9_T1.js" +But got a runtime error: Test262Error: #1: innerX === 2. Actual: 1 + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.10_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.11_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.1_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.2_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.3_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.4_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.5_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.6_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.7_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.8_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/S11.13.2_A7.9_T4.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--1.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--11.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--13.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--15.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--17.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--19.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--21.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--3.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--5.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--7.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--9.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/division/S11.5.2_A4_T6.js" +But got a runtime error: Test262Error: #1.2: 1 / -Infinity === - 0. Actual: +0 + +Expect to run correctly: "language/expressions/division/S11.5.2_A4_T9.js" +But got a runtime error: Test262Error: #5: Number.MAX_VALUE / (Number.MAX_VALUE / 0.9) !== (Number.MAX_VALUE / Number.MAX_VALUE) / 0.9 + +Expect to run correctly: "language/expressions/dynamic-import/always-create-new-promise.js" +But got a runtime error: Test262Error: p1 constructor is %Promise% Expected SameValue(«function Promise() { [native code] }», «function Promise() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/eval-self-once-module.js" +But got a runtime error: Test262Error: global property was defined and incremented only once Expected SameValue(«2», «1») to be true + +Expect to run correctly: "language/expressions/dynamic-import/import-attributes/2nd-param-get-with-error.js" +But got a runtime error: Test262Error: Expected an error, but observed no error + +Expect to run correctly: "language/expressions/dynamic-import/import-attributes/2nd-param-with-enumeration-abrupt.js" +But got a runtime error: Test262Error: Expected promise to be rejected, but promise was fulfilled. + +Expect to run correctly: "language/expressions/dynamic-import/import-attributes/2nd-param-with-enumeration-enumerable.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/expressions/dynamic-import/import-attributes/2nd-param-with-non-object.js" +But got a runtime error: Test262Error: Promise for null was not rejected. + +Expect to run correctly: "language/expressions/dynamic-import/import-attributes/2nd-param-with-value-abrupt.js" +But got a runtime error: Test262Error: Expected promise to be rejected, but it was fulfilled + +Expect to run correctly: "language/expressions/dynamic-import/import-attributes/2nd-param-with-value-non-string.js" +But got a runtime error: Test262Error: Promise for undefined was not rejected. + +Expect to run correctly: "language/expressions/dynamic-import/imported-self-update.js" +But got a runtime error: Test262Error: updated value, direct binding Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/expressions/dynamic-import/indirect-resolution.js" +But got a runtime error: Test262Error: default is Promise instance Expected SameValue(«[object Promise]», «[object Promise]») to be true + +Expect to run correctly: "language/expressions/dynamic-import/returns-promise.js" +But got a runtime error: Test262Error: constructor is %Promise% Expected SameValue(«function Promise() { [native code] }», «function Promise() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/nested-with-expression-empty-str-is-valid-assign-expr.js" +But got a runtime error: Test262Error: Expected SameValue(«function then() { [native code] }», «function then() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/nested-with-expression-import-assertions-trailing-comma-first.js" +But got a runtime error: Test262Error: Expected SameValue(«function then() { [native code] }», «function then() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/nested-with-expression-import-assertions-trailing-comma-second.js" +But got a runtime error: Test262Error: Expected SameValue(«function then() { [native code] }», «function then() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/nested-with-expression-import-attributes-trailing-comma-first.js" +But got a runtime error: Test262Error: Expected SameValue(«function then() { [native code] }», «function then() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/nested-with-expression-import-attributes-trailing-comma-second.js" +But got a runtime error: Test262Error: Expected SameValue(«function then() { [native code] }», «function then() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/nested-with-expression-nested-imports.js" +But got a runtime error: Test262Error: Expected SameValue(«function then() { [native code] }», «function then() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/nested-with-expression-script-code-valid.js" +But got a runtime error: Test262Error: Expected SameValue(«function then() { [native code] }», «function then() { [native code] }») to be true + +Expect to run correctly: "language/expressions/dynamic-import/syntax/valid/new-covered-expression-is-valid.js" +But got a runtime error: SyntaxError: Cannot use new with import + +Expect to run correctly: "language/expressions/dynamic-import/usage-from-eval.js" +But got a runtime error: Test262Error: constructor is %Promise% Expected SameValue(«[object Promise]», «[object Promise]») to be true + +Expect to run correctly: "language/expressions/generators/generator-created-after-decl-inst.js" +But got a runtime error: Test262Error: Expected SameValue(«[object Generator]», «[object Generator]») to be false + +Expect to run correctly: "language/expressions/modulus/S11.5.3_A4_T2.js" +But got a runtime error: Test262Error: #1.2: 1 % 1 === + 0. Actual: -0 + +Expect to run correctly: "language/expressions/modulus/S11.5.3_A4_T5.js" +But got a runtime error: Test262Error: #5.2: 0 % Infinity === + 0. Actual: -0 + +Expect to run correctly: "language/expressions/modulus/S11.5.3_A4_T6.js" +But got a runtime error: Test262Error: #1.2: 0 % 1 === + 0. Actual: -0 + +Expect to run correctly: "language/expressions/multiplication/S11.5.1_A4_T2.js" +But got a runtime error: Test262Error: #5.2: 0 * 0 === + 0. Actual: -0 + +Expect to run correctly: "language/expressions/multiplication/S11.5.1_A4_T7.js" +But got a runtime error: Test262Error: #2.2: -0.1 * Number.MIN_VALUE === -0. Actual: +0 + +Expect to run correctly: "language/expressions/multiplication/S11.5.1_A4_T8.js" +But got a runtime error: Test262Error: #2: (Number.MAX_VALUE * 1.1) * 0.9 !== Number.MAX_VALUE * (1.1 * 0.9) + +Expect to run correctly: "language/expressions/object/__proto__-permitted-dup-shorthand.js" +But got a runtime error: SyntaxError: Duplicate __proto__ fields are not allowed in object literals + +Expect to run correctly: "language/expressions/object/cpn-obj-lit-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/object/cpn-obj-lit-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/object/cpn-obj-lit-computed-property-name-from-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/expressions/postfix-decrement/S11.3.2_A5_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/postfix-decrement/S11.3.2_A5_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/postfix-decrement/S11.3.2_A5_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/postfix-decrement/S11.3.2_A6_T3.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/postfix-decrement/operator-x-postfix-decrement-calls-putvalue-lhs-newvalue--1.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/postfix-increment/S11.3.1_A5_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/postfix-increment/S11.3.1_A5_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/postfix-increment/S11.3.1_A5_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/postfix-increment/S11.3.1_A6_T3.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/postfix-increment/operator-x-postfix-increment-calls-putvalue-lhs-newvalue--1.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/prefix-decrement/S11.4.5_A5_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/prefix-decrement/S11.4.5_A5_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/prefix-decrement/S11.4.5_A5_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 1. Actual: undefined + +Expect to run correctly: "language/expressions/prefix-decrement/S11.4.5_A6_T3.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/prefix-decrement/operator-prefix-decrement-x-calls-putvalue-lhs-newvalue--1.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/expressions/prefix-increment/S11.4.4_A5_T1.js" +But got a runtime error: Test262Error: #1: scope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/prefix-increment/S11.4.4_A5_T2.js" +But got a runtime error: Test262Error: #1: scope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/prefix-increment/S11.4.4_A5_T3.js" +But got a runtime error: Test262Error: #1: innerScope.x === 3. Actual: undefined + +Expect to run correctly: "language/expressions/prefix-increment/S11.4.4_A6_T3.js" +But got a runtime error: Test262Error: Expected true but got false + +Expect to run correctly: "language/expressions/prefix-increment/operator-prefix-increment-x-calls-putvalue-lhs-newvalue--1.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a TypeError + +Expect to run correctly: "language/global-code/decl-func.js" +But got a runtime error: Test262Error: descriptor should be enumerable; descriptor should not be configurable + +Expect to run correctly: "language/global-code/decl-lex-restricted-global.js" +But got a runtime error: SyntaxError: Identifier 'undefined' has already been declared + +Expect to run correctly: "language/global-code/decl-var.js" +But got a runtime error: Test262Error: descriptor should be enumerable + +Expect to run correctly: "language/identifiers/start-unicode-10.0.0-escaped.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/identifiers/start-unicode-10.0.0.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/identifiers/start-unicode-8.0.0-escaped.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/identifiers/start-unicode-8.0.0.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/identifiers/start-unicode-9.0.0-escaped.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/identifiers/start-unicode-9.0.0.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/import/import-attributes/json-extensibility-array.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-extensibility-object.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-idempotency.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-value-array.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-value-boolean.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-value-null.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-value-number.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-value-object.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-value-string.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/import/import-attributes/json-via-namespace.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/line-terminators/comment-multi-lf.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/line-terminators/comment-multi-ls.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/line-terminators/comment-multi-ps.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/line-terminators/comment-single-cr.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/line-terminators/comment-single-lf.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/line-terminators/comment-single-ls.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/line-terminators/comment-single-ps.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/module-code/eval-export-dflt-expr-err-eval.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/module-code/eval-export-dflt-expr-err-get-value.js" +But got a runtime error: ReferenceError: unresolvable is not defined + +Expect to run correctly: "language/module-code/eval-rqstd-abrupt.js" +But got a runtime error: TypeError + +Expect to run correctly: "language/module-code/eval-self-abrupt.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/module-code/eval-self-once.js" +But got a runtime error: Test262Error: global property initially unset Expected SameValue(«262», «undefined») to be true + +Expect to run correctly: "language/module-code/import-attributes/allow-nlt-before-with.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/module-code/import-attributes/import-attribute-empty.js" +But got a runtime error: SyntaxError: Unexpected token 'with' + +Expect to run correctly: "language/module-code/instn-iee-bndng-cls.js" +But got a runtime error: ReferenceError: Cannot access 'results' before initialization + +Expect to run correctly: "language/module-code/instn-iee-bndng-const.js" +But got a runtime error: ReferenceError: Cannot access 'results' before initialization + +Expect to run correctly: "language/module-code/instn-iee-bndng-fun.js" +But got a runtime error: ReferenceError: Cannot access 'results' before initialization + +Expect to run correctly: "language/module-code/instn-iee-bndng-gen.js" +But got a runtime error: ReferenceError: Cannot access 'results' before initialization + +Expect to run correctly: "language/module-code/instn-iee-bndng-let.js" +But got a runtime error: ReferenceError: Cannot access 'results' before initialization + +Expect to run correctly: "language/module-code/instn-iee-bndng-var.js" +But got a runtime error: ReferenceError: Cannot access 'results' before initialization + +Expect to run correctly: "language/module-code/instn-named-bndng-cls.js" +But got a runtime error: Test262Error: binding is created but not initialized Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/instn-named-bndng-const.js" +But got a runtime error: Test262Error: binding is created but not initialized Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/instn-named-bndng-dflt-cls.js" +But got a runtime error: Test262Error: Binding is created but not initialized. Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/instn-named-bndng-dflt-expr.js" +But got a runtime error: Test262Error: binding is created but not initialized Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/instn-named-bndng-dflt-named.js" +But got a runtime error: Test262Error: Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/instn-named-bndng-dflt-star.js" +But got a runtime error: Test262Error: Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/instn-named-bndng-let.js" +But got a runtime error: Test262Error: binding is created but not initialized Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/instn-named-bndng-trlng-comma.js" +But got a runtime error: Test262Error: binding is initialized to `undefined` prior to module evaulation Expected SameValue(«23», «undefined») to be true + +Expect to run correctly: "language/module-code/instn-named-bndng-var.js" +But got a runtime error: Test262Error: binding is initialized to `undefined` prior to module evaulation Expected SameValue(«23», «undefined») to be true + +Expect to run correctly: "language/module-code/namespace/internals/delete-exported-uninit.js" +But got a runtime error: Test262Error: binding unmodified: local1 Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/namespace/internals/enumerate-binding-uninit.js" +But got a runtime error: Test262Error: Expected a ReferenceError but got a Test262Error + +Expect to run correctly: "language/module-code/namespace/internals/get-own-property-str-found-uninit.js" +But got a runtime error: Test262Error: hasOwnProperty: local1 Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/namespace/internals/get-str-found-uninit.js" +But got a runtime error: Test262Error: Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/namespace/internals/object-hasOwnProperty-binding-uninit.js" +But got a runtime error: Test262Error: Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/namespace/internals/object-keys-binding-uninit.js" +But got a runtime error: Test262Error: Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/namespace/internals/object-propertyIsEnumerable-binding-uninit.js" +But got a runtime error: Test262Error: Expected a ReferenceError to be thrown but no exception was thrown at all + +Expect to run correctly: "language/module-code/top-level-await/await-dynamic-import-rejection.js" +But got a runtime error: TypeError: I reject this! + +Expect to run correctly: "language/module-code/top-level-await/module-import-rejection-body.js" +But got a runtime error: TypeError: I reject this! + +Expect to run correctly: "language/module-code/top-level-await/module-import-rejection-tick.js" +But got a runtime error: RangeError + +Expect to run correctly: "language/module-code/top-level-await/module-import-rejection.js" +But got a runtime error: TypeError: error in the default export line + +Expect to run correctly: "language/module-code/verify-dfs.js" +But got a runtime error: Test262Error: Expected SameValue(«B», «A») to be true + +Expect to run correctly: "language/statements/async-generator/generator-created-after-decl-inst.js" +But got a runtime error: Test262Error: Expected SameValue(«[object AsyncGenerator]», «[object AsyncGenerator]») to be false + +Expect to run correctly: "language/statements/async-generator/yield-star-promise-not-unwrapped.js" +But got a runtime error: Test262Error: yield* should not unwrap promises from manually-implemented async iterators Expected SameValue(«unwrapped value», «[object Promise]») to be true + +Expect to run correctly: "language/statements/async-generator/yield-star-return-then-getter-ticks.js" +But got a runtime error: Test262Error: Expected [start, tick 1, tick 2, get then, tick 3, get return, get then] and [start, tick 1, get then, tick 2, get return, get then, tick 3] to have the same contents. Ticks for return with thenable getter + +Expect to run correctly: "language/statements/class/cpn-class-decl-accessors-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/statements/class/cpn-class-decl-accessors-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/statements/class/cpn-class-decl-accessors-computed-property-name-from-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/statements/class/cpn-class-decl-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/statements/class/cpn-class-decl-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/statements/class/cpn-class-decl-computed-property-name-from-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/statements/class/cpn-class-decl-fields-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/statements/class/cpn-class-decl-fields-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/statements/class/cpn-class-decl-fields-computed-property-name-from-function-expression.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «1») to be true + +Expect to run correctly: "language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-async-arrow-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-function-expression.js" +But got a runtime error: TypeError: c[(intermediate value)] is not a function + +Expect to run correctly: "language/statements/class/decorator/syntax/class-valid/decorator-member-expr-private-identifier.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/class-element-decorator-call-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/class-element-decorator-member-expr-decorator-member-expr.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/class-element-decorator-member-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/class-element-decorator-parenthesized-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/decorator-call-expr-identifier-reference-yield.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/decorator-call-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/decorator-member-expr-decorator-member-expr.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/decorator-member-expr-identifier-reference-yield.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/decorator-member-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/decorator-parenthesized-expr-identifier-reference-yield.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/decorator/syntax/valid/decorator-parenthesized-expr-identifier-reference.js" +But got a runtime error: SyntaxError: Invalid or unexpected token + +Expect to run correctly: "language/statements/class/elements/field-definition-accessor-no-line-terminator.js" +But got a runtime error: SyntaxError: Unexpected identifier + +Expect to run correctly: "language/statements/class/elements/syntax/valid/grammar-field-accessor.js" +But got a runtime error: SyntaxError: Unexpected identifier + +Expect to run correctly: "language/statements/class/subclass/default-constructor-spread-override.js" +But got a runtime error: Test262Error: @@iterator invoked + +Expect to run correctly: "language/statements/class/subclass/derived-class-return-override-catch-finally-arrow.js" +But got a runtime error: ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor + +Expect to run correctly: "language/statements/class/subclass/derived-class-return-override-catch-finally.js" +But got a runtime error: ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor + +Expect to run correctly: "language/statements/class/subclass/derived-class-return-override-finally-super-arrow.js" +But got a runtime error: ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor + +Expect to run correctly: "language/statements/class/subclass/derived-class-return-override-finally-super.js" +But got a runtime error: ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor + +Expect to run correctly: "language/statements/class/subclass/derived-class-return-override-for-of-arrow.js" +But got a runtime error: ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor + +Expect to run correctly: "language/statements/const/global-use-before-initialization-in-declaration-statement.js" +But got a runtime error: ReferenceError: Cannot access 'x' before initialization + +Expect to run correctly: "language/statements/const/global-use-before-initialization-in-prior-statement.js" +But got a runtime error: ReferenceError: Cannot access 'x' before initialization + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-nested-array-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-nested-array-yield-ident-valid.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «86») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-nested-array.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «1») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-nested-obj-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-nested-obj-undefined-hole.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-nested-obj-undefined-own.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-nested-obj.js" +But got a runtime error: Test262Error: Expected SameValue(«3», «2») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-put-prop-ref-no-get.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-put-prop-ref.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-await-of/async-func-decl-dstr-array-rest-yield-ident-valid.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-array-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-array-yield-expr.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «86») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-array.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «1») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-obj-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-obj-undefined-hole.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-obj-undefined-own.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-nested-obj.js" +But got a runtime error: Test262Error: Expected SameValue(«3», «2») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-put-prop-ref-no-get.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-put-prop-ref.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-await-of/async-gen-decl-dstr-array-rest-yield-expr.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js" +But got a runtime error: TypeError: undefined is not a function + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js" +But got a runtime error: TypeError: undefined is not a function + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-iter-rtrn-close.js" +But got a runtime error: Test262Error: + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-iter-thrw-close-err.js" +But got a runtime error: Test262Error: Expected SameValue(«1», «0») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-iter-thrw-close.js" +But got a runtime error: Test262Error: Expected SameValue(«1», «0») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-lref-err.js" +But got a runtime error: Test262Error: Expected SameValue(«1», «0») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-array-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-array-yield-expr.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «86») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-array-yield-ident-valid.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «86») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-array.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «1») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-obj-null.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «null») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-obj-undefined-hole.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-obj-undefined-own.js" +But got a runtime error: Test262Error: Expected SameValue(«0», «1») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-nested-obj.js" +But got a runtime error: Test262Error: Expected SameValue(«3», «2») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-put-prop-ref-no-get.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-put-prop-ref.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-yield-expr.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-of/dstr/array-rest-yield-ident-valid.js" +But got a runtime error: Test262Error: Expected SameValue(«2», «3») to be true + +Expect to run correctly: "language/statements/for-of/head-lhs-async-escaped.js" +But got a runtime error: SyntaxError: The left-hand side of a for-of loop may not be 'async'. + +Expect to run correctly: "language/statements/for-of/head-lhs-async-parens.js" +But got a runtime error: SyntaxError: The left-hand side of a for-of loop may not be 'async'. + +Expect to run correctly: "language/statements/for-of/string-astral-truncated.js" +But got a runtime error: Test262Error: Expected SameValue(«\», «\ud801») to be true + +Expect to run correctly: "language/statements/generators/generator-created-after-decl-inst.js" +But got a runtime error: Test262Error: Expected SameValue(«[object Generator]», «[object Generator]») to be false + +Expect to run correctly: "language/statements/let/global-use-before-initialization-in-declaration-statement.js" +But got a runtime error: ReferenceError: Cannot access 'x' before initialization + +Expect to run correctly: "language/statements/let/global-use-before-initialization-in-prior-statement.js" +But got a runtime error: ReferenceError: Cannot access 'x' before initialization + +Expect to run correctly: "language/statements/return/S12.9_A4.js" +But got a runtime error: Test262Error: #1: return Expression yields to Return (return, GetValue(Evaluate Expression), empty) + +Expect to run correctly: "language/statements/switch/scope-lex-async-function.js" +But got a runtime error: ReferenceError: x is not defined + +Expect to run correctly: "language/statements/switch/scope-lex-async-generator.js" +But got a runtime error: ReferenceError: x is not defined + +Expect to run correctly: "language/statements/switch/scope-lex-class.js" +But got a runtime error: ReferenceError: x is not defined + +Expect to run correctly: "language/statements/switch/scope-lex-const.js" +But got a runtime error: ReferenceError: x is not defined + +Expect to run correctly: "language/statements/switch/scope-lex-generator.js" +But got a runtime error: ReferenceError: x is not defined + +Expect to run correctly: "language/statements/switch/scope-lex-let.js" +But got a runtime error: ReferenceError: f is not defined + +Expect to run correctly: "language/statements/variable/binding-resolution.js" +But got a runtime error: Test262Error: Expected SameValue(«undefined», «true») to be true + +Expect to run correctly: "staging/JSON/json-parse-with-source-snapshot.js" +But got a runtime error: TypeError: Cannot destructure property 'source' of 'undefined' as it is undefined. + +Expect to run correctly: "staging/JSON/json-parse-with-source.js" +But got a runtime error: TypeError: Cannot destructure property 'source' of 'undefined' as it is undefined. + diff --git a/tasks/coverage/src/lib.rs b/tasks/coverage/src/lib.rs index c44c1fbdadc2a..03e422a3ae14b 100644 --- a/tasks/coverage/src/lib.rs +++ b/tasks/coverage/src/lib.rs @@ -2,11 +2,15 @@ mod babel; mod codegen; mod minifier; mod misc; +mod runtime; mod suite; mod test262; mod typescript; -use std::path::PathBuf; +use std::{path::PathBuf, process::Command}; + +use runtime::CodegenRuntimeTest262Case; +use similar::DiffableStr; use crate::{ babel::{BabelCase, BabelSuite}, @@ -40,6 +44,7 @@ impl AppArgs { pub fn run_all(&self) { self.run_parser(); self.run_codegen(); + self.run_codegen_runtime(); self.run_minifier(); } @@ -57,6 +62,24 @@ impl AppArgs { MiscSuite::::new().run("codegen_misc", self); } + /// # Panics + pub fn run_codegen_runtime(&self) { + // Run runtime.js to test codegen runtime + let mut runtime_process = Command::new("node") + .args([ + "--experimental-vm-modules", + project_root() + .join("tasks/coverage/src/runtime/runtime.js") + .to_string_lossy() + .as_str() + .unwrap_or_default(), + ]) + .spawn() + .expect("Run runtime.js failed"); + Test262Suite::::new().run("codegen_runtime_test262", self); + let _ = runtime_process.kill(); + } + pub fn run_minifier(&self) { Test262Suite::::new().run("minifier_test262", self); BabelSuite::::new().run("minifier_babel", self); diff --git a/tasks/coverage/src/main.rs b/tasks/coverage/src/main.rs index fcfc67ab20712..8e1c695983884 100644 --- a/tasks/coverage/src/main.rs +++ b/tasks/coverage/src/main.rs @@ -24,6 +24,7 @@ fn main() { match task { "parser" => args.run_parser(), "codegen" => args.run_codegen(), + "codegen-runtime" => args.run_codegen_runtime(), "minifier" => args.run_minifier(), _ => args.run_all(), }; diff --git a/tasks/coverage/src/runtime/mod.rs b/tasks/coverage/src/runtime/mod.rs new file mode 100644 index 0000000000000..943e0989b3449 --- /dev/null +++ b/tasks/coverage/src/runtime/mod.rs @@ -0,0 +1,161 @@ +use std::{ + path::{Path, PathBuf}, + time::Duration, +}; + +use oxc_tasks_common::{agent, project_root}; +use phf::{phf_set, Set}; + +use oxc_allocator::Allocator; +use oxc_codegen::{Codegen, CodegenOptions}; +use oxc_parser::Parser; +use oxc_span::SourceType; +use serde_json::json; + +use crate::{ + suite::{Case, TestResult}, + test262::{Test262Case, TestFlag}, +}; + +static SKIP_EVALUATING_FEATURES: Set<&'static str> = phf_set! { + // Node's version of V8 doesn't implement these + "hashbang", + "legacy-regexp", + "regexp-duplicate-named-groups", + "symbols-as-weakmap-keys", + "tail-call-optimization", + + // We don't care about API-related things + "ArrayBuffer", + "change-array-by-copy", + "DataView", + "resizable-arraybuffer", + "ShadowRealm", + "cross-realm", + "SharedArrayBuffer", + "String.prototype.toWellFormed", + "Symbol.match", + "Symbol.replace", + "Symbol.unscopables", + "Temporal", + "TypedArray", + + // Added in oxc + "Array.fromAsync", + "IsHTMLDDA", + "iterator-helpers", + "set-methods", + "array-grouping", + + // stage 2 + "Intl.DurationFormat" +}; + +static SKIP_EVALUATING_THESE_INCLUDES: phf::Set<&'static str> = phf_set! { + // We don't preserve "toString()" on functions + "nativeFunctionMatcher.js", +}; + +const FIXTURES_PATH: &str = "tasks/coverage/test262/test"; + +pub struct CodegenRuntimeTest262Case { + base: Test262Case, + test_root: PathBuf, +} + +impl Case for CodegenRuntimeTest262Case { + fn new(path: PathBuf, code: String) -> Self { + Self { base: Test262Case::new(path, code), test_root: project_root().join(FIXTURES_PATH) } + } + + fn code(&self) -> &str { + self.base.code() + } + + fn path(&self) -> &Path { + self.base.path() + } + + fn test_result(&self) -> &TestResult { + self.base.test_result() + } + + fn skip_test_case(&self) -> bool { + self.base.should_fail() + || self + .base + .meta() + .includes + .iter() + .any(|include| SKIP_EVALUATING_THESE_INCLUDES.contains(include)) + || self + .base + .meta() + .features + .iter() + .any(|feature| SKIP_EVALUATING_FEATURES.contains(feature)) + || self.base.code().contains("$262") + || self.base.code().contains("$DONOTEVALUATE()") + } + + fn run(&mut self) { + let result = { + let source_text = self.base.code(); + let is_module = self.base.meta().flags.contains(&TestFlag::Module); + let is_only_strict = self.base.meta().flags.contains(&TestFlag::OnlyStrict); + let source_type = SourceType::default() + .with_module(is_module) + .with_always_strict(self.base.meta().flags.contains(&TestFlag::OnlyStrict)); + let allocator = Allocator::default(); + let program = Parser::new(&allocator, source_text, source_type).parse().program; + let mut codegen_source_text = + Codegen::::new(source_text.len(), CodegenOptions).build(&program); + if is_only_strict { + codegen_source_text = format!("\"use strict\";\n{codegen_source_text}"); + } + if is_module { + codegen_source_text = format!("{codegen_source_text}\n export {{}}"); + } + + self.run_test_code(codegen_source_text.as_str()) + }; + self.base.set_result(result); + } +} + +impl CodegenRuntimeTest262Case { + fn run_test_code(&self, codegen_text: &str) -> TestResult { + let is_async = self.base.meta().flags.contains(&TestFlag::Async); + let is_module = self.base.meta().flags.contains(&TestFlag::Module); + let is_raw = self.base.meta().flags.contains(&TestFlag::Raw); + let import_dir = self + .test_root + .join(self.base.path().parent().map_or_else(|| unreachable!(), |p| p)) + .to_string_lossy() + .to_string(); + let result = agent() + .post("http://localhost:32055/run") + .timeout(Duration::from_secs(10)) + .send_json(&json!({ + "code": codegen_text, + "includes": self.base.meta().includes, + "isAsync": is_async, + "isModule": is_module, + "isRaw": is_raw, + "importDir": import_dir + })) + .map(|res| res.into_string().unwrap_or_default()); + + if let Err(error) = result { + TestResult::RuntimeError(error.to_string()) + } else if let Ok(output) = result { + if output.is_empty() { + TestResult::Passed + } else { + TestResult::RuntimeError(output) + } + } else { + unreachable!() + } + } +} diff --git a/tasks/coverage/src/runtime/package.json b/tasks/coverage/src/runtime/package.json new file mode 100644 index 0000000000000..bb34440a36529 --- /dev/null +++ b/tasks/coverage/src/runtime/package.json @@ -0,0 +1 @@ +{ "type": "module" } \ No newline at end of file diff --git a/tasks/coverage/src/runtime/runtime.js b/tasks/coverage/src/runtime/runtime.js new file mode 100644 index 0000000000000..fff7752f33b10 --- /dev/null +++ b/tasks/coverage/src/runtime/runtime.js @@ -0,0 +1,142 @@ +import vm from "node:vm" +import path from "node:path" +import fs from "node:fs" +import { createServer } from "node:http"; + +const __dirname = path.dirname(new URL(import.meta.url).pathname); +const harnessDir = path.join(__dirname, '../..', 'test262', 'harness') + + +const { Script, createContext, SourceTextModule, runInContext, SyntheticModule } = vm + +async function runCodeInHarness(options = {}) { + const { code = "", includes = [], importDir = "", isAsync = false, isModule = true, isRaw = false } = options + const context = {} + + // See: https://github.com/nodejs/node/issues/36351 + const unique = () => '//' + Math.random() + + const runCode = async () => { + const moduleCache = new Map + const dynamicImportCache = new Map + + const findModule = (modulePath) => { + let module = moduleCache.get(modulePath) + if (!module) { + const code = fs.readFileSync(modulePath, 'utf8') + if (modulePath.endsWith('json')) { + const evaluate = function () { + this.setExport('default', runInContext('JSON.parse', context)(code)) + } + module = new SyntheticModule(['default'], evaluate, { context }) + } else { + module = new SourceTextModule(code + unique(), { context, importModuleDynamically }) + } + moduleCache.set(modulePath, module) + } + return module + } + + const linker = (specifier, referencingModule) => { + return findModule(path.join(importDir, specifier)) + } + + const importModuleDynamically = (specifier, script) => { + const where = path.join(importDir, specifier) + let promise = dynamicImportCache.get(where) + if (!promise) { + const module = findModule(where) + if (module.status === 'unlinked') { + promise = module.link(linker) + .then(() => module.evaluate()) + .then(() => module) + } else { + promise = Promise.resolve(module) + } + dynamicImportCache.set(where, promise) + } + return promise + } + + createContext(context) + if (!isRaw) runInContext(createHarnessForTest(includes), context) + + if (isModule) { + const module = new SourceTextModule(code + unique(), { context, importModuleDynamically }) + await module.link(linker) + await module.evaluate() + } else { + const script = new Script(code, { importModuleDynamically }) + script.runInContext(context) + } + } + + if (isAsync) { + await new Promise((resolve, reject) => { + context.$DONE = err => err ? reject(err) : resolve() + runCode().catch(reject) + }) + } else { + await runCode() + } +} + +const harnessFiles = new Map +let defaultHarness = '' + +for (const entry of fs.readdirSync(harnessDir)) { + if (entry.startsWith('.') || !entry.endsWith('.js')) { + continue + } + const file = path.join(harnessDir, entry) + const content = fs.readFileSync(file, 'utf8') + if (entry === 'assert.js' || entry === 'sta.js') { + defaultHarness += content + continue + } + harnessFiles.set(entry, content) +} + +function createHarnessForTest(includes) { + let harness = defaultHarness + + if (includes) { + for (const include of includes) { + const content = harnessFiles.get(include) + if (!content) throw new Error(`Included file is missing: ${include}`) + harness += content + } + } + + return harness +} + +const server = createServer((req, res) => { + if (req.method === 'POST') { + let body = ''; + req.on('data', chunk => { + body += chunk.toString(); // convert Buffer to string + }); + req.on('end', async () => { + const options = JSON.parse(body) + let result + try { + result = await runCodeInHarness(options); + } catch (err) { + res.end(err.toString()); + } + + // res.setHeader('Content-Type', 'application/json'); + res.end(); + }); + } else { + res.statusCode = 404; + res.end('Not Found'); + } +}); + +process.on('unhandledRejection', () => { + // Don't exit when a test does this +}) + +server.listen(32055, () => {}); \ No newline at end of file diff --git a/tasks/coverage/src/suite.rs b/tasks/coverage/src/suite.rs index b5c8ad49987ef..a3cd02903efae 100644 --- a/tasks/coverage/src/suite.rs +++ b/tasks/coverage/src/suite.rs @@ -31,6 +31,7 @@ pub enum TestResult { Mismatch(String, String), ParseError(String, /* panicked */ bool), CorrectError(String, /* panicked */ bool), + RuntimeError(String), } pub struct CoverageReport<'a, T> { @@ -343,6 +344,13 @@ pub trait Case: Sized + Sync + Send + UnwindSafe { println!("Mismatch: {:?}", normalize_path(self.path())); } } + TestResult::RuntimeError(error) => { + writer.write_all( + format!("Expect to run correctly: {:?}\n", normalize_path(self.path())) + .as_bytes(), + )?; + writer.write_all(format!("But got a runtime error: {error}\n\n").as_bytes())?; + } TestResult::IncorrectlyPassed => { writer.write_all( format!("Expect Syntax Error: {:?}\n", normalize_path(self.path())).as_bytes(), diff --git a/website/playground/index.js b/website/playground/index.js index 6d018da70274a..601071fce3433 100644 --- a/website/playground/index.js +++ b/website/playground/index.js @@ -34,7 +34,7 @@ import initWasm, { OxcParserOptions, OxcLinterOptions, OxcMinifierOptions, - OxcFormatterOptions, + OxcCodegenOptions, OxcTypeCheckingOptions, graphql_schema_text, } from "@oxc/wasm-web"; @@ -87,7 +87,7 @@ class Playground { runOptions; parserOptions; - formatterOptions; + codegenOptions; linterOptions; minifierOptions; @@ -118,7 +118,7 @@ class Playground { this.oxc = new Oxc(); this.runOptions = new OxcRunOptions(); this.parserOptions = new OxcParserOptions(); - this.formatterOptions = new OxcFormatterOptions(); + this.codegenOptions = new OxcCodegenOptions(); this.linterOptions = new OxcLinterOptions(); this.minifierOptions = new OxcMinifierOptions(); this.typeCheckOptions = new OxcTypeCheckingOptions(); @@ -466,7 +466,7 @@ class Playground { this.runOptions, this.parserOptions, this.linterOptions, - this.formatterOptions, + this.codegenOptions, this.minifierOptions, this.typeCheckOptions );