From 831896f844453ba09c9e6cbfe7d29f6d44282632 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Mon, 7 Aug 2017 16:06:58 -0700 Subject: Starting to add intermediate representation (IR) Right now none of this is hooked up, but I want to get things checked in incrementally rather than have along long-lived branches. - Added placeholder declarations for IR representation of instructions, basic blocks, etc. - Start adding a `lower-to-ir` pass to translate from AST representation to IR Again: none of this is functional, so it shouldn't mess with existing users of the compiler. --- source/slang/ir.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 source/slang/ir.cpp (limited to 'source/slang/ir.cpp') diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp new file mode 100644 index 000000000..44eb7a727 --- /dev/null +++ b/source/slang/ir.cpp @@ -0,0 +1,29 @@ +// ir.cpp +#include "ir.h" + +#include "../core/basic.h" + +namespace Slang +{ + + IRType* IRBuilder::getBoolType() + { + SLANG_UNIMPLEMENTED_X("IR"); + } + + IRValue* IRBuilder::getBoolValue(bool value) + { + SLANG_UNIMPLEMENTED_X("IR"); + } + + IRValue* IRBuilder::getIntValue(IRType* type, IRIntegerValue value) + { + SLANG_UNIMPLEMENTED_X("IR"); + } + + IRValue* IRBuilder::getFloatValue(IRType* type, IRFloatingPointValue value) + { + SLANG_UNIMPLEMENTED_X("IR"); + } + +} -- cgit v1.2.3