dylan-lang/opendylan — Issue #136: Remove Tcommand_nameT and Tcommand_argumentsT?
Author: waywardmonkeys
Created: 2011-12-27 15:38:11+00:00
State: open

In the generated ``_main.c``, there is some code like this:

````

extern D Tcommand_argumentsT;
extern D Tcommand_nameT;
GC_INIT();
atexit(call_application_exit_functions);
D args = primitive_make_vector((argc > 0) ? argc - 1 : 0);
int i;
if (argc > 0)
Tcommand_nameT = primitive_raw_as_string(argv[0]);
else
Tcommand_nameT = primitive_raw_as_string("unknown");
for (i = 1; i < argc; i++)
primitive_vector_element_setter
(primitive_raw_as_string(argv[i]), args,
primitive_raw_as_integer(i - 1));
Tcommand_argumentsT = (D)args;
````

I'd like to get rid of everything that operates on ``Tcommand_nameT`` and ``Tcommand_argumentsT``.

I don't think these are used anywhere ... but I'm not entirely sure what some stuff is about. Can I just remove the references from the ``DylanRuntimeLib.exp`` file? (Is that file even used?)

There's also this:

````
sources/dfmc/c-linker/c-link-c-object.dylan:define constant $generic-names-not-to-emit = #["pseudo_primitive_command_name",
sources/dfmc/c-linker/c-link-c-object.dylan: "pseudo_primitive_command_arguments"];
sources/dfmc/c-linker/c-link-c-object.dylan:define constant $win32-names-not-to-emit = #["pseudo_primitive_command_name",
sources/dfmc/c-linker/c-link-c-object.dylan: "pseudo_primitive_command_arguments"];
````

that I'm not sure about...

Pinging @housel, @hannesm ...