Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 97 additions & 1 deletion CLAUDE.md

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ opt-level = "s" # Optimize for size in stdlib
opt-level = 3

[workspace.package]
version = "0.5.370"
version = "0.5.371"
edition = "2021"
license = "MIT"
repository = "https://github.com/PerryTS/perry"
Expand Down
2 changes: 2 additions & 0 deletions crates/perry-codegen/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ pub fn compile_module(hir: &HirModule, opts: CompileOptions) -> Result<Vec<u8>>
body: Vec::new(),
is_async: false,
is_generator: false,
was_plain_async: false,
is_exported: false,
captures: Vec::new(),
decorators: Vec::new(),
Expand Down Expand Up @@ -1389,6 +1390,7 @@ pub fn compile_module(hir: &HirModule, opts: CompileOptions) -> Result<Vec<u8>>
body: ctor_body.1,
is_async: false,
is_generator: false,
was_plain_async: false,
is_exported: false,
captures: ctor_body.2,
decorators: Vec::new(),
Expand Down
6 changes: 6 additions & 0 deletions crates/perry-hir/src/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,12 @@ pub struct Function {
pub captures: Vec<LocalId>,
/// Decorators applied to this function/method
pub decorators: Vec<Decorator>,
/// Issue #256: true if this function was originally a plain async function
/// that the async_to_generator pre-pass rewrote into a generator. The
/// generator state-machine transform reads this flag and wraps the
/// resulting iterator in an async-step driver so the function returns
/// a Promise that respects spec microtask ordering.
pub was_plain_async: bool,
}

/// A function parameter
Expand Down
1 change: 1 addition & 0 deletions crates/perry-hir/src/lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ impl LoweringContext {
body: ctor_body,
is_async: false,
is_generator: false,
was_plain_async: false,
is_exported: false,
captures: Vec::new(),
decorators: Vec::new(),
Expand Down
1 change: 1 addition & 0 deletions crates/perry-hir/src/lower/expr_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ pub(super) fn lower_object(ctx: &mut LoweringContext, obj: &ast::ObjectLit) -> R
body,
is_async: method.function.is_async,
is_generator: false,
was_plain_async: false,
is_exported: false,
captures: Vec::new(),
decorators: Vec::new(),
Expand Down
Loading
Loading