GeezerVison is showing github.com — dominik/crash 0109 bg num running compile tasks by Domiii · Pull Request #143 · replayio/node
Conversation
Domiii
commented
Sep 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- Track
NumRunningBackgroundCompileTasks across BackgroundCompileTask::Run.
Why
- Chromium RR opcode-emit checks need the counter.
- Node lacked it.
Change
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…Run for RR opcode emit checks.
Uh oh!
There was an error while loading. Please reload this page.
bhackett1024
pushed a commit
that referenced
this pull request
Nov 5, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
added a commit
that referenced
this pull request
Nov 6, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
added a commit
that referenced
this pull request
Nov 6, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
added a commit
that referenced
this pull request
Nov 6, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 6, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 6, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 6, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
added a commit
that referenced
this pull request
Nov 6, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 10, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
pushed a commit
that referenced
this pull request
Nov 11, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
added a commit
that referenced
this pull request
Nov 11, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
added a commit
that referenced
this pull request
Nov 11, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
added a commit
that referenced
this pull request
Nov 12, 2026
Decide once per script whether its bytecode carries record/replay
instrumentation, so recompiles caused by bytecode flushing or cache
ageing get the same instrumentation as the first compile. The decision
is stored on the Script itself (a new record_replay_instrumented flag,
set in ParseInfo::CreateScript from the compile that creates the script)
and every later compile of that script inherits it through
RecordReplayInheritCompileFlags. The FinalizeBytecode CHECK that the
ignore flag matched the script is dropped, as it no longer holds.
Register a script as a Replay source as soon as its main-thread
compile finishes: ScriptCompiler::CompileUnboundInternal and the
streamed-source compile call RecordReplayRegisterCompiledScript,
instead of waiting for the script's function to be instantiated, which
never happens for an ES module whose import graph failed to load, so
the recording had no source for it. At the first checkpoint, the
progress counter is reset (with a ProgressBeforeFirstCheckpoint
warning if anything advanced it) and the sources registered until then
are announced, since the recorder only takes sources from the first
checkpoint on.
Invalidate the recording when --lazy-compile-dispatcher or
--parallel-compile-tasks is on: the dispatcher compiles functions on
worker threads whose timing decides when the main thread installs a
function's bytecode, or whether it waits for a worker, so such a
recording doesn't replay reliably. The flags are left as requested.
Also count the background compile tasks currently running, for
checking that record/replay opcodes are only emitted on the main
thread. Nothing reads the counter yet.
Rebase note: the invariant is that one script's bytecode is either
always instrumented or never, and that only main-thread compiles
instrument, so the decision belongs to ParseInfo::CreateScript and
every other path that builds UnoptimizedCompileFlags for an existing
script must take the flags from that script. A new Script flag bit
also needs its Torque bitfield (script.tq) kept in sync.
From #128, #132, #143 and #217.
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Reviewers
Andarist
Andarist approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|