zik.saleeba
9ec50b6e49
Now handles forward declared structures correctly.
...
Issue #166
git-svn-id: http://picoc.googlecode.com/svn/trunk@583 21eae674-98b7-11dd-bd71-f92a316d2d60
2012-09-23 11:48:27 +00:00
zik.saleeba
62bc229f4a
Adapted to be fully re-entrant.
...
Issue #137
git-svn-id: http://picoc.googlecode.com/svn/trunk@581 21eae674-98b7-11dd-bd71-f92a316d2d60
2012-09-22 05:11:44 +00:00
zik.saleeba
10714186eb
Added the ability to declare unsized arrays which can then have a sized
...
value assigned to them. Part of #142
git-svn-id: http://picoc.googlecode.com/svn/trunk@577 21eae674-98b7-11dd-bd71-f92a316d2d60
2012-09-03 10:14:06 +00:00
zik.saleeba
853b6f6259
Added some more comments.
...
Added the beginnings of a debugger. It's not useful yet.
git-svn-id: http://picoc.googlecode.com/svn/trunk@570 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-05-01 06:50:00 +00:00
zik.saleeba
ae653d4810
Got rid of some warnings which appear on some compilers.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@557 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-18 23:05:22 +00:00
zik.saleeba
b23d1e8e06
Big reorganisation to make it easier to access picoc as a library.
...
Also moved most internal header stuff to the new header interpreter.h.
git-svn-id: http://picoc.googlecode.com/svn/trunk@549 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-17 07:11:20 +00:00
zik.saleeba
fbe799d63f
Fixed bug in static
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@548 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-17 06:19:08 +00:00
zik.saleeba
cab5e8b2d8
Added support for static type qualifiers.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@546 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-16 23:38:41 +00:00
zik.saleeba
e44b198946
Added a new alignment system which should correspond to the struct alignments of most processors. This means that picoc struct members should match up with native C structs in most cases. I hope.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@532 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 04:25:09 +00:00
zik.saleeba
eb7010d292
Now avoiding structure assignment since it seems to cause problems on blackfin processors. Urk!
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@515 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 04:04:51 +00:00
zik.saleeba
036f3efa8b
Fixed a problem with variable declarations in inner blocks giving errors. bug#82.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@470 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-24 16:07:56 +00:00
zik.saleeba
7c754bad48
Can now parse parameterised macros. Can't evaluate them yet though.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@462 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-08 04:52:05 +00:00
zik.saleeba
8021fed051
Implemented the ternary operator
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@458 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-04 19:52:52 +00:00
zik.saleeba
907f2b26d9
Changed "NativePointer" to "Pointer" for brevity
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@437 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-13 14:41:03 +00:00
zik.saleeba
ea10e1a369
Added function prototypes as requested in issue #74
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@410 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-03-01 20:39:08 +00:00
zik.saleeba
8f9095b3a4
Fix for issue #67 - shared array problem
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@404 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-01-03 17:45:35 +00:00
zik.saleeba
e077cc9d49
Fixed UltraSPARC II bus error. Probably a compiler bug?
...
Issue #65
git-svn-id: http://picoc.googlecode.com/svn/trunk@385 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 15:17:53 +00:00
zik.saleeba
d36833b139
Fixed some warnings for 64 bit architectures
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@380 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-06 18:17:36 +00:00
zik.saleeba
e75518e139
Changed the way that arrays are represented to a simpler one without
...
the extra level of indirection.
Fixed various array-related problems, including array assignment
which is issue #49 .
git-svn-id: http://picoc.googlecode.com/svn/trunk@373 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-04 02:02:37 +00:00
zik.saleeba
f1aeadb077
Removed redundant "struct ArrayValue"
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@369 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:10:48 +00:00
zik.saleeba
18acb6dc1a
Removed old pointer system. Now it's "native pointers" all the way.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@368 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:02:31 +00:00
zik.saleeba
8c7434424d
Native pointers no longer carry their size with them.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@344 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-23 19:01:32 +00:00
zik.saleeba
32727cc365
Native pointers feature added
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@331 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-05 00:55:54 +00:00
zik.saleeba
eb6f323f06
HeapAlloc() changed to HeapAllocMem() to avoid clash with win32 namespace.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@321 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 08:00:02 +00:00
zik.saleeba
bb0d19a733
Now conforms fully to the ISO C90 standard
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@320 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 07:50:46 +00:00
zik.saleeba
a4889edcf1
Fixes in handling void values.
...
Making quicksort test more real.
Better error reporting for invalid parameters.
git-svn-id: http://picoc.googlecode.com/svn/trunk@318 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 07:01:43 +00:00
zik.saleeba
825c393240
Reworking of how assignment works. Now all places which do assignment of values
...
should work the same.
git-svn-id: http://picoc.googlecode.com/svn/trunk@314 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-06-02 05:51:51 +00:00
zik.saleeba
5dcde3d5ea
Fix for a bug where variables which were initialised on declaration weren't writable.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@279 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-14 00:21:29 +00:00
zik.saleeba
a76fc34881
By popular demand I'm adding support for native pointers. It's a work in progress - not working yet.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@277 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-05-06 00:25:09 +00:00
zik.saleeba
997f0c119f
Fixed a char * arithmetic bug
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@273 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-29 03:24:15 +00:00
zik.saleeba
4ea76ea5b3
Changed dereferencing to handle arrays correctly.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@269 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-26 03:26:04 +00:00
zik.saleeba
e5fa7017f0
Better checks on pointers.
...
Pointer offsets are now honoured.
git-svn-id: http://picoc.googlecode.com/svn/trunk@259 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-22 07:23:26 +00:00
zik.saleeba
61174fb115
Interactive mode error handling fixed for surveyor.
...
All surveyor warnings fixed.
git-svn-id: http://picoc.googlecode.com/svn/trunk@216 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-04-04 03:11:12 +00:00
zik.saleeba
ce80c66e8f
Added new "delete" keyword, used for undefining variables or functions
...
in interactive mode.
git-svn-id: http://picoc.googlecode.com/svn/trunk@206 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-15 10:44:56 +00:00
zik.saleeba
48a6472c68
All allocations are now cleaned up neatly on exit. This is probably unnecessary given that we run our own heap but gives confidence that there are no internal memory leaks.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@199 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 23:49:10 +00:00
zik.saleeba
0523bd570d
String literal array values are now shared and deallocated cleanly
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@197 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 22:28:42 +00:00
zik.saleeba
028c98d665
Now cleaning up more stuff
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@194 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-11 10:01:32 +00:00
zik.saleeba
8d315824b5
Fixed a problem with heap allocation when splitting large blocks from the free list
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@190 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-10 23:32:36 +00:00
zik.saleeba
886526f462
Bug fix for platform variables
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@155 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-03-05 05:03:28 +00:00
zik.saleeba
694d2b9d2d
Made arrays with with platform shared variables
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@131 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 21:08:00 +00:00
zik.saleeba
d98c55d5e5
Platform-shared global variables implemented
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@130 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-28 20:46:02 +00:00
zik.saleeba
71aa142c96
Pointers now work
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@118 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-26 10:16:49 +00:00
zik.saleeba
73d91b6202
Change to add extra lvalue information to values
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@117 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-02-26 09:56:22 +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
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
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
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
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
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
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