aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-12-21 20:59:23 +0000
committergingerBill <bill@gingerbill.org>2017-12-21 20:59:23 +0000
commitac277a1cce7b42e0e7d6ff9147a2ef4efc7ca541 (patch)
treed2335f6188886d9b12360190d4f4154b4cad44c6 /src/types.cpp
parenta17310a83c14d708a129559c90610a7a51a147a1 (diff)
Revert `map` to be a value type and not a reference type
(Implement code for "const ref" parameters)
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 9ccb97a6e..34ba4cddc 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -1871,9 +1871,7 @@ i64 type_align_of_internal(gbAllocator allocator, Type *t, TypePath *path) {
case Type_Map:
generate_map_internal_types(allocator, t);
- // return type_align_of_internal(allocator, t->Map.generated_struct_type, path);
- return build_context.word_size;
-
+ return type_align_of_internal(allocator, t->Map.internal_type, path);
case Type_Enum:
return type_align_of_internal(allocator, t->Enum.base_type, path);
@@ -2065,8 +2063,7 @@ i64 type_size_of_internal(gbAllocator allocator, Type *t, TypePath *path) {
case Type_Map:
generate_map_internal_types(allocator, t);
- // return type_size_of_internal(allocator, t->Map.generated_struct_type, path);
- return build_context.word_size;
+ return type_size_of_internal(allocator, t->Map.internal_type, path);
case Type_Tuple: {
i64 count, align, size;