選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

28 行
1.2KB

  1. # E05-S04: build the field/self/concrete-call emitter fixture and its disk.
  2. [CmdletBinding()]
  3. param()
  4. $ErrorActionPreference = "Stop"
  5. $project = Split-Path $PSScriptRoot -Parent
  6. Import-Module (Join-Path $PSScriptRoot "lib\Nova128Test.psm1") -Force
  7. $out = Join-Path $project "build\member-test"
  8. New-Item -ItemType Directory -Force -Path $out | Out-Null
  9. $link = Invoke-Nova128Link -Name "member-test" -BuildDir $out `
  10. -Config (Join-Path $project "cfg\compiler.cfg") -Sources @(
  11. (Join-Path $project "src\compiler\codegen.s"),
  12. (Join-Path $project "src\compiler\flow.s"),
  13. (Join-Path $project "src\compiler\members.s"),
  14. (Join-Path $project "src\runtime\frames.s"),
  15. (Join-Path $project "src\runtime\print.s"),
  16. (Join-Path $project "tests\codegen\member-test.s"))
  17. if ((Get-Nova128Label $link.Labels "test_entry") -ne 0x1C0D) { throw "test_entry is not at `$1C0D" }
  18. $end = Get-Nova128Label $link.Labels "test_end"
  19. if ($end -ge 0x4000) {
  20. throw ("member-test ends at `$" + $end.ToString("X4") + "; it must stay below `$4000")
  21. }
  22. New-Nova128Disk -Path (Join-Path $out "member-test.d81") -Files @(
  23. @{ Name = "member-test"; Path = $link.Program; Type = "prg" })
  24. Write-Host ("built {0} (end {1:X4})" -f $link.Program, $end)

Powered by TurnKey Linux.