Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: iwillspeak/feersum
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f49cb8abc271be168f6e08a45f81e392184b7a38
Choose a base ref
..
head repository: iwillspeak/feersum
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: de9feb93657cb9435f9d517960bf06679c61ed8f
Choose a head ref
Showing with 329 additions and 216,866 deletions.
  1. +3 −5 .github/workflows/github-actions-pages.yml
  2. +4 −1 .vscode/tasks.json
  3. +2 −2 Directory.Build.props
  4. +1 −0 spec/fail/bad-library-names-parsefail.scm
  5. +1 −2 spec/fail/bad-library-names.scm
  6. +4 −0 spec/norun/forever.scm
  7. +1 −1 src/Feersum.CompilerServices/Compile/Builtins.fs
  8. +12 −14 src/Feersum.CompilerServices/Compile/Compiler.fs
  9. +3 −5 src/Feersum.CompilerServices/Feersum.CompilerServices.fsproj
  10. +0 −258 src/Feersum.CompilerServices/LegacySyntax.fs
  11. +2 −2 src/Feersum.CompilerServices/Options.fs
  12. +31 −4 src/Feersum.CompilerServices/Syntax/Parse.fs
  13. +0 −27 src/Feersum.CompilerServices/Syntax/SyntaxShim.fs
  14. +24 −2 src/Feersum.CompilerServices/Syntax/Tree.fs
  15. +6 −6 src/Feersum.CompilerServices/Targets.fs
  16. +2 −2 src/Feersum.Stage1/Program.fs
  17. +1 −1 src/Feersum/Program.fs
  18. +11 −5 test/Feersum.Tests/Feersum.Tests.fsproj
  19. +24 −9 test/Feersum.Tests/SpecTests.fs
  20. +2 −755 test/Feersum.Tests/_snapshots/Parse_begin.scm.json
  21. +2 −4,618 test/Feersum.Tests/_snapshots/Parse_booleans.scm.json
  22. +2 −1,744 test/Feersum.Tests/_snapshots/Parse_builtin-macros.scm.json
  23. +2 −1,435 test/Feersum.Tests/_snapshots/Parse_builtins.scm.json
  24. +2 −1,654 test/Feersum.Tests/_snapshots/Parse_byte-vectors.scm.json
  25. +2 −1,337 test/Feersum.Tests/_snapshots/Parse_capturetest.scm.json
  26. +2 −20,385 test/Feersum.Tests/_snapshots/Parse_characters.scm.json
  27. +2 −89,378 test/Feersum.Tests/_snapshots/Parse_chibi-r7rs-tests.scm.json
  28. +2 −2,344 test/Feersum.Tests/_snapshots/Parse_collatz.scm.json
  29. +2 −53 test/Feersum.Tests/_snapshots/Parse_comment.scm.json
  30. +2 −886 test/Feersum.Tests/_snapshots/Parse_comments_extended.scm.json
  31. +2 −2,302 test/Feersum.Tests/_snapshots/Parse_conditions.scm.json
  32. +2 −1,378 test/Feersum.Tests/_snapshots/Parse_cxr.scm.json
  33. +2 −698 test/Feersum.Tests/_snapshots/Parse_define-and-assign.scm.json
  34. +2 −1,008 test/Feersum.Tests/_snapshots/Parse_display-utils.sld.json
  35. +2 −938 test/Feersum.Tests/_snapshots/Parse_display.scm.json
  36. +2 −3,799 test/Feersum.Tests/_snapshots/Parse_dragons.scm.json
  37. +2 −1,569 test/Feersum.Tests/_snapshots/Parse_envtest.scm.json
  38. +2 −8,123 test/Feersum.Tests/_snapshots/Parse_equivalence.scm.json
  39. +2 −2,735 test/Feersum.Tests/_snapshots/Parse_eratosthenes.scm.json
  40. +2 −839 test/Feersum.Tests/_snapshots/Parse_fact.scm.json
  41. +2 −384 test/Feersum.Tests/_snapshots/Parse_fail/3.scm.json
  42. +2 −539 test/Feersum.Tests/_snapshots/Parse_fail/bad-imports.scm.json
  43. +2 −760 test/Feersum.Tests/_snapshots/Parse_fail/bad-letrecs.scm.json
  44. +25 −0 test/Feersum.Tests/_snapshots/Parse_fail/bad-library-names-parsefail.scm.json
  45. +2 −796 test/Feersum.Tests/_snapshots/Parse_fail/bad-library-names.scm.json
  46. +5 −370 test/Feersum.Tests/_snapshots/Parse_fail/bad-strings-and-idents.scm.json
  47. +2 −1,686 test/Feersum.Tests/_snapshots/Parse_fail/macrofails.scm.json
  48. +2 −53 test/Feersum.Tests/_snapshots/Parse_false.scm.json
  49. +2 −1,216 test/Feersum.Tests/_snapshots/Parse_fib.scm.json
  50. +2 −2,725 test/Feersum.Tests/_snapshots/Parse_gcd.scm.json
  51. +2 −3,479 test/Feersum.Tests/_snapshots/Parse_greatest_diff.scm.json
  52. +2 −217 test/Feersum.Tests/_snapshots/Parse_hello.scm.json
  53. +2 −319 test/Feersum.Tests/_snapshots/Parse_importtest.scm.json
  54. +2 −1,397 test/Feersum.Tests/_snapshots/Parse_issue-4.scm.json
  55. +2 −1,893 test/Feersum.Tests/_snapshots/Parse_issue-45.scm.json
  56. +2 −619 test/Feersum.Tests/_snapshots/Parse_issue-5_a.scm.json
  57. +2 −1,801 test/Feersum.Tests/_snapshots/Parse_issue-5_b.scm.json
  58. +2 −1,816 test/Feersum.Tests/_snapshots/Parse_iterfact.scm.json
  59. +2 −1,236 test/Feersum.Tests/_snapshots/Parse_lambdas.scm.json
  60. +2 −853 test/Feersum.Tests/_snapshots/Parse_let.scm.json
  61. +2 −900 test/Feersum.Tests/_snapshots/Parse_libcapture.scm.json
  62. +2 −1,162 test/Feersum.Tests/_snapshots/Parse_libgreet.scm.json
  63. +2 −2,178 test/Feersum.Tests/_snapshots/Parse_libs.scm.json
  64. +2 −14,074 test/Feersum.Tests/_snapshots/Parse_lists.scm.json
  65. +2 −165 test/Feersum.Tests/_snapshots/Parse_literals.scm.json
  66. +2 −267 test/Feersum.Tests/_snapshots/Parse_load_and_store.scm.json
  67. +2 −979 test/Feersum.Tests/_snapshots/Parse_locals.scm.json
  68. +4 −0 test/Feersum.Tests/_snapshots/Parse_norun/forever.scm.json
  69. +2 −48 test/Feersum.Tests/_snapshots/Parse_null.scm.json
  70. +2 −580 test/Feersum.Tests/_snapshots/Parse_parameters.scm.json
  71. +2 −648 test/Feersum.Tests/_snapshots/Parse_process-context.scm.json
  72. +2 −5,911 test/Feersum.Tests/_snapshots/Parse_qsort.scm.json
  73. +2 −2,740 test/Feersum.Tests/_snapshots/Parse_quotes.scm.json
  74. +2 −1,045 test/Feersum.Tests/_snapshots/Parse_self-capture.scm.json
  75. +2 −81 test/Feersum.Tests/_snapshots/Parse_strings.scm.json
  76. +2 −1,952 test/Feersum.Tests/_snapshots/Parse_swapit.scm.json
  77. +2 −2,525 test/Feersum.Tests/_snapshots/Parse_symbols.scm.json
  78. +2 −2,012 test/Feersum.Tests/_snapshots/Parse_tail.scm.json
  79. +2 −1,140 test/Feersum.Tests/_snapshots/Parse_time.scm.json
  80. +2 −2,414 test/Feersum.Tests/_snapshots/Parse_user-macros.scm.json
  81. +2 −2,336 test/Feersum.Tests/_snapshots/Parse_vectors.scm.json
  82. +2 −3,187 test/Feersum.Tests/_snapshots/Parse_zed.scm.json
  83. +43 −39 test/Feersum.Tests/_snapshots/SpecTests_spec tests compile and run.json
8 changes: 3 additions & 5 deletions .github/workflows/github-actions-pages.yml
Original file line number Diff line number Diff line change
@@ -44,8 +44,6 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
5 changes: 4 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -85,12 +85,15 @@
"label": "update-snapshots",
"command": "dotnet",
"type": "shell",
"dependsOn": "build",
"args": [
"test",
"--no-build",
"/nologo",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary",
"-v=n"
"--logger:'console;verbosity=normal'",
"-v:q"
],
"group": "test",
"presentation": {
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -6,10 +6,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.7.0">
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>build</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions spec/fail/bad-library-names-parsefail.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(define-library .)
3 changes: 1 addition & 2 deletions spec/fail/bad-library-names.scm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(define-library "hello")
(define-library .)
(define-library (scheme |silly'chars|))
(define-library (some 't))
(define-library (srfi trust me))
(define-library (missing export)
(export we |don't| exist))
(export we |don't| exist))
4 changes: 4 additions & 0 deletions spec/norun/forever.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(define world)
(define (hello) (world))
(set! world (lambda () (hello)))
(hello)
2 changes: 1 addition & 1 deletion src/Feersum.CompilerServices/Compile/Builtins.fs
Original file line number Diff line number Diff line change
@@ -290,7 +290,7 @@ module Builtins =
let importCore (targetAssm: AssemblyDefinition) target =

let coreAssemblies =
target.LispCoreLocation :: target.MSCoreLibLocations
target.LispCoreLocation :: target.FrameworkLibLocations
|> List.map (fun x -> AssemblyDefinition.ReadAssembly(x, assmReadParams))

try
26 changes: 12 additions & 14 deletions src/Feersum.CompilerServices/Compile/Compiler.fs
Original file line number Diff line number Diff line change
@@ -1022,6 +1022,7 @@ module private Utils =
il.Emit(OpCodes.Ret)

module Compilation =
open Feersum.CompilerServices.Syntax.Parse

/// Emit a Bound Expression to .NET
///
@@ -1044,7 +1045,7 @@ module Compilation =
AssemblyNameDefinition(stem, options.Version |> Option.defaultValue (Version(1, 0)))

use resolver = new DefaultAssemblyResolver()
List.iter (resolver.AddSearchDirectory) target.MSCoreLibLocations
List.iter (resolver.AddSearchDirectory) target.FrameworkLibLocations
let moduleParams = ModuleParameters()

moduleParams.Kind <-
@@ -1149,9 +1150,9 @@ module Compilation =
/// name of the output.
let compile options outputStream outputName symbolStream node =
let target =
match options.MsCorePaths with
match options.FrameworkAssmPaths with
| [] -> TargetResolve.fromCurrentRuntime
| paths -> TargetResolve.fromMsCoreLibPaths paths
| paths -> TargetResolve.fromFrameworkPaths paths

let (refTys, allLibs) =
options.References
@@ -1214,17 +1215,14 @@ module Compilation =
else
output

let ast, diagnostics =
let nodes, diagnostics =
List.map LegacyParse.parseFile sources
|> List.fold (fun (nodes, diags) (n, d) -> (List.append nodes [ n ], List.append d diags)) ([], [])
let result =
Seq.map (Parse.parseFile) sources
|> Async.Parallel
|> Async.RunSynchronously
|> ParseResult.fold (fun (progs) (p) -> List.append progs [ p ]) []

{ Location = TextLocation.Missing
Kind = AstNodeKind.Seq(nodes) },
diagnostics

if Diagnostics.hasErrors diagnostics then
diagnostics
if Diagnostics.hasErrors result.Diagnostics then
result.Diagnostics
else

// Open the output streams. We don't use an `Option` directly here for
@@ -1238,7 +1236,7 @@ module Compilation =
| BuildConfiguration.Release -> null

let result =
compile options outputStream (Path.GetFileName(output)) (symbols |> Option.ofObj) ast
compile options outputStream (Path.GetFileName(output)) (symbols |> Option.ofObj) result.Root

if result.Diagnostics.IsEmpty && options.OutputType = OutputType.Exe then
match result.EmittedAssemblyName with
8 changes: 3 additions & 5 deletions src/Feersum.CompilerServices/Feersum.CompilerServices.fsproj
Original file line number Diff line number Diff line change
@@ -13,11 +13,9 @@
<Compile Include="Options.fs" />
<Compile Include="Text.fs" />
<Compile Include="Diagnostics.fs" />
<Compile Include="LegacySyntax.fs" />
<Compile Include="Syntax/Lex.fs" />
<Compile Include="Syntax/Tree.fs" />
<Compile Include="Syntax/Parse.fs" />
<Compile Include="Syntax/SyntaxShim.fs" />
<Compile Include="Scope.fs" />
<Compile Include="Binding/Libraries.fs" />
<Compile Include="Binding/Macros.fs" />
@@ -35,8 +33,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="FParsec" Version="1.1.1" />
<PackageReference Include="Firethorn" Version="0.3.1" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
<PackageReference Include="Firethorn" Version="0.4.0" />
<PackageReference Include="Mono.Cecil" Version="0.11.5" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
</ItemGroup>
</Project>
Loading