2021-11-27 12:46:43 +00:00
|
|
|
set(AC97_DEBUG ON)
|
2021-01-23 22:29:11 +00:00
|
|
|
set(ACPI_DEBUG ON)
|
2021-02-26 04:25:45 +00:00
|
|
|
set(AHCI_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(APIC_DEBUG ON)
|
|
|
|
set(APIC_SMP_DEBUG ON)
|
|
|
|
set(ARP_DEBUG ON)
|
2021-11-26 17:39:26 +00:00
|
|
|
set(ATA_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(AWAVLOADER_DEBUG ON)
|
2021-06-24 21:32:06 +00:00
|
|
|
set(AFLACLOADER_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(BBFS_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(BMP_DEBUG ON)
|
|
|
|
set(BXVGA_DEBUG ON)
|
|
|
|
set(CACHE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(CALLBACK_MACHINE_DEBUG ON)
|
2022-03-04 17:50:23 +00:00
|
|
|
set(CANVAS_RENDERING_CONTEXT_2D_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(COMMIT_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(COMPOSE_DEBUG ON)
|
|
|
|
set(CONTEXT_SWITCH_DEBUG ON)
|
|
|
|
set(CONTIGUOUS_VMOBJECT_DEBUG ON)
|
|
|
|
set(COPY_DEBUG ON)
|
|
|
|
set(CPP_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(CPP_LANGUAGE_SERVER_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(CRYPTO_DEBUG ON)
|
|
|
|
set(CSOCKET_DEBUG ON)
|
|
|
|
set(CSS_LOADER_DEBUG ON)
|
2021-07-23 12:06:31 +00:00
|
|
|
set(CSS_PARSER_DEBUG ON)
|
|
|
|
set(CSS_TOKENIZER_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(CURSOR_TOOL_DEBUG ON)
|
|
|
|
set(DDS_DEBUG ON)
|
|
|
|
set(DEBUG_AUTOCOMPLETE ON)
|
|
|
|
set(DEBUG_CPP_LANGUAGE_SERVER ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(DEFERRED_INVOKE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(DHCPV4CLIENT_DEBUG ON)
|
|
|
|
set(DHCPV4_DEBUG ON)
|
|
|
|
set(DIFF_DEBUG ON)
|
|
|
|
set(DISASM_DUMP_DEBUG ON)
|
|
|
|
set(DOUBLECLICK_DEBUG ON)
|
2022-01-09 22:35:42 +00:00
|
|
|
set(DRAG_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(DWARF_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(DYNAMIC_LOAD_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(E1000_DEBUG ON)
|
2021-06-04 07:11:37 +00:00
|
|
|
set(E1000E_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(EDITOR_DEBUG ON)
|
|
|
|
set(ELF_IMAGE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(EMOJI_DEBUG ON)
|
|
|
|
set(ESCAPE_SEQUENCE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(ETHERNET_DEBUG ON)
|
|
|
|
set(ETHERNET_VERY_DEBUG ON)
|
|
|
|
set(EVENT_DEBUG ON)
|
|
|
|
set(EVENTLOOP_DEBUG ON)
|
|
|
|
set(EXEC_DEBUG ON)
|
2021-03-11 18:22:13 +00:00
|
|
|
set(EXT2_BLOCKLIST_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(EXT2_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(EXT2_VERY_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(FILE_CONTENT_DEBUG ON)
|
|
|
|
set(FILEDESCRIPTION_DEBUG ON)
|
|
|
|
set(FILE_WATCHER_DEBUG ON)
|
|
|
|
set(FILL_PATH_DEBUG ON)
|
|
|
|
set(FORK_DEBUG ON)
|
|
|
|
set(FRAMEBUFFER_DEVICE_DEBUG ON)
|
|
|
|
set(FUTEX_DEBUG ON)
|
|
|
|
set(FUTEXQUEUE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(GEMINI_DEBUG ON)
|
|
|
|
set(GEMINIJOB_DEBUG ON)
|
|
|
|
set(GENERATE_DEBUG_CODE ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(GHASH_PROCESS_DEBUG ON)
|
|
|
|
set(GIF_DEBUG ON)
|
|
|
|
set(GL_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(GLOBAL_DTORS_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(GPT_DEBUG ON)
|
|
|
|
set(GZIP_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(HEAP_DEBUG ON)
|
2021-05-20 12:27:58 +00:00
|
|
|
set(HEARTS_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(HEX_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(HIGHLIGHT_FOCUSED_FRAME_DEBUG ON)
|
|
|
|
set(HPET_COMPARATOR_DEBUG ON)
|
|
|
|
set(HPET_DEBUG ON)
|
2021-01-28 20:31:20 +00:00
|
|
|
set(HTML_SCRIPT_DEBUG ON)
|
2022-01-22 16:55:29 +00:00
|
|
|
set(HTTPJOB_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(HTTPSJOB_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(HUNKS_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(ICMP_DEBUG ON)
|
|
|
|
set(ICO_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(IMAGE_DECODER_DEBUG ON)
|
|
|
|
set(IMAGE_LOADER_DEBUG ON)
|
2021-04-12 19:07:30 +00:00
|
|
|
set(INTEL_GRAPHICS_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(INTERRUPT_DEBUG ON)
|
|
|
|
set(IOAPIC_DEBUG ON)
|
|
|
|
set(IO_DEBUG ON)
|
|
|
|
set(IPV4_DEBUG ON)
|
|
|
|
set(IPV4_SOCKET_DEBUG ON)
|
|
|
|
set(IRQ_DEBUG ON)
|
2021-07-29 20:19:12 +00:00
|
|
|
set(ISO9660_DEBUG ON)
|
|
|
|
set(ISO9660_VERY_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(ITEM_RECTS_DEBUG ON)
|
|
|
|
set(JOB_DEBUG ON)
|
|
|
|
set(JPG_DEBUG ON)
|
2021-06-07 13:17:37 +00:00
|
|
|
set(JS_BYTECODE_DEBUG ON)
|
2022-01-18 17:47:11 +00:00
|
|
|
set(JS_MODULE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(KEYBOARD_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(KEYBOARD_SHORTCUTS_DEBUG ON)
|
|
|
|
set(KMALLOC_DEBUG ON)
|
|
|
|
set(LANGUAGE_SERVER_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(LEXER_DEBUG ON)
|
2022-02-06 13:17:42 +00:00
|
|
|
set(LIBWEB_CSS_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(LINE_EDITOR_DEBUG ON)
|
|
|
|
set(LOCAL_SOCKET_DEBUG ON)
|
|
|
|
set(LOCK_DEBUG ON)
|
2021-08-23 04:06:44 +00:00
|
|
|
set(LOCK_IN_CRITICAL_DEBUG ON)
|
2021-09-14 18:05:17 +00:00
|
|
|
set(LOCK_RANK_ENFORCEMENT ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(LOCK_RESTORE_DEBUG ON)
|
2022-01-28 23:47:18 +00:00
|
|
|
set(LOCK_SHARED_UPGRADE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(LOCK_TRACE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(LOOKUPSERVER_DEBUG ON)
|
|
|
|
set(MALLOC_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(MARKDOWN_DEBUG ON)
|
2021-06-05 20:06:55 +00:00
|
|
|
set(MATROSKA_DEBUG ON)
|
|
|
|
set(MATROSKA_TRACE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(MASTERPTY_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(MBR_DEBUG ON)
|
2022-04-01 16:52:22 +00:00
|
|
|
set(MEMORY_DEVICE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(MEMORY_DEBUG ON)
|
|
|
|
set(MENU_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(MENUS_DEBUG ON)
|
|
|
|
set(MINIMIZE_ANIMATION_DEBUG ON)
|
|
|
|
set(MOUSE_DEBUG ON)
|
|
|
|
set(MOVE_DEBUG ON)
|
|
|
|
set(MULTIPROCESSOR_DEBUG ON)
|
|
|
|
set(NE2000_DEBUG ON)
|
2022-01-23 00:40:33 +00:00
|
|
|
set(NETWORKJOB_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(NETWORK_TASK_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(NT_DEBUG ON)
|
2021-12-16 15:07:54 +00:00
|
|
|
set(NVME_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(OCCLUSIONS_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(OFFD_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(PAGE_FAULT_DEBUG ON)
|
2022-03-24 20:06:19 +00:00
|
|
|
set(HTML_PARSER_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(PATA_DEBUG ON)
|
|
|
|
set(PATH_DEBUG ON)
|
|
|
|
set(PCI_DEBUG ON)
|
|
|
|
set(PDF_DEBUG ON)
|
|
|
|
set(PNG_DEBUG ON)
|
|
|
|
set(POLL_SELECT_DEBUG ON)
|
|
|
|
set(PORTABLE_IMAGE_LOADER_DEBUG ON)
|
|
|
|
set(PROCESS_DEBUG ON)
|
|
|
|
set(PROCFS_DEBUG ON)
|
LibJS: Add initial support for Promises
Almost a year after first working on this, it's finally done: an
implementation of Promises for LibJS! :^)
The core functionality is working and closely following the spec [1].
I mostly took the pseudo code and transformed it into C++ - if you read
and understand it, you will know how the spec implements Promises; and
if you read the spec first, the code will look very familiar.
Implemented functions are:
- Promise() constructor
- Promise.prototype.then()
- Promise.prototype.catch()
- Promise.prototype.finally()
- Promise.resolve()
- Promise.reject()
For the tests I added a new function to test-js's global object,
runQueuedPromiseJobs(), which calls vm.run_queued_promise_jobs().
By design, queued jobs normally only run after the script was fully
executed, making it improssible to test handlers in individual test()
calls by default [2].
Subsequent commits include integrations into LibWeb and js(1) -
pretty-printing, running queued promise jobs when necessary.
This has an unusual amount of dbgln() statements, all hidden behind the
PROMISE_DEBUG flag - I'm leaving them in for now as they've been very
useful while debugging this, things can get quite complex with so many
asynchronously executed functions.
I've not extensively explored use of these APIs for promise-based
functionality in LibWeb (fetch(), Notification.requestPermission()
etc.), but we'll get there in due time.
[1]: https://tc39.es/ecma262/#sec-promise-objects
[2]: https://tc39.es/ecma262/#sec-jobs-and-job-queues
2021-04-01 20:13:29 +00:00
|
|
|
set(PROMISE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(PS2MOUSE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(PTHREAD_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(PTMX_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(REACHABLE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(REGEX_DEBUG ON)
|
2022-01-22 01:04:58 +00:00
|
|
|
set(REQUESTSERVER_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(RESIZE_DEBUG ON)
|
|
|
|
set(RESOURCE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(ROUTING_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(RSA_PARSE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(RTL8139_DEBUG ON)
|
2021-04-02 14:53:31 +00:00
|
|
|
set(RTL8168_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(SAFE_SYSCALL_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(SB16_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(SCHEDULER_DEBUG ON)
|
|
|
|
set(SCHEDULER_RUNNABLE_DEBUG ON)
|
|
|
|
set(SERVICE_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(SH_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(SHELL_JOB_DEBUG ON)
|
|
|
|
set(SH_LANGUAGE_SERVER_DEBUG ON)
|
2022-01-23 22:31:51 +00:00
|
|
|
set(SHARED_QUEUE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(SIGNAL_DEBUG ON)
|
|
|
|
set(SLAVEPTY_DEBUG ON)
|
|
|
|
set(SMP_DEBUG ON)
|
|
|
|
set(SOCKET_DEBUG ON)
|
|
|
|
set(SOLITAIRE_DEBUG ON)
|
|
|
|
set(SPAM_DEBUG ON)
|
|
|
|
set(SQL_DEBUG ON)
|
2021-06-29 01:15:17 +00:00
|
|
|
set(SQLSERVER_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(STORAGE_DEVICE_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(SYNTAX_HIGHLIGHTING_DEBUG ON)
|
|
|
|
set(SYSCALL_1_DEBUG ON)
|
2022-08-06 14:40:07 +00:00
|
|
|
set(SYSFS_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(SYSTEM_MENU_DEBUG ON)
|
|
|
|
set(SYSTEMSERVER_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(TCP_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(TCP_SOCKET_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(TERMCAP_DEBUG ON)
|
|
|
|
set(TERMINAL_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(TEXTEDITOR_DEBUG ON)
|
|
|
|
set(THREAD_DEBUG ON)
|
|
|
|
set(TLS_DEBUG ON)
|
2022-02-09 19:42:56 +00:00
|
|
|
set(TLS_SSL_KEYLOG_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(TOKENIZER_TRACE_DEBUG ON)
|
|
|
|
set(TTY_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(UCI_DEBUG ON)
|
|
|
|
set(UDP_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(UHCI_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(UHCI_VERBOSE_DEBUG ON)
|
|
|
|
set(UPDATE_COALESCING_DEBUG ON)
|
2021-05-25 20:13:15 +00:00
|
|
|
set(URL_PARSER_DEBUG ON)
|
2021-02-27 04:10:37 +00:00
|
|
|
set(USB_DEBUG ON)
|
2022-04-12 16:25:41 +00:00
|
|
|
set(UTF8_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(VFS_DEBUG ON)
|
|
|
|
set(VIRTIO_DEBUG ON)
|
|
|
|
set(VIRTUAL_CONSOLE_DEBUG ON)
|
|
|
|
set(VMWARE_BACKDOOR_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
set(VOLATILE_PAGE_RANGES_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(VRA_DEBUG ON)
|
|
|
|
set(WAITBLOCK_DEBUG ON)
|
|
|
|
set(WAITQUEUE_DEBUG ON)
|
2021-04-26 08:18:13 +00:00
|
|
|
set(WASM_BINPARSER_DEBUG ON)
|
2021-04-30 22:49:01 +00:00
|
|
|
set(WASM_TRACE_DEBUG ON)
|
2021-10-31 22:06:35 +00:00
|
|
|
set(WASM_VALIDATOR_DEBUG ON)
|
2022-06-04 03:27:48 +00:00
|
|
|
set(WEBGL_CONTEXT_DEBUG ON)
|
2021-05-30 14:42:03 +00:00
|
|
|
set(WEBSERVER_DEBUG ON)
|
2022-02-17 12:31:09 +00:00
|
|
|
set(WEB_WORKER_DEBUG ON)
|
2021-06-03 17:18:30 +00:00
|
|
|
set(WINDOWMANAGER_DEBUG ON)
|
|
|
|
set(WSMESSAGELOOP_DEBUG ON)
|
|
|
|
set(WSSCREEN_DEBUG ON)
|
2022-03-26 17:02:57 +00:00
|
|
|
set(XML_PARSER_DEBUG ON)
|
2021-01-24 14:28:26 +00:00
|
|
|
|
|
|
|
# False positive: DEBUG is a flag but it works differently.
|
|
|
|
# set(DEBUG ON)
|
2021-02-13 11:46:22 +00:00
|
|
|
# False positive: DT_DEBUG is a flag, but for a bitset, not a feature.
|
|
|
|
# set(DT_DEBUG ON)
|
|
|
|
# False positive: GUI_DND_DEBUG is a flag, but passed as an envvar.
|
|
|
|
# set(GUI_DND_DEBUG ON)
|
2021-07-27 22:58:01 +00:00
|
|
|
# False positive: GUI_HOVER_DEBUG is a flag, but passed as an envvar.
|
|
|
|
# set(GUI_HOVER_DEBUG ON)
|
2021-02-13 11:46:22 +00:00
|
|
|
# False positive: GUI_FOCUS_DEBUG is a flag, but passed as an envvar.
|
|
|
|
# set(GUI_FOCUS_DEBUG ON)
|
2020-12-21 17:48:32 +00:00
|
|
|
# False positive: LOG_DEBUG is a flag, but for a bitset, not a feature.
|
2021-01-24 14:28:26 +00:00
|
|
|
# set(LOG_DEBUG ON)
|
2021-02-13 11:46:22 +00:00
|
|
|
# False positive: UHCI_USBCMD_SOFTWARE_DEBUG is a flag, but for a bitset, not a feature.
|
|
|
|
# set(UHCI_USBCMD_SOFTWARE_DEBUG ON)
|
2021-04-16 18:42:13 +00:00
|
|
|
# False positive: DEBUG_CONTROL_REGISTER represents a specification constant.
|
|
|
|
# set(DEBUG_CONTROL_REGISTER ON)
|
|
|
|
# False positive: DEBUG_STATUS_REGISTER represents a specification constant.
|
|
|
|
# set(DEBUG_STATUS_REGISTER ON)
|
|
|
|
# False positive: DEFINE_DEBUG_REGISTER is used to define read/write methods for debug registers.
|
|
|
|
# set(DEFINE_DEBUG_REGISTER ON)
|
2021-01-18 16:25:44 +00:00
|
|
|
# Clogs up build: The WrapperGenerator stuff is run at compile time.
|
2021-01-24 14:28:26 +00:00
|
|
|
# set(WRAPPER_GENERATOR_DEBUG ON)
|
2021-05-31 09:38:50 +00:00
|
|
|
# Immediately finds violations during boot, shouldn't be discoverable by people who aren't working on fixing.
|
|
|
|
# set(KMALLOC_VERIFY_NO_SPINLOCK_HELD ON)
|
2021-05-31 16:59:48 +00:00
|
|
|
# False positive: CONSOLE_OUT_TO_BOCHS_DEBUG_PORT is a flag for ConsoleDevice, not a feature.
|
|
|
|
# set(CONSOLE_OUT_TO_BOCHS_DEBUG_PORT)
|
|
|
|
# False positive: BOCHS_DEBUG_PORT represents an IO port constant
|
|
|
|
# set(BOCHS_DEBUG_PORT)
|
2021-10-27 21:24:39 +00:00
|
|
|
# False positive: IFF_DEBUG is an ioctl flag
|
|
|
|
# set(IFF_DEBUG)
|
2021-12-01 22:48:09 +00:00
|
|
|
# False positive: SO_DEBUG is a socket option
|
|
|
|
# set(SO_DEBUG)
|