History log of /system/tools/aidl/ast_cpp.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fd7dc03fdd1e0cd558df43a155ab1644cbe2b553 03-Feb-2016 Christopher Wiley <wiley@google.com> Declare interface constants as enum in C++

While constexpr hints to the compiler that it can optimize
away the address of these integer expressions, it does not
mandate this behavior. This can cause linkage errors when
the same generated header is included from multiple compilation
units and everyone expects the integer constant to defined
elsewhere.

Bug: 26942276
Test: unittests pass

Change-Id: I7dfda08b5226344d5169b3f298413cd8a1ceb692
/system/tools/aidl/ast_cpp.h
0a62067f35e957493bc37c4b42dfdcfc16353831 04-Dec-2015 Elliott Hughes <enh@google.com> Track base/ -> android-base/ change.

Change-Id: I02b64b42c17d248c5fb2c4de4b0778a441e018e3
/system/tools/aidl/ast_cpp.h
d40e2fed2c19850d53f1620322ac5cbca2c0e245 24-Nov-2015 Casey Dahlin <sadmac@google.com> Introduce integer constants

We can now declare a "const int" variable in an AIDL interface, in
addition to methods. These constants will become static members of the
interface/base class in the generated code.

Change-Id: I6b690ecbbe2acae37abb106510e42283f0753f26
Test: Unit and integration tests updated and pass
Bug: 23600061
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/ast_cpp.h
f02facfe96f5ff340e9a51876f2d33e314cebcca 12-Nov-2015 Christopher Wiley <wiley@google.com> Allow ArgList to take other AstNodes as arguments

This permits us to generate code like:

func(another_func(1, 2, 3))

by nesting the calls. This is useful to prevent ourselves from
assigning intermediate results to a temporary and thus break copy
elision.

Bug: 25615695
Test: unit tests

Change-Id: If54f262290369dd944b8050edbc57bc891667a5d
/system/tools/aidl/ast_cpp.h
3c5d28def0021e34e526debc71e6b4473c0b9a0c 21-Oct-2015 Christopher Wiley <wiley@google.com> Replace C++ LiteralStatement with Statement

We need a way to turn expressions (e.g. MethodCall) into statements by
adding a semicolon. This seems like the easiest path.

Bug: 25078043
Test: unittests still pass

Change-Id: Id9f847531cddee16672d09e43c9b46df18d7466d
/system/tools/aidl/ast_cpp.h
0eb903eff2376941ad7e947bd5d3a32e15d89f69 21-Oct-2015 Christopher Wiley <wiley@google.com> Add IfStatement C++ AST node

Replace existing places we used a literal for this purpose.

Bug: 24862905
Test: unittests continue to pass

Change-Id: I7bcc3f06d36701d5277bc7b6364a0a91d245e1ac
/system/tools/aidl/ast_cpp.h
d55db28b25e03de7edafc8c35db53a9f491bd38f 21-Oct-2015 Christopher Wiley <wiley@google.com> Add Comparison C++ AST node

Bug: 24862905
Test: unittests continue to pass

Change-Id: I858fc6228d324d4b625e78da1603a5212ca96e78
/system/tools/aidl/ast_cpp.h
b23149dbc77744864b78edeb9f9cbb2f94f8c06d 14-Oct-2015 Christopher Wiley <wiley@google.com> Mark client constructor as explicit

While here, refactor all the constructor declaration modifiers into an
enum and use that instead of endless boolean flags.

Bug: 24938116
Test: unittests pass

Change-Id: Ibb6e20a69b90a76e2995abc2e9d02c8744f10b58
/system/tools/aidl/ast_cpp.h
f9688b04c9e34063e8b2dffab4827e02f4f104fa 09-Oct-2015 Christopher Wiley <wiley@google.com> Add C++ ConstructImpl AST Node

This is used in client source generation.

While here, just expose the internal StatementBlock in
MethodImpl rather than exposing a subset of its methods
to add statements.

Bug: 24505489
Test: unittests, wrote another one

Change-Id: If44adefb1a12e37932770ed54f36861494e0ed2b
/system/tools/aidl/ast_cpp.h
ade4b45d8d9e922aca70d0995f2fb8a170de838b 10-Oct-2015 Christopher Wiley <wiley@google.com> Change existing argument lists to ArgList

In several places we were using vector<string> to represent
an argument list. Change these to ArgList.

Pass ArgList around as an rvalue reference to get value semantics,
similar to how we were using vector<string>. Passing pointers or
unique_ptr instances has the sad side effect of passing nullptr
when the argument is constructed like {}.

Bug: 24505488
Test: unittests pass

Change-Id: I16c9862742ccb881df356e1cf321451dab7c4a25
/system/tools/aidl/ast_cpp.h
f094d58e623418bffa53fa82e0ef159daee8801b 09-Oct-2015 Christopher Wiley <wiley@google.com> Make BpInterface destructor virtual and default

This simplifies the source file.

Bug: 24505489
Test: unittests pass

Change-Id: I3231d3b0d11cba367163a040406f8b12627bc3f9
/system/tools/aidl/ast_cpp.h
23285262ca6f45149d23851995f57bf50e323544 10-Oct-2015 Christopher Wiley <wiley@google.com> Add Assignment, MethodCall, ArgList AST Nodes

Bug: 24505488
Test: Unit tests pass, wrote some more

Change-Id: I3b4f38e856adb14406b348f46846f9734e95f349
/system/tools/aidl/ast_cpp.h
da6959923ceecc58d0fd5a5ba5da12ee614386a0 05-Oct-2015 Christopher Wiley <wiley@google.com> Add classes for generating method implementations

These include:
- SwitchStatement we'll need for onTransact() in the server impl.
- LiteralStatement we can use everywhere.
- MethodImpl we need everywhere.

Bug: 24505488
Test: Unittests, wrote some more

Change-Id: I06677924410fe772fd4540af2a1a327e43809b67
/system/tools/aidl/ast_cpp.h
0c732dbae2e6b33cde9a266ea091e1459742f1f1 29-Sep-2015 Christopher Wiley <wiley@google.com> Generate Binder IInterface.h file

Bug: 24505487
Test: compiles, unittests

Change-Id: I8c17f7304f4e28d108d07f2f2405ca5f49178bec
/system/tools/aidl/ast_cpp.h
a7a5c10eb8c52639052e144804936432654dc9d8 30-Sep-2015 Christopher Wiley <wiley@google.com> Add Enum C++ AST class

We'll use this when generating the interface header to define
the transaction values corresponding to each method call.

Bug: 24505487
Change-Id: Ie3e648d233fe879920d3f18680c927e195e2ff07
Test: unittests
/system/tools/aidl/ast_cpp.h
f944e79bdaf92fffe9ea78314d3636e7e4de8c51 29-Sep-2015 Christopher Wiley <wiley@google.com> Move C++ generation code into C++ namespace

Use this namespace to shorten the class names now that we
needn't distinguish them as C++ specific.

Test: unittests pass

Change-Id: Idace1e87be1e9fd5129550941532d05be83ec985
/system/tools/aidl/ast_cpp.h
a834dd4650b3196893440ee49c7ff6b303b45a92 23-Sep-2015 Casey Dahlin <sadmac@google.com> Generate client-side headers

Test: Ran aidl-cpp
Bug: 23599760
Change-Id: I31ca5be9dd1274ba81ea6a7110e9f2005f86855d
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/ast_cpp.h
b7d0f7f4bb08171e025659d17cd3bb57b35b739a 23-Sep-2015 Casey Dahlin <sadmac@google.com> Convert C++ AST to unique_ptr

Change-Id: I5acae3137d76296df04a3510ada0df310456ccb3
Test: unit tests
Bug: 24309875
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/ast_cpp.h
88924d60d8758c87ad48e6d227839eb354cf369e 18-Sep-2015 Casey Dahlin <sadmac@google.com> Add method AST node for C++

Change-Id: Ib77306f4aba16f80fc69d8eee2da824c16cca875
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/ast_cpp.h
60a4916eea290a9a62e1f867d1bd9813df5f37fc 17-Sep-2015 Casey Dahlin <sadmac@google.com> Introduce AST node for classes

Change-Id: I481fe74797299a38b09b7ed963382f2ae96e3304
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/ast_cpp.h
34b8610486ce41e1a611a2e1ff7f3aedcc49c5f5 17-Sep-2015 Casey Dahlin <sadmac@google.com> Rejigger C++ AST to be more general

We define a generic node class, and a few versions for type safety, and make
the existing document nodes expect generic types we can subclass so new nodes
will plug in instantly.

Change-Id: I3e8bd41047ee5361c0551f993ed02f974e99086f
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/ast_cpp.h
f600a555ef6f86afea7d55fc735f0c7b5f7cf6a5 12-Sep-2015 Christopher Wiley <wiley@google.com> Add the beginnings of a C++ AST

Just generate the empty files for now. We can flesh this out as we go
along.

Bug: 23598995
Change-Id: Ic2459e0f70d41692a473af2eba7f18485c3814b6
Test: unittests
/system/tools/aidl/ast_cpp.h