<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/visitor.h, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2019-05-31T21:20:37+00:00</updated>
<entry>
<title>Use slang- prefix on slang compiler and core source (#973)</title>
<updated>2019-05-31T21:20:37+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-05-31T21:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6cbc3929a54d37bd23cb5efa8e3320ba02f78b2f'/>
<id>urn:sha1:6cbc3929a54d37bd23cb5efa8e3320ba02f78b2f</id>
<content type='text'>
* Prefixing source files in source/slang with slang-

* Prefix source in source/slang with slang- prefix.

* Rename core source files with slang- prefix.

* Update project files.

* Fix problems from automatic merge.
</content>
</entry>
<entry>
<title>Starting to add intermediate representation (IR)</title>
<updated>2017-08-15T19:21:08+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-08-07T23:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=831896f844453ba09c9e6cbfe7d29f6d44282632'/>
<id>urn:sha1:831896f844453ba09c9e6cbfe7d29f6d44282632</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Major naming overhaul:</title>
<updated>2017-08-09T17:23:09+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-08-09T17:13:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=695c2700de54a5fec72ce7214c137a1dc3a02d7b'/>
<id>urn:sha1:695c2700de54a5fec72ce7214c137a1dc3a02d7b</id>
<content type='text'>
- `ExpressionSyntaxNode` becomes `Expr`
- `StatementSyntaxNode` becomes `Stmt`
- `StructSyntaxNode` becomes `StructDecl`
- `ProgramSyntaxNode` becomes `ModuleDecl`
- `ExpressionType` becomes `Type`
  - Existing fields names `Type` become `type`
  - There might be some collateral damage here if there were, e.g., `enum`s named `Type`, but I can live with that for now and fix those up as a I see them
</content>
</entry>
<entry>
<title>Overhaul emit logic to use visitor abstraction</title>
<updated>2017-07-07T19:37:15+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-07-07T19:31:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c0bcb9c358e22a5c61c3efe77a14a368632bac70'/>
<id>urn:sha1:c0bcb9c358e22a5c61c3efe77a14a368632bac70</id>
<content type='text'>
- This is in preparation for splitting out HLSL vs. GLSL emit as different cases.

- Along the way, I added more cases to the visitor implementation, to handle visitors with arguments
  - This is getting a bit busy, though, and we might be reaching the breaking point where a more general bit of meta-magic is needed to clean things up (either going further down the ugly template route, or plugging in a more real code generation strategy)
</content>
</entry>
<entry>
<title>Fix up visitor approach.</title>
<updated>2017-07-07T16:57:26+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-07-07T16:57:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=56b44cbf582fac32e31601fd2a7ae1d6cb8f71b2'/>
<id>urn:sha1:56b44cbf582fac32e31601fd2a7ae1d6cb8f71b2</id>
<content type='text'>
The existing code used a catch-all `visit()` method, and then relied on overloading to find the right version (allowing fallback to a `visit()` method taking a base-class parameter).
This approach works, but has some big down-sides:

- When browsing the code, you have a bunch of identically-named methods, and it can be hard to find the one you want.

- It is impossible to use inheritance to implement fallback for `visit()` methods, because *any* method in the derived class with that name hides *all* methods with the same name in a base class

This change makes the `visit()` methods use the name of the corresponding syntax class, and then has visitors inherit the fallback methods they need from the base visitor template class.
</content>
</entry>
<entry>
<title>Add meta-definitions for AST types</title>
<updated>2017-06-30T19:22:33+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-06-29T15:55:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cab694dcead92a554654d7fa3f08909d519425f0'/>
<id>urn:sha1:cab694dcead92a554654d7fa3f08909d519425f0</id>
<content type='text'>
- The big change here is that all the definitions for syntax-node classes have been macro-ized, to that we can do light metaprogramming over them
  - The use of macros for this has big down-sides, but I'm not quite ready to do anything more heavy-weight right now
  - The macro-ized definitions can be included multiple times, to generate different declarations/code as needed

- The first example of using this meta-programming facility is a new visitor system
  - The actual visitor base classes and the dispatch logic are all generated from the meta-files

- There was only one visitor left in the code: the semantics checker, so that was ported to the new system.

- All current test cases pass, so *of course* that means all is well.
</content>
</entry>
</feed>
