diff --git a/scripts/verify-baseline-static/allowlist-x64.txt b/scripts/verify-baseline-static/allowlist-x64.txt index 13819585cd13..b4395e1969d7 100644 --- a/scripts/verify-baseline-static/allowlist-x64.txt +++ b/scripts/verify-baseline-static/allowlist-x64.txt @@ -1349,7 +1349,11 @@ jsimd_ycc_rgb_convert_avx2.return [AVX, AVX2] # single-digit hit here is decode noise. Ceiling [AVX] so a multi-feature leak # still fails. On ELF each opcode handler has its own symbol, so layout shifts # can move the desync between llint_op_* siblings; add them here as they trip. -# (2 symbols) +# llint_op_jmp_wide32 decoded a stray RDPMC (0F 33) out of the same garbage. +# That is not a SIMD feature and the bytes move with layout, so it is a blanket +# pass; a real -march leak would show up in the other llint_op_* symbols. +# (3 symbols) # ---------------------------------------------------------------------------- llint_op_enter_wide32 [AVX] llint_op_wide16_wide16 [AVX] +llint_op_jmp_wide32 diff --git a/src/js_parser_jsc/Macro.rs b/src/js_parser_jsc/Macro.rs index ade58abe1a5f..59688479a735 100644 --- a/src/js_parser_jsc/Macro.rs +++ b/src/js_parser_jsc/Macro.rs @@ -30,6 +30,8 @@ use bun_jsc::{ }; use bun_jsc::{BuildMessage, ResolveMessage}; +bun_core::declare_scope!(macros, visible); + const NAMESPACE_WITH_COLON: &[u8] = b"macro:"; fn is_macro_path(str: &[u8]) -> bool { @@ -899,12 +901,7 @@ impl Runner { id: i32, javascript_object: JSValue, ) -> Result { - if bun_core::env::IS_DEBUG { - bun_core::prettyln!( - "[macro] call {}", - bstr::BStr::new(function_name) - ); - } + bun_core::scoped_log!(macros, "call {}", bstr::BStr::new(function_name)); // The exception holder is never read in this body (legacy from an earlier // exception-reporting path); a thread-local sentinel suffices. diff --git a/test/bundler/transpiler/macro-test.test.ts b/test/bundler/transpiler/macro-test.test.ts index fc28497df537..f925362fa695 100644 --- a/test/bundler/transpiler/macro-test.test.ts +++ b/test/bundler/transpiler/macro-test.test.ts @@ -150,10 +150,10 @@ test("object argument with a sparse numeric key", async () => { }); const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); // One combined assertion so stderr (where JSC prints the exception check failure) shows up in - // the diff if the child aborts. Debug builds print "[macro] call take" to stdout before the - // script's own output, so only the tail of stdout is matched. - expect({ stdout, stderr, exitCode, signalCode: proc.signalCode }).toMatchObject({ - stdout: expect.stringMatching(/200000\n$/), + // the diff if the child aborts. + expect({ stdout, stderr, exitCode, signalCode: proc.signalCode }).toEqual({ + stdout: "200000\n", + stderr: "", exitCode: 0, signalCode: null, }); @@ -178,7 +178,7 @@ test("object destructuring of a macro result keeps every bound property regardle stderr: "pipe", }); const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); - expect({ lastLine: stdout.trim().split("\n").pop(), stderr }).toEqual({ lastLine: "[2,1,1,1,2]", stderr: "" }); + expect({ stdout, stderr }).toEqual({ stdout: "[2,1,1,1,2]\n", stderr: "" }); expect(exitCode).toBe(0); }); @@ -199,11 +199,7 @@ describe("event loop routing around macros", () => { stderr: "pipe", }); const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); - // Debug builds also print "[macro] call " to stdout. - const lines = stdout - .trim() - .split("\n") - .filter(line => !line.startsWith("[macro]")); + const lines = stdout.trim().split("\n"); return { lines, stderr, exitCode }; } diff --git a/test/regression/issue/39900.test.ts b/test/regression/issue/39900.test.ts index c1ff77b514b4..40caa4afae77 100644 --- a/test/regression/issue/39900.test.ts +++ b/test/regression/issue/39900.test.ts @@ -27,8 +27,7 @@ test.concurrent("macro that awaits crypto.subtle.digest resolves under bun run", }); const [stdout, stderr, exitCode] = await Promise.all([proc.stdout.text(), proc.stderr.text(), proc.exited]); expect(stderr).toBe(""); - // A debug build also logs "[macro] call sha" to stdout. - expect(stdout).toContain(`${expected}\n`); + expect(stdout).toBe(`${expected}\n`); expect(exitCode).toBe(0); });