# slice_ov030cast.txt -- run rel0215 wave 1, lane cast-ov030.
# ov030's TALL TALL MOUNTAIN cast: RollingLogTtm (102), UkikiCage (103),
# UkikiThief (267) and UkikiStar (268), which are THREE classes, not four.
#
# Worktree C:/tmp/lvled-b, branch port/cast-ov030, base f77f01169, private build
# C:/tmp/lvled-b/build/port with CMAKE_HOME_DIRECTORY verified C:/tmp/lvled-b/port.
# Baseline gate on that tree BEFORE a line was edited: build green with every
# post-link guard passing, level 22 booting rc 0 at 300 frames, and its census
# reading "171 spawned -35 classes-, 4 skipped -4 classes-" with the four skips
# being ids 102, 231, 232 and 267.
#
# ===========================================================================
# 1. THE IDENTITY, ALL OF IT OUT OF THE ROM
# ===========================================================================
# The full derivation -- both attribution routes on every id, the three vtable
# widths slot by slot, the four width traps, the T2/T3 audits -- is in
# port/ov030_syms.txt's own header and is not repeated here. The summary:
#
#   id   class            ROM type_info name    vtable      slots  object
#   102  RollingLogTtm    15daObjHmMaruta_c     0x02115a48   32    836   Platform
#   103  UkikiCage        13daObjHmBskt_c       0x02115974   32   1248   Platform
#   267  UkikiThief       7daMky_c              0x02115bfc   31    972   Actor
#   268  UkikiStar        7daMky_c              0x02115bfc   31    972   Actor
#
# 267 AND 268 ARE ONE CLASS. Both factories store the SAME table, allocate the
# same 972 bytes and run the same five sub-object constructors. That is why
# four SpawnInfo records need only three vtables and only three fills.
#
# THE CONFIG'S _ZTV LABELS AND ITS MANGLED METHOD NAMES ARE SHIFTED ONE CLASS
# and this slice is seated BY ADDRESS throughout. Every _ZN9UkikiCage*Ev body
# below is really a RollingLogTtm method and every _ZN13RollingLogTtm*Ev body is
# really a Ukiki method. Nothing in config/ or src/ is renamed by this lane;
# port/ov030_syms.txt records the defect with the ROM evidence.
#
# ===========================================================================
# 2. THE SOURCE INVENTORY, THREE WAYS
# ===========================================================================
# config/arm9/overlays/ov030/symbols.txt names 63 kind:function symbols
# (60 in .text, 3 in .init). Counted the way port/slice_vs.txt section 2
# prescribes, and the three sums close:
#
#   delinked to a src TU that exists      61
#   present but NONMATCHING-bannered       0
#   MISSING (no src file at all)           1   func_ov030_021136b0
#   no delink block but a src file exists  1   func_ov030_02113324
#                                        ----
#                                          63
#
# TWO DECOMP-SIDE OBSERVATIONS, recorded so they are not re-derived as
# mysteries, the way run mg7 lane L370's row was:
#   - func_ov030_02113324 (0x2e8 bytes) has NO delink block in
#     config/arm9/overlays/ov030/delinks.txt, but src/actors/daMky_c.cpp
#     exists and is a real body. It costs the port nothing -- the port slices a
#     src file and does not need the block -- so it is in this slice.
#   - func_ov030_021136b0 (0x3d0 bytes) has neither a delink block nor a src
#     file. It is the ONLY missing body in the overlay and it is the Ukiki's
#     state 3 TICK half. It gets a LOUD L2-pattern face in
#     hal/actor_classes_ov030.cpp, never a silent stub.
#
# So the lane's ceiling is 62 src TUs, and four of those are displaced by host
# copies, giving the 58 lines below.
#
# ===========================================================================
# 3. THE FOUR DISPLACED TUs, EACH WITH ITS OWN REASON
# ===========================================================================
# The byte-matched original of each stays in src/ as the proof and is dropped
# from this list, because a host copy defines the same symbol and listing both
# would be an LNK2005.
#
#   src/actors/daMky_c.cpp   -> unmatched/Ukiki_StateEnter.cpp
#   src/actors/daMky_c.cpp   -> unmatched/Ukiki_StateTick.cpp
#     Both are mwcc POINTER-TO-MEMBER dispatch on a deliberately incomplete
#     class -- `struct C { char pad[0x3a4]; PMF *pp; };`, no base, no virtuals
#     -- so mwcc's PMF is the ROM's own 8-byte {function, delta} pair and MSVC's
#     "unknown inheritance" form is not a plain function pointer. This is the
#     BabyPenguin six-cell shape exactly (port/unmatched/BabyPenguin_StateEnter
#     .cpp and _StateTick.cpp), one cell wider: ELEVEN cells, each two pairs
#     (`S16 { S8 lo, hi; }` in the sinit's own declaration), enter at pp+0 and
#     tick at pp+1. src/actors/daMky_c.cpp is the cell-pointer installer --
#     it writes `*(Item16 **)(self + 0x3a4) = &data_ov030_02115e0c[idx]` -- and
#     it is UNCHANGED and stays in this slice.
#
#   src/actors/daMky_c.cpp -> unmatched/Ukiki_Behavior.cpp
#     THE SHADOW-CLASS SLOT DEFECT, and it is the stack-unbalancing half rather
#     than the merely-wrong-body half. The matched src models the ModelAnim at
#     this+0xd4 with a local FOUR-virtual shadow `struct VObj` and calls `v3()`,
#     which is the ROM's own numbering: the fourth word of an Itanium model
#     vtable is UpdateVerts (0 D1, 1 D0, 2 DoSetFile, 3 UpdateVerts, 4
#     Virtual10, 5 Render). MSVC folds D1/D0 into one slot, so the host's fourth
#     word is Virtual10(Matrix4x3 &) -- __thiscall with ONE stack parameter,
#     returning `ret 4` off a stack this caller never pushed. That is the exact
#     pair of failures port/unmatched/MgMemory2_ShadowSlot_020c06dc.cpp
#     measured. WHICH CLASS THE OBJECT IS was established from the CONSTRUCTOR
#     and not guessed from the call: daMky_c_classInit_MONKEY_STAR / daMky_c_classInit_MONKEY_THIEF both run
#     `_ZN9ModelAnimC1Ev(p + 0xd4)`, so +0xd4 is a ModelAnim, whose UpdateVerts
#     is MSVC slot 2 under include/ModelAnim.h. The dispatch stays VIRTUAL in
#     the host copy, for MgFlower_ModelRender_020c3bf4.cpp's reason.
#
#   src/actors/daMky_c.cpp -> spelled INLINE in the fill (slot 16)
#     A real MSVC-synthesised destructor over a local shadow class with no
#     vtable store of its own -- the MotherPenguin / OneUpLogo / BabyPenguin
#     shape, which gate 191 and gate 193 both keep OUT of the slice for the same
#     reason (MSVC mangles `RollingLogTtm::~RollingLogTtm` as
#     ?1RollingLogTtm@@UAE@XZ, never as the Itanium _ZN7daMky_cD1Ev the
#     vtable slot needs). The chain is spelled directly in the thunk, HIGH
#     ADDRESS FIRST, from the src file's own member list.
#
# THE TWO SIBLING SHADOW CLASSES IN THIS SLICE ARE NOT DEFECTS, and the
# distinction is the whole rule -- a sweep that flags every shadow gets it
# wrong (MgMemory2_ShadowSlot_020c06dc.cpp's own closing paragraph):
#   src/_ZN13daObjHmBskt_c6RenderEv.cpp  (UkikiCage's Render, ROM slot 9) and
#   src/_ZN13daObjMaruta_c6RenderEv.cpp  (RollingLogTtm's Render, ROM slot 9)
# both model a plain Model with a SIX-virtual shadow and call `m(0)`, index 5.
# hal/cxxname_bridge.cpp:511 DUAL-FILLS `_ZTV5Model[5] = mv_render` for exactly
# this, so index 5 on the host is Render too and the shadow's numbering is
# right. Verified by reading that line, not assumed. Neither object is a
# ModelAnim: _ZN13daObjHmBskt_cD1Ev.c (UkikiCage's D1) and the Maruta dtors both
# run `_ZN5ModelD1Ev(t + 0xd4)`, so both +0xd4 members are plain Models.
#
# ===========================================================================
# 4. THE MEASURED CLOSURE GAP -- TEN LINES, ALL OF THEM MEASURED
# ===========================================================================
# This slice carries 58 ov030 TUs and TEN that are not ov030: EIGHT ov080 and
# TWO arm9. All ten are named below. An earlier revision of this section said
# SEVEN and named seven, silently dropping the three that the second and third
# link waves pulled in -- the count is the file's own non-ov030 line count and
# it is 10, not 7.
#
# TWO ov080 LINES COME FROM THE VTABLE, not from a link failure.
# RollingLogTtm's table takes two slots from ov080 rather than from arm9:
#   slot  9 (Render)             0x02127124  _ZN13daObjMaruta_c6RenderEv
#   slot 27 (OnHitByMegaChar)    0x02127058  _ZN13daObjMaruta_c15OnHitByMegaCharER6Player
# Both resolve `module:overlays(78,80)` in relocs.txt, and level 22's roster
# loads ov080 and not ov078, so the ov080 spelling is the live one.
#
# THE OTHER EIGHT CAME OFF A MEASURED UNRESOLVED LIST, never guessed --
# slice_vs.txt section 3's "THE MEASURED GAP" discipline, over three waves,
# because the ov080 bodies depend on each other.
#
# WAVE 1, the first link. It reported FIFTEEN unresolved externals; these five
# were the ones with a matched src TU nobody had sliced:
#   func_ov080_021270dc   from RollingLogTtm's CleanupResources
#   func_ov080_0212714c   from RollingLogTtm's Behavior
#   func_ov080_021274ac   from RollingLogTtm's InitResources
#   func_02038ea4         from func_ov030_02111dd0
#   func_02037f44         from func_ov030_02112400
#
# WAVE 2, the link after those five landed. TWO unresolved externals, both
# second-order dependencies of the ov080 bodies wave 1 had just added:
#   func_ov080_02127094   from func_ov080_0212714c and func_ov080_021274ac
#   func_ov080_02127658   from func_ov080_021274ac
#
# WAVE 3, measured WITHOUT paying for a third link -- port/tools/closure.py
# over this slice against the base map, which is exactly what that tool exists
# for. ONE third-order dependency:
#   func_ov080_0212758c   from the wave-2 pair
# After it, closure.py's remaining UNRESOLVED list contains nothing that wants
# a slice line: five C++-mangled data spellings the /alternatename bridges
# cover, the three host vtable arrays hal/actor_classes_ov030.cpp defines, the
# three arm9 helpers the per-source renames cover, _G1 (bound per source, see
# port/CMakeLists.txt's G0/G1 row), and func_ov030_02114170, which
# unmatched/Ukiki_StateEnter.cpp supplies.
#
# THE OTHER TEN WAVE-1 ENTRIES were not missing bodies at all and needed no
# slice line: three were arm9 helpers this overlay's src calls by their
# func_ADDRESS placeholder while the port links them under their real names
# (renamed per source, see port/CMakeLists.txt), six were C-linkage or
# vtable-name spelling flips fixed with /alternatename in
# hal/actor_classes_ov030.cpp, and one was ActorBase::OnPendingDestroy, which
# the port links as an MSVC method and which the fill therefore reaches
# through the class.
#
# The ten ov080/arm9 lines raise ov080's and arm9's linked counts, not ov030's:
# ov030 62/58, ov080 66->74 (+8), arm9 1983->1985 (+2). Recorded here so the
# +68 linkage delta reconciles exactly against the 68 non-comment lines below.
#
# ===========================================================================
# 5. NO LANGUAGE CXX ROWS ARE OWED
# ===========================================================================
# A comment-stripped token sweep over every ov030 .c file in this slice for the
# //cpp marker and for `class `, `::`, `template`, `new `, `delete `,
# `extern "C"`, `public:`, `private:`, `->*` and `.*` finds ZERO hits. Every
# ov030 TU that carries C++ is already spelled .cpp. Run rather than guessed,
# the way lane CCN's entry at port/CMakeLists.txt:805-814 prescribes.
#
# KEEP SQUARE BRACKETS BALANCED IN THIS FILE. CMake reads it with
# file(STRINGS), which treats an unbalanced open square bracket as the start of
# a bracket argument and collapses the rest of the file into ONE element -- the
# slice then compiles EMPTY. Run mg9 lanes S381 and S364 and run mg11 lane RLT
# all recorded this; it is recorded a fourth time here because the failure it
# produces names the symbols and not the cause.

src/_ZN13daObjHmBskt_cD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN13daObjHmBskt_cD1Ev.cpp. MSVC folds the ROM destructor variants into one symbol, so only one of a class two per-function destructor TUs can be compiled.
#src/_ZN13daObjHmBskt_cD0Ev.cpp
src/func_ov030_0211124c.cpp
src/_ZN13daObjHmBskt_c16CleanupResourcesEv.cpp
src/_ZN13daObjHmBskt_c6RenderEv.cpp
src/_ZN13daObjHmBskt_c8BehaviorEv.cpp
src/_ZN13daObjHmBskt_c13InitResourcesEv.cpp
src/d_a_obj_hm_bskt.c
# QUARANTINED at the main->port sync (lane SYNC5, the wave-7 fold merge): MSVC
# refuses main's shape for this TU (C2556 and C2371, one free function
# declared with two different return types in one TU). It is a decomp-side
# item, not a port one: see runs/link100/out/SYNC5/decomp_side.md. The row
# returns when main lands the fix.
#src/actors/daMky_c.cpp
src/d_a_obj_hm_maruta.c
src/d_a_mky_monkey_star.c
src/d_a_mky_monkey_thief.c
src/__sinit_ov030_0211484c.c
src/__sinit_ov030_021148b8.c
src/__sinit_ov030_02114924.c
src/_ZN13daObjMaruta_c6RenderEv.cpp
src/_ZN13daObjMaruta_c15OnHitByMegaCharER6Player.cpp
src/func_ov080_021270dc.c
src/func_ov080_0212714c.c
src/func_ov080_021274ac.c
src/func_02038ea4.cpp
src/func_02037f44.c
src/func_ov080_02127094.c
src/func_ov080_02127658.c
src/func_ov080_0212758c.c
