mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
LibWasm: Don't create useless temporary strings for trap reasons
These strings are only used when execution traps, so there's no reason to create actual strings until that happens; instead switch to using StringViews.
This commit is contained in:
committed by
Ali Mohammad Pur
parent
2fc0040ceb
commit
06ffc0c4db
@@ -17,7 +17,7 @@ namespace Wasm {
|
||||
|
||||
#define TRAP_IF_NOT(x) \
|
||||
do { \
|
||||
if (trap_if_not(x, #x)) { \
|
||||
if (trap_if_not(x, #x##sv)) { \
|
||||
dbgln_if(WASM_TRACE_DEBUG, "Trapped because {} failed, at line {}", #x, __LINE__); \
|
||||
return; \
|
||||
} \
|
||||
@@ -25,7 +25,7 @@ namespace Wasm {
|
||||
|
||||
#define TRAP_IF_NOT_NORETURN(x) \
|
||||
do { \
|
||||
if (trap_if_not(x, #x)) { \
|
||||
if (trap_if_not(x, #x##sv)) { \
|
||||
dbgln_if(WASM_TRACE_DEBUG, "Trapped because {} failed, at line {}", #x, __LINE__); \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
Reference in New Issue
Block a user