feat: Promise 静态方法(all/race/allSettled/any + AggregateError)+ async test262 解锁
- Promise.all/race/allSettled/any:共享聚合核心,逐元素 C.resolve + Invoke(then), 共享记录对象承载剩余计数/结果数组/能力闭包,元素处理器按模式结算 - AggregateError 内建(构造器 + prototype,Promise.any 拒绝路径依赖) - 修复 capability_executor:能力已持有非 undefined 值时二次调用抛 TypeError - test262 runner:移除 async flag 无条件 skip;解锁 asyncHelpers/promiseHelper/ doneprintHandle harness;注入 print 捕获 + ,run() 后按 marker 判定 - 排除 await-dictionary(Promise.allKeyed/allSettledKeyed 2025 proposal)特性 - iterator 遍历辅助改 pub 供 oxide_vm 复用
This commit is contained in:
@@ -437,7 +437,7 @@ pub(crate) fn close_iterator<H: VmHost>(vm: &mut H, iterator: JsValue) {
|
||||
/// # 返回值
|
||||
/// - `Ok(())`:迭代完成;
|
||||
/// - `Err`:迭代或回调抛出的原异常值(任意类型)。
|
||||
pub(crate) fn iterate_elements<H: VmHost, F>(vm: &mut H, iterable: JsValue, mut on_elem: F) -> Result<(), JsValue>
|
||||
pub fn iterate_elements<H: VmHost, F>(vm: &mut H, iterable: JsValue, mut on_elem: F) -> Result<(), JsValue>
|
||||
where
|
||||
F: FnMut(&mut H, JsValue) -> Result<(), JsValue>,
|
||||
{
|
||||
@@ -451,7 +451,7 @@ where
|
||||
///
|
||||
/// # 副作用
|
||||
/// 迭代或回调抛错时调用迭代器的 `return()`(IteratorClose)后透传原异常。
|
||||
pub(crate) fn iterate_iterator<H: VmHost, F>(vm: &mut H, iterator: JsValue, mut on_elem: F) -> Result<(), JsValue>
|
||||
pub fn iterate_iterator<H: VmHost, F>(vm: &mut H, iterator: JsValue, mut on_elem: F) -> Result<(), JsValue>
|
||||
where
|
||||
F: FnMut(&mut H, JsValue) -> Result<(), JsValue>,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user