GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dominik/crash 0109 bg num running compile tasks by Domiii · Pull Request #143 · replayio/node

Conversation

@Domiii

@Domiii Domiii commented Sep 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Summary

  • Track NumRunningBackgroundCompileTasks across BackgroundCompileTask::Run.

Why

  • Chromium RR opcode-emit checks need the counter.
  • Node lacked it.

Change

  • compiler.cc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Domiii
Domiii added this pull request to stack #140 September 22, 2026 12:12
@Domiii Domiii self-assigned this Sep 22, 2026
Andarist
Andarist approved these changes Sep 22, 2026
View reviewed changes
@Domiii
Track NumRunningBackgroundCompileTasks across BackgroundCompileTask::…
480c026
…Run for RR opcode emit checks.
@Domiii
Domiii force-pushed the dominik/crash-0109-bg-num-running-compile-tasks branch from 4f6a6bc to 480c026 Compare September 22, 2026 16:15
@Domiii
Domiii merged commit 7778d5a into master Sep 22, 2026
2 of 3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

bhackett1024 pushed a commit that referenced this pull request Nov 5, 2026
@Domiii @Andarist
Freeze record/replay opcode emission per script
8e86eef
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
@Domiii @Andarist @claude
Freeze record/replay opcode emission per script
07b2be0
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
@Domiii @Andarist @claude
Freeze record/replay opcode emission per script
84e4398
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
@Domiii @Andarist @claude
Freeze record/replay opcode emission per script
8363723
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
6e04270
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
da26c54
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
f33d287
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
@Domiii @Andarist @claude
Freeze record/replay opcode emission per script
9d61f30
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
470ab9f
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
1c4107d
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
d6cd74d
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
1e1c622
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
f864600
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
350cf5e
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
2fc46d7
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
fc56b4c
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
ab97eca
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
a4ca638
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
25dec59
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
4075dc3
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
997e39d
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
3e6e0d4
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
e8cafdb
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
6fc88e5
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
2047aa9
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
f999c86
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
56142a3
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
@Domiii @Andarist
Freeze record/replay opcode emission per script
359e2d5
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
@Domiii @Andarist @claude
Freeze record/replay opcode emission per script
12b5a6e
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
@Domiii @Andarist @claude
Freeze record/replay opcode emission per script
e0edb46
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
@Domiii @Andarist @claude
Freeze record/replay opcode emission per script
a85a55d
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Andarist Andarist Andarist approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Domiii Domiii

Labels

None yet

Projects

None yet

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.

2 participants

@Domiii @Andarist
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.