Commit graph

211 commits

Author SHA1 Message Date
zik.saleeba 9cc9c8904e Excluding platform specific code from line count
git-svn-id: http://picoc.googlecode.com/svn/trunk@111 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 19:43:03 +00:00
zik.saleeba 20fb2407ef Big reorganisation to make it easier to port to different targets
git-svn-id: http://picoc.googlecode.com/svn/trunk@110 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 11:16:37 +00:00
zik.saleeba 54efa99a65 Transitional state
git-svn-id: http://picoc.googlecode.com/svn/trunk@109 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 10:29:14 +00:00
zik.saleeba aa213f4129 Fixed local conflicts
git-svn-id: http://picoc.googlecode.com/svn/trunk@108 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 08:00:53 +00:00
zik.saleeba 7f5aa8e701 Updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@107 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 04:53:01 +00:00
zik.saleeba 38d9e18036 Fixed a problem with trying to compile IntrinsicPrintFP when in NON_FP mode
git-svn-id: http://picoc.googlecode.com/svn/trunk@106 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 04:52:35 +00:00
zik.saleeba cf28c7513c Fixed some inconsistencies in array handling
git-svn-id: http://picoc.googlecode.com/svn/trunk@105 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 02:28:35 +00:00
zik.saleeba 802f3e026f Removed some DOS end-of-line characters
git-svn-id: http://picoc.googlecode.com/svn/trunk@104 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 02:14:07 +00:00
zik.saleeba 318a966bd0 Added pointer test case
git-svn-id: http://picoc.googlecode.com/svn/trunk@103 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 02:12:20 +00:00
zik.saleeba 37c2364eff Character constants now work
git-svn-id: http://picoc.googlecode.com/svn/trunk@102 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 01:01:02 +00:00
zik.saleeba e94767ba98 New NO_FP compile option allows removal of all floating point support
git-svn-id: http://picoc.googlecode.com/svn/trunk@101 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 00:21:17 +00:00
zik.saleeba 93a6a0e9d0 Fixed a bug in array allocation (regression)
git-svn-id: http://picoc.googlecode.com/svn/trunk@100 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-24 00:08:11 +00:00
zik.saleeba 4b11999dea stdarg parameter type checking bug sorted
git-svn-id: http://picoc.googlecode.com/svn/trunk@99 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 23:38:07 +00:00
zik.saleeba 7f6503d1e0 printf() now works!
Fixed a bug in pointer sizing.


git-svn-id: http://picoc.googlecode.com/svn/trunk@98 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 12:02:15 +00:00
zik.saleeba 4821d689ad Big changes to string constants.
Got rid of str.c.
First attempt at stdarg params in printf()


git-svn-id: http://picoc.googlecode.com/svn/trunk@97 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-21 02:35:52 +00:00
zik.saleeba 2ac131247b Fixed a lexer bug in memory allocation
git-svn-id: http://picoc.googlecode.com/svn/trunk@96 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-20 09:46:46 +00:00
zik.saleeba 89e5c66189 Implemented ellipsis for stdargs and stdarg stack handling
git-svn-id: http://picoc.googlecode.com/svn/trunk@95 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-20 09:04:45 +00:00
zik.saleeba e6e62a26df Updated TODO
git-svn-id: http://picoc.googlecode.com/svn/trunk@94 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-20 00:14:21 +00:00
zik.saleeba a128b58610 Implemented 'return'.
All tests now pass.

git-svn-id: http://picoc.googlecode.com/svn/trunk@93 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-20 00:12:58 +00:00
zik.saleeba 957b620703 Revised stack and parameter handling in intrinsic functions
git-svn-id: http://picoc.googlecode.com/svn/trunk@92 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 23:55:40 +00:00
zik.saleeba ebc32dc1f0 Removed unnecessary ResultOnHeap parameters - they just added code for no reason.
Arguments are now stored fully on the stack to fix a bug with nested function calls.

git-svn-id: http://picoc.googlecode.com/svn/trunk@91 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 23:29:35 +00:00
zik.saleeba b428c0f544 Small fix for parameter count
git-svn-id: http://picoc.googlecode.com/svn/trunk@90 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 11:07:56 +00:00
zik.saleeba 2ba0598f1c Fixed a bug in do..while - now works
git-svn-id: http://picoc.googlecode.com/svn/trunk@89 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 11:01:14 +00:00
zik.saleeba 65db9a490a Added tests for functions, while and do..while
git-svn-id: http://picoc.googlecode.com/svn/trunk@88 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 11:00:51 +00:00
zik.saleeba 6a1d28c1dc switch is now working.
did some work on break / continue in loops.


git-svn-id: http://picoc.googlecode.com/svn/trunk@87 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 09:07:00 +00:00
zik.saleeba 834a6daca6 Added comment
git-svn-id: http://picoc.googlecode.com/svn/trunk@86 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 04:55:52 +00:00
zik.saleeba f45882e7e2 Now escaping character and string constants correctly
git-svn-id: http://picoc.googlecode.com/svn/trunk@85 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-19 04:34:36 +00:00
zik.saleeba 2caa072dec Added test case for switch/case/break
git-svn-id: http://picoc.googlecode.com/svn/trunk@84 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-18 11:05:34 +00:00
zik.saleeba 2f5523f400 Fixed a parser bug with token checking
git-svn-id: http://picoc.googlecode.com/svn/trunk@83 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-18 11:03:14 +00:00
zik.saleeba fdad9f8d30 Changes to help with implementing switch/case/break/continue/return
git-svn-id: http://picoc.googlecode.com/svn/trunk@82 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-18 08:19:06 +00:00
zik.saleeba d94b70212b Syntax of "switch" is now handled. Not semantics though.
git-svn-id: http://picoc.googlecode.com/svn/trunk@81 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-17 23:36:09 +00:00
zik.saleeba 2e545deb6a Arrays debugged and working
git-svn-id: http://picoc.googlecode.com/svn/trunk@80 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-15 07:39:41 +00:00
zik.saleeba 78e0ff8bc1 Implemented array lookup
git-svn-id: http://picoc.googlecode.com/svn/trunk@79 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-15 06:46:37 +00:00
zik.saleeba 038431067f Arithmetic fixed to work with new system. "for" now works correctly again.
git-svn-id: http://picoc.googlecode.com/svn/trunk@78 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-15 06:16:54 +00:00
zik.saleeba b073f187f8 Revamped the way lvalues work. Now both structs and '.' should work.
git-svn-id: http://picoc.googlecode.com/svn/trunk@77 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-15 05:52:03 +00:00
zik.saleeba f3b46b9afc Fixed bugs in "for"
git-svn-id: http://picoc.googlecode.com/svn/trunk@76 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-12 12:15:25 +00:00
zik.saleeba 36ce6f3b80 Fixed line numbering in error messages
git-svn-id: http://picoc.googlecode.com/svn/trunk@75 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-12 09:34:16 +00:00
zik.saleeba bd5fe4b73c Made a cleaner interface to creating shared values
git-svn-id: http://picoc.googlecode.com/svn/trunk@74 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-11 06:47:36 +00:00
zik.saleeba 177c2a549b '*' dereference operator implemented
git-svn-id: http://picoc.googlecode.com/svn/trunk@73 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-11 06:42:30 +00:00
zik.saleeba e348021c51 Fixed some egregious bugs
git-svn-id: http://picoc.googlecode.com/svn/trunk@72 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 22:25:20 +00:00
zik.saleeba 2b1983b668 Implemented the "address of" operator - working towards pointers
git-svn-id: http://picoc.googlecode.com/svn/trunk@71 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 11:19:48 +00:00
zik.saleeba 7c9b3c1c8a Added tests for "for" and arrays
git-svn-id: http://picoc.googlecode.com/svn/trunk@70 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 11:18:50 +00:00
zik.saleeba 51afc538be struct are now working
git-svn-id: http://picoc.googlecode.com/svn/trunk@69 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 08:42:09 +00:00
zik.saleeba 3a2c0552d6 Added struct test
git-svn-id: http://picoc.googlecode.com/svn/trunk@68 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 06:17:28 +00:00
zik.saleeba d6a7ac7c14 Redesigned the test system
git-svn-id: http://picoc.googlecode.com/svn/trunk@67 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-10 06:13:14 +00:00
zik.saleeba a8b4b08d93 Implemented the '.' operator for struct/union member access
git-svn-id: http://picoc.googlecode.com/svn/trunk@66 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-09 11:40:56 +00:00
zik.saleeba c9abac9fad Fixed an EOF lexing problem.
Added some optional debug.
Turned debug off.
Fixed handling of LValues to work with stack frames better.
Fixed the handling of stack frames in function calls.
Fixed a bug in popping variable stack frames.

git-svn-id: http://picoc.googlecode.com/svn/trunk@65 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-04 00:17:30 +00:00
zik.saleeba a9494ff382 Put a better (but slower) string hash function back in since it's only used at lex time now.
git-svn-id: http://picoc.googlecode.com/svn/trunk@64 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 22:05:11 +00:00
zik.saleeba 70cc4eae49 Fixed lexer EOF handling when whitespace at end of file
git-svn-id: http://picoc.googlecode.com/svn/trunk@63 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 11:09:07 +00:00
zik.saleeba bd30654f74 Fixed a problem with VariableAllocValueAndData() allocating the wrong amount of memory.
Fixed a problem with type parsing.


git-svn-id: http://picoc.googlecode.com/svn/trunk@62 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-03 10:39:48 +00:00