Stefano Sanfilippo
a313d4865c
Implementing stdlib runtime.
2015-03-07 14:12:18 +01:00
Stefano Sanfilippo
fb42a90235
Adding forgotten RuntimePrototypes include to BitcodeEmitter
2015-03-07 14:12:00 +01:00
Stefano Sanfilippo
8d28c5e909
Fix bug in FP to integer conversion.
2015-03-07 14:11:38 +01:00
Stefano Sanfilippo
c9bff1e64b
Ensure that parameters passed to function call are of the right type.
2015-03-07 14:11:25 +01:00
Stefano Sanfilippo
6725cbaf88
Implementing MonicelliType, refactoring LLVMType.
2015-03-07 14:10:49 +01:00
Stefano Sanfilippo
3968d937e0
Rename TYPE_MAP to TYPECAST_MAP (more relevant).
2015-03-07 14:09:57 +01:00
Stefano Sanfilippo
6df0801d35
Clearer error messages for BitcodeEmitter.
2015-03-07 14:08:52 +01:00
Stefano Sanfilippo
287d543b34
Extracting method BitcodeEmitter::emitFunctionPrototype()
2015-03-07 14:08:10 +01:00
Stefano Sanfilippo
c0bfd4757f
Implementing system module loading for register runtime functions.
2015-03-07 14:06:58 +01:00
Stefano Sanfilippo
e476446e75
Minor refactorings to Nodes.hpp
...
1. Convenience ctor for Id
2. Clean spaces and redudant things.
2015-03-07 14:06:16 +01:00
Stefano Sanfilippo
0f5c138948
Renaming Module::Type to Module::ModuleType for clarity.
...
A monicelli::Type enum is already defined.
2015-03-07 14:05:03 +01:00
Stefano Sanfilippo
43fc82d318
Inheriting std::vector ctors in PointerList.
2015-03-07 14:04:15 +01:00
Stefano Sanfilippo
eafc7c5d94
Prototypes and lookup for standard functions.
2015-03-07 14:03:54 +01:00
Stefano Sanfilippo
bb675a09d7
Adding Type::UNKNOWN
2015-03-07 14:03:07 +01:00
Stefano Sanfilippo
754485e40b
Implementing abort/assert/input/output bitcode generation.
2015-03-07 14:02:29 +01:00
Stefano Sanfilippo
4321fa5dbf
Adding type coercion and deduction mechanism.
2015-03-06 16:10:35 +01:00
Stefano Sanfilippo
cac89bb476
Stubbing implicit type casting mechanism.
2015-03-06 14:51:54 +01:00
Stefano Sanfilippo
f9cfe700fa
Report error when applying int-only ops to float values.
2015-03-06 14:41:02 +01:00
Stefano Sanfilippo
ec21714af9
Minor refactorings to BitcodeEmitter.
...
1. split initalizer for module unique_ptr on multiple lines for readibility.
2. replace //TODO modules with commented loop.
2015-03-06 14:31:00 +01:00
Stefano Sanfilippo
dc017b3285
Adding Scope::drop() method to clean the whole scope.
2015-03-06 14:30:16 +01:00
Stefano Sanfilippo
b7be4dc37f
Implementing error handling in emitters.
...
As a result, Emitter iface changes by providing a bool retval.
False means failure and should be managed as such.
2015-03-06 14:29:52 +01:00
Stefano Sanfilippo
2ce76a1dfd
LLVM BitcodeEmitter completed for all statements.
...
Error handling is still missing.
2015-03-06 13:45:05 +01:00
Stefano Sanfilippo
4e883d148c
LLVM Module is now managed by BitcodeEmitter.
2015-03-06 13:42:47 +01:00
Stefano Sanfilippo
68004b3f49
Reordering methods in iface Emittable (minor, cosmetic).
2015-03-06 13:41:27 +01:00
Stefano Sanfilippo
5d043566dc
Turn main into an ordinary function.
2015-03-06 13:40:40 +01:00
Stefano Sanfilippo
a509a61bfb
Adding Scope lookup utility class.
2015-03-05 22:30:08 +01:00
Stefano Sanfilippo
12dedc1cef
Adapting BitcodeEmitter to the new Emitter iface.
2015-03-05 22:29:34 +01:00
Stefano Sanfilippo
73122492f3
Merge branch 'master' into llvm
2015-03-05 22:28:59 +01:00
Stefano Sanfilippo
248afa02c8
Further simplification of the AST hieararchy and Emitter iface.
2015-03-05 22:28:45 +01:00
Stefano Sanfilippo
becdac1f7f
Bitcode emitter for expressions and returns, more things in place.
2015-03-05 22:27:14 +01:00
Stefano Sanfilippo
6a60b72b91
Merge branch 'master' into llvm
2015-03-05 17:36:13 +01:00
Stefano Sanfilippo
8554bda556
Reformat CMakeLists.txt script for readability.
2015-03-05 17:35:52 +01:00
Stefano Sanfilippo
c740954528
Updating bitcode emitter stub according to new Emitter iface.
2015-03-05 17:34:20 +01:00
Stefano Sanfilippo
a4b484b2b9
Merge branch 'master' into llvm
2015-03-05 17:27:50 +01:00
Stefano Sanfilippo
d7494702af
Simplify the Expression hierarchy by moving the operator on the binary father.
...
As a consequence, the Emitter interface is greatly simplified.
2015-03-05 17:25:02 +01:00
Stefano Sanfilippo
c55e25e2a2
Stub bitcode emitter.
2015-03-05 14:26:24 +01:00
Stefano Sanfilippo
82b63189f4
Adding new features to features.cpp compiler checks.
2015-03-05 14:24:27 +01:00
Stefano Sanfilippo
25153e8a85
Properly indent generated C++ code.
2015-03-05 13:55:34 +01:00
Stefano Sanfilippo
b0a01d2fb7
Decouple AST nodes from representation.
...
1. adding getters to all node properties.
2. extracting an Emitter interface.
3. moving all C++ codegen features to a CppEmitter.
All list template specializations typedefs have been removed for
increased readability.
A dependency on Boost is introduced for boost::optional,
which is required in the AST getters API.
2015-03-05 01:16:40 +01:00
Stefano Sanfilippo
0fb3ea5dd6
Moving pointer stuff to separater header.
2015-03-05 01:09:04 +01:00
Stefano Sanfilippo
a302ea3911
Meta comments are no more printed to screen during compilation.
2015-03-05 00:59:33 +01:00
Stefano Sanfilippo
eba0efb878
Passing a pointer to Scanner instead of reference.
...
This way, we can handle std::cin easier.
2015-03-05 00:58:30 +01:00
Stefano Sanfilippo
0cf45c87b4
Merge pull request #22 from calamarim/patch-1
...
Use "prematurata" instead of "brematurata" in examples.
2015-02-11 01:25:50 +01:00
Marco A. Calamari - Progetto Winston Smith
e79316f5fa
Update factorial.mcc
...
Because "Brematurata" and Supercazzora" was in the screenplay while "Prematurata" and "Supercazzola" in the common film understanding, we can consider the second being a new version of the language; let's say Monicelli IV and Monicelli 77.
Is widely known that well conformed programs must not use mixed features, and stick to the latest ones if possible.
This, in short, means replacing all existing instances of tokens also in all others examples.
2015-02-05 14:31:36 +01:00
Stefano Sanfilippo
f229f3fbd4
Remove duplicate line in README
2015-01-16 12:35:15 +01:00
Stefano Sanfilippo
a9da15c4c3
Reserving more keywords for future usage.
2015-01-15 22:02:57 +01:00
Stefano Sanfilippo
d179b4eb21
List reserved keywords in README.
2014-12-16 16:53:27 +01:00
Stefano Sanfilippo
fabb600d19
Updating README for CMake.
2014-12-14 14:26:32 +01:00
Stefano Sanfilippo
715b0fe840
Compiler features discovery and Bison version check.
2014-12-10 23:03:02 +01:00
Stefano Sanfilippo
815dcf9df2
Adding QTCreator *.user to ignore list.
2014-12-10 23:02:24 +01:00