Fix some tests and do some cleanup.
This commit is contained in:
20
module.jai
20
module.jai
@@ -279,7 +279,7 @@ pretty_print_field :: (builder : *String_Builder, field : *Field) {
|
||||
}
|
||||
|
||||
type_variable_to_field :: (checker : *Semantic_Checker, variable : Type_Variable_Handle) -> Field {
|
||||
return type_variable_to_field(checker, h2tv(checker, variable));
|
||||
return type_variable_to_field(checker, from_handle(checker, variable));
|
||||
}
|
||||
|
||||
type_variable_to_field :: (checker : *Semantic_Checker, variable : *Type_Variable) -> Field {
|
||||
@@ -318,11 +318,11 @@ type_variable_to_field :: (checker : *Semantic_Checker, variable : *Type_Variabl
|
||||
find_result := find_symbol(checker, variable.typename, xx 1);
|
||||
assert(find_result != null, "Internal compiler error\n");
|
||||
|
||||
type_var := h2tv(checker, find_result.type_variable);
|
||||
type_var := from_handle(checker, find_result.type_variable);
|
||||
|
||||
for i : 0..type_var.children.count - 1 {
|
||||
child := type_var.children[i];
|
||||
child_field := type_variable_to_field(checker, h2tv(checker, child));
|
||||
child_field := type_variable_to_field(checker, from_handle(checker, child));
|
||||
array_add(*type.children, child_field);
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ compile_file :: (compiler : *Shader_Compiler, path : string) -> Compilation_Resu
|
||||
if checker.result.vertex_entry_point {
|
||||
variant.vertex_entry_point.name = checker.result.vertex_entry_point.name;
|
||||
|
||||
type_variable := h2tv(*checker, checker.result.vertex_entry_point.type_variable);
|
||||
type_variable := from_handle(*checker, checker.result.vertex_entry_point.type_variable);
|
||||
assert(type_variable.type == .Function);
|
||||
|
||||
node := type_variable.source_node;
|
||||
@@ -443,7 +443,7 @@ compile_file :: (compiler : *Shader_Compiler, path : string) -> Compilation_Resu
|
||||
if node.children[0].kind == .FieldList {
|
||||
field_list := node.children[0];
|
||||
for child : field_list.children {
|
||||
tv := h2tv(*checker, child.type_variable);
|
||||
tv := from_handle(*checker, child.type_variable);
|
||||
field := type_variable_to_field(*checker, tv);
|
||||
array_add(*variant.vertex_entry_point.input, field);
|
||||
}
|
||||
@@ -452,14 +452,14 @@ compile_file :: (compiler : *Shader_Compiler, path : string) -> Compilation_Resu
|
||||
}
|
||||
|
||||
for buffer_variable : to_array(*check_result.constant_buffers) {
|
||||
variable := h2tv(check_result.type_variables, buffer_variable);
|
||||
variable := from_handle(check_result.type_variables, buffer_variable);
|
||||
|
||||
cb := array_add(*result.collection.cbuffers);
|
||||
|
||||
for i : 0..variable.children.count - 1 {
|
||||
child := variable.children[i];
|
||||
field : Property_Field;
|
||||
field.base_field = type_variable_to_field(*checker, h2tv(*checker, child));;
|
||||
field.base_field = type_variable_to_field(*checker, from_handle(*checker, child));;
|
||||
array_add(*cb.fields, field);
|
||||
}
|
||||
|
||||
@@ -468,11 +468,11 @@ compile_file :: (compiler : *Shader_Compiler, path : string) -> Compilation_Resu
|
||||
|
||||
find_result := find_symbol(*check_result.scope_stack, check_result.property_name, xx 1);
|
||||
if find_result {
|
||||
property_variable := h2tv(check_result.type_variables, find_result.type_variable);
|
||||
property_variable := from_handle(check_result.type_variables, find_result.type_variable);
|
||||
|
||||
for i : 0..property_variable.children.count - 1 {
|
||||
child := property_variable.children[i];
|
||||
field := type_variable_to_field(*checker, h2tv(*checker, child));
|
||||
field := type_variable_to_field(*checker, from_handle(*checker, child));
|
||||
prop_field : Property_Field;
|
||||
prop_field.base_field = field;
|
||||
array_add(*result.collection.properties.fields, prop_field);
|
||||
@@ -483,7 +483,7 @@ compile_file :: (compiler : *Shader_Compiler, path : string) -> Compilation_Resu
|
||||
if checker.result.pixel_entry_point {
|
||||
variant.pixel_entry_point.name = checker.result.pixel_entry_point.name;
|
||||
|
||||
type_variable := h2tv(*checker, checker.result.pixel_entry_point.type_variable);
|
||||
type_variable := from_handle(*checker, checker.result.pixel_entry_point.type_variable);
|
||||
assert(type_variable.type == .Function);
|
||||
|
||||
field := type_variable_to_field(*checker, type_variable.return_type_variable);
|
||||
|
||||
Reference in New Issue
Block a user