Skip to content

Commit

Permalink
Add -program-name option
Browse files Browse the repository at this point in the history
  • Loading branch information
titzer committed May 23, 2020
1 parent 8816a1c commit 855df09
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions aeneas/src/core/Program.v3
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Program {
var ir: IrModule;
var global: Type;
var mainRootIndex = -1;
var explicitName: string;
// dynamic portion of the program, including initialized state
var initState: Array<InitState>;
var compRecords: Array<Record>;
Expand All @@ -41,6 +42,7 @@ class Program {
return if (mainRootIndex >= 0, ir.roots[mainRootIndex].spec);
}
def name() -> string {
if (explicitName != null) return explicitName;
if (mainRootIndex < 0) return "program";
return getMain().asMethod().source.receiver.name();
}
Expand Down
2 changes: 2 additions & 0 deletions aeneas/src/main/Aeneas.v3
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ component Aeneas {
def MULTIPLE = o.newBoolOption("multiple", false);
def TARGET = o.newOption("target", null, getTarget);
def OUTPUT = o.newStringOption("output", null);
def PROGRAM_NAME = o.newStringOption("program-name", null);
// Language options
def FLOAT = o.newBoolOption("fp", false);
// Internal testing options
Expand Down Expand Up @@ -106,6 +107,7 @@ component Aeneas {
}
def makeProgram(compiler: Compiler, args: Array<string>) -> Program {
var prog = Program.new();
prog.explicitName = PROGRAM_NAME.val;
if (compiler.target == null) SystemModule.install(prog);
else compiler.target.configure(compiler, prog);
compiler.setArgs(prog, args);
Expand Down
2 changes: 1 addition & 1 deletion aeneas/src/main/Version.v3
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

// Updated by VCS scripts. DO NOT EDIT.
component Version {
def version: string = "III-4.1094";
def version: string = "III-4.1095";
var buildData: string;
}
5 changes: 4 additions & 1 deletion doc/aeneas-issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ bash
Comp Prio Module Item
---------------------------------------------------------------------------------------------
-- now -------------------
1 3 lang Allow _ in integer and floating point literals
3 2 lang Remove default values and == for some types
2 2 lang "ascii" (u7) and "char" (u32) types Need to change meaning of strings and string literals
3 2 lang for (x in A and B and C) syntax
Expand All @@ -200,7 +201,6 @@ bash
UNBLOCK: inlined generators?
3 2 lang String interpolation WORRY: too much magic
2 3 lang Remove equality for function types
4 3 lang floating point BLOCKED: parsing + printing of floats
3 2 lang lazy initializers for fields NO BLOCK, but allows deadlocks
4 1 lang Move strings to unicode / magic rep BLOCKED: immutable arrays, WORRY: too much magic
2 3 lang Add clear() operator for classes to reinitialize an object
Expand Down Expand Up @@ -252,6 +252,9 @@ bash
2 1 lang weak references BLOCKED: not much good without reference queues
4 1 lang polymorphic type constraints
-------------------------------------- D O N E ----------------------------------------------
1 1 v3c -program-name option to set binary names III-4.1095
2 2 lang Allow any integral type for array indexing III-4.1068
4 3 lang floating point III-4.1094
1 1 bug Fix load elimination for field init III-4.1039
1 1 lang def var defines private-writable fields III-4.1034
2 2 lang void.! of anything is legal III-4.0943
Expand Down

0 comments on commit 855df09

Please sign in to comment.