/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/objects/js-promise.tq
40 строк
1 KB
Michaël Zasso
deps: update V8 to 13.0.245.25
31 янв 2025, 14:45
Не верифицирован
31 янв 2025, 14:45
5edec0e
Код
Авторство
О чём код?
// Copyright 2019 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. bitfield struct JSPromiseFlags extends uint31 { status: PromiseState: 2 bit; has_handler: bool: 1 bit; is_silent: bool: 1 bit; async_task_id: uint32: 27 bit; } extern class JSPromise extends JSObjectWithEmbedderSlots { macro Status(): PromiseState { return this.flags.status; } macro SetStatus(status: constexpr PromiseState): void { dcheck(this.Status() == PromiseState::kPending); dcheck(status != PromiseState::kPending); this.flags.status = status; } macro HasHandler(): bool { return this.flags.has_handler; } macro SetHasHandler(): void { this.flags.has_handler = true; } // Smi 0 terminated list of PromiseReaction objects in case the JSPromise was // not settled yet, otherwise the result. reactions_or_result: Zero|PromiseReaction|JSAny; flags: SmiTagged<JSPromiseFlags>; } @doNotGenerateCast extern class JSPromiseConstructor extends JSFunction generates 'TNode<JSFunction>';