Repository navigation
Conversation
Andarist
approved these changes
Sep 22, 2026
…Run for RR opcode emit checks.
Domiii
force-pushed
the
dominik/crash-0109-bg-num-running-compile-tasks
branch
from
September 22, 2026 16:15
4f6a6bc to
480c026
Compare
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 <mateuszburzynski@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
NumRunningBackgroundCompileTasksacrossBackgroundCompileTask::Run.Why
Change
compiler.cc.