petabricks/petabricks — Issue #1: Preprocessor doesn't carry #defines into included files
Author: jansel
Created: 2011-10-13 05:42:12+00:00
State: open

In the following example, TEST should be replaced by foo:

```
~/petabricks/examples$ cat a.pbcc
#define TEST foo
#include "b.pbcc"

~/petabricks/examples$ cat b.pbcc
function TEST
to X
{}

~/petabricks/examples$ ../scripts/preprocessor.py a.pbcc
# 2 "b.pbcc"
transform TEST
to _X
{ to (_X X) from () { } }
kleptocracy:~/petabricks/examples$
```

This is causing a major performance regression in the sort benchmark.