Skip to content

class-declaration

@albanread albanread tagged this 27 Aug 11:39
A known-good point, verified end to end on a distribution rebuilt from
this commit.

The compiler
  class declares an Objective-C class (COCOA_CLASS_DESIGN.md). It parses
  with real diagnostics, resolves to a type -- a register-passable struct
  of one pointer, which is what an Objective-C reference is -- carries a
  derived selector per method, and is checked against the SDK database:
  encodings looked up by selector rather than derived, framework
  attribution so registration can load AppKit before resolving NSView, an
  unknown-superclass typo catcher, and a diagnostic when a declared
  signature disagrees with what the runtime will send.

  What it does NOT do is register with the runtime. A class compiles and
  type-checks; nothing yet emits objc_allocateClassPair. Converting the
  examples or the IDE to class syntax has to wait for that, which is the
  next phase: a trampoline per method (unavoidable, because method bodies
  may raise and unwinding into objc_msgSend is undefined), the
  registration calls, and __init__ with a once-guard.

The IDE
  Milestone 4: build, run, a console pane, jump-to-error into an imported
  file, and an examples project that ships with the distribution. Roast
  builds Roast.

Verified on this tree
  tools/check-dist.sh    13 checks, all four shipped examples build
  tools/check-ide.sh     20 checks
  tools/check-parser.sh  331 pass, 25 skip, 1 known-stale (a test asserting
                         a diagnostic a694adc deleted when this fork
                         revived fn)
Assets 2
Loading