hashmap changes, part 2

This commit is contained in:
Luna 2020-07-23 17:06:38 -03:00
parent 0265eddb2e
commit b0ddffd5fe
2 changed files with 3 additions and 4 deletions

View File

@ -345,9 +345,8 @@ fn prettyType(typ: SymbolUnderlyingType) []const u8 {
pub fn printScope(scope: *Scope, ident: usize) void {
print(ident, "scope '{}' at addr {}\n", .{ scope.id, @ptrToInt(scope) });
var it = scope.env.iterator();
while (it.next()) |kv| {
print(ident + 1, "sym: {}, typ: {}\n", .{ kv.key, prettyType(kv.value) });
while (scope.env.items()) |entry| {
print(ident + 1, "sym: {}, typ: {}\n", .{ entry.key, prettyType(entry.value) });
}
for (scope.children.items) |child| {

View File

@ -427,7 +427,7 @@ pub const Codegen = struct {
var llvm_ret_type = llvm.LLVMFunctionType(
try self.typeToLLVM(fn_sym.return_type),
param_types.items.ptr,
@intCast(c_uint, param_types.len),
@intCast(c_uint, param_types.items.len),
0,
);