aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-11-09 22:48:00 +0000
committergingerBill <bill@gingerbill.org>2017-11-09 22:48:00 +0000
commiteb4b3f5976d1563cd97841964e829fc638179cc5 (patch)
tree4031277bf8d44d261a5c8a10ad2c62aed9e3dbfb /src/ir.cpp
parentdbb070524ffde7d392c6776dae41ea440b0e84c6 (diff)
Change push allocator system; update core libraries
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index fddb80cee..88c20d312 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -7251,32 +7251,6 @@ void ir_build_stmt_internal(irProcedure *proc, AstNode *node) {
case_end;
-
- case_ast_node(pa, PushAllocator, node);
- ir_emit_comment(proc, str_lit("push_allocator"));
- irValue *new_allocator = ir_build_expr(proc, pa->expr);
-
- ir_open_scope(proc);
-
- irValue *prev = ir_find_or_generate_context_ptr(proc);
- irValue *next = ir_add_local_generated(proc, t_context);
- ir_emit_store(proc, next, ir_emit_load(proc, prev));
-
- Selection sel = lookup_field(proc->module->allocator, t_context, str_lit("allocator"), false);
- irValue *gep = ir_emit_deep_field_gep(proc, next, sel);
- ir_emit_store(proc, gep, new_allocator);
-
- array_add(&proc->context_stack, next);
- defer (array_pop(&proc->context_stack));
-
- // TODO(bill): is this too leaky?
-
- ir_build_stmt(proc, pa->body);
-
- ir_close_scope(proc, irDeferExit_Default, nullptr);
- case_end;
-
-
case_ast_node(pc, PushContext, node);
ir_emit_comment(proc, str_lit("push_context"));
irValue *new_context = ir_build_expr(proc, pc->expr);