Compare commits

..

1 Commits

Author SHA1 Message Date
149d057403 Reproduce command
Some checks failed
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Failing after 32s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Failing after 31s
CI / ci (Release, ubuntu-latest) (pull_request) Failing after 30s
CI / ci (Debug, ubuntu-latest) (pull_request) Failing after 1m5s
2025-06-21 09:01:32 -06:00
3 changed files with 18 additions and 20 deletions

View File

@ -93,7 +93,6 @@ fn void compile(Arena* arena, Options options)
.name = options.name,
.path = options.path,
.executable = options.executable,
.definitions = options.definitions,
.objects = options.objects,
.library_directories = options.library_directories,
.library_names = options.library_names,
@ -110,6 +109,24 @@ fn void compile(Arena* arena, Options options)
.id = ValueId::infer_or_ignore,
};
for (auto definition: options.definitions)
{
auto definition_global = new_global(&module);
auto definition_value = new_value(&module);
*definition_value = {
.string_literal = definition.value,
.id = ValueId::string_literal,
};
*definition_global = Global{
.variable = {
.initial_value = definition_value,
.type = get_slice_type(&module, uint8(&module)),
.scope = &module.scope,
.name = definition.name,
},
};
}
parse(&module);
emit(&module);
}

View File

@ -1336,7 +1336,6 @@ struct Module
String path;
String executable;
Slice<Definition> definitions;
Slice<String> objects;
Slice<String> library_directories;
Slice<String> library_names;

View File

@ -3167,24 +3167,6 @@ void parse(Module* module)
{
auto scope = &module->scope;
for (auto definition: module->definitions)
{
auto definition_global = new_global(module);
auto definition_value = new_value(module);
*definition_value = {
.string_literal = definition.value,
.id = ValueId::string_literal,
};
*definition_global = Global{
.variable = {
.initial_value = definition_value,
.type = get_slice_type(module, uint8(module)),
.scope = scope,
.name = definition.name,
},
};
}
while (1)
{
skip_space(module);