11274a7324b478ec13e1d10a1b81350b34a65ab1 |
|
27-Sep-2012 |
Stephen Hines <srhines@google.com> |
Validate FS (and RS) ASTs. This change adds a new RSCheckAST class that is used to handle validation of the final AST. The checks include existing RS checks (for accepted types) and new checks for Filterscript (like disallowing pointers, unions and > 32 bit types completely). The refactoring also fixes a subtle union bug that existed in prior versions of llvm-rs-cc. We also add an implicit pragma for "rs_fp_relaxed" by default on Filterscript. Bug: 7166741 Change-Id: Ia077783b4caba0bbd89df2ab3827e9f4d1009eea
/frameworks/compile/slang/slang_rs_export_type.h
|
1f6c331d622ac645ab68a016aa4c577998547373 |
|
04-Jul-2012 |
Stephen Hines <srhines@google.com> |
Fix reflection of setters for unsigned primitive types. BUG=6764163 We now generate set_*() functions for unsigned types by creating a single element FieldPacker and stuffing it with the larger Dalvik type. Reusing FieldPacker in this way allows us to validate that the input is non-negative and within the appropriate range (i.e. not really using more bits than the unsigned C type should). This change also fixes a subtle race where the Dalvik and script side can disagree about a variable's value. All set_*() methods need to be synchronized, and we must do the Dalvik update after validating the input data. Change-Id: I7b2371206848ebbf0b0752779cb6c98cec1ab5f6
/frameworks/compile/slang/slang_rs_export_type.h
|
0d26cef64debfaa6862a27587c1fd0d30baa3b1d |
|
02-May-2012 |
Stephen Hines <srhines@google.com> |
Refactor using genSetExportVariable(). BUG=6009244 Change-Id: I3c830b84c6f863faed8e36da625447bdf416579e
/frameworks/compile/slang/slang_rs_export_type.h
|
a6b54146b93eec68f6daa4b1877639cdc34801dc |
|
10-Apr-2012 |
Stephen Hines <srhines@google.com> |
Reflect element/dim information for FieldPacker. BUG=6009244 Change-Id: Ie24b3ce17817b98e8b651f7ec1304dcd18c8c062
/frameworks/compile/slang/slang_rs_export_type.h
|
d5a84f6d49d64738e4bb7c9dea7242e48acad959 |
|
05-Apr-2012 |
Stephen Hines <srhines@google.com> |
Generate an error when exporting RS objects in structs/arrays. BUG=6009244 Note that this error triggers when the following conditions are met: 1) We are running with a pre-JB target API. 2) We detect an RS object type inside another composite (struct/array) type. 3) The variable is going to be exported (i.e. non-static). 4) The variable must also be of a non-pointer type, since pointers only reflect a bind() routine that does not use FieldPacker. Change-Id: Id7ca47a4affed2a8774d1c9644e11d4ab02ff27f
/frameworks/compile/slang/slang_rs_export_type.h
|
5bfec8dd08b3bde9ba3b331e2115210b0e910eae |
|
04-Apr-2012 |
Stephen Hines <srhines@google.com> |
Revert "Generate an error for exporting rs_objects in structs/arrays." This reverts commit f5abb503e67587ad89bcec99ed925d4a75448dcd
/frameworks/compile/slang/slang_rs_export_type.h
|
f5abb503e67587ad89bcec99ed925d4a75448dcd |
|
04-Apr-2012 |
Stephen Hines <srhines@google.com> |
Generate an error for exporting rs_objects in structs/arrays. BUG=6009244 This is only an error in pre-JB builds that can't support proper ref-counting within a FieldPacker. Change-Id: Ib96b5ec2befa48ec44890391e518ad557e9a9117
/frameworks/compile/slang/slang_rs_export_type.h
|
1b6a0883cd6984e11e59b0c847fb334df1f41afc |
|
12-Mar-2012 |
Jason Sams <jsams@google.com> |
start cpp reflection BUG=5972398 Change-Id: Iede58fde457d16293345e741f80109f89e653ad5
/frameworks/compile/slang/slang_rs_export_type.h
|
2b8fb64be3047df940a219872b331eb11de2758d |
|
09-Mar-2012 |
Stephen Hines <srhines@google.com> |
Removing DataKind completely from llvm-rs-cc. BUG=5972398 Change-Id: I76fdb98fa60bd70468d088f9034acf00e443d6c8
/frameworks/compile/slang/slang_rs_export_type.h
|
fdd1ba13a69501a1b91fdc9be31413215d467497 |
|
09-Mar-2012 |
Stephen Hines <srhines@google.com> |
Add getRSReflectionType to facilitate new C++ code. BUG=5972398 Change-Id: I5d1efdbde6eb0b7bb139bdf672a056a4aa5f26e1
/frameworks/compile/slang/slang_rs_export_type.h
|
9207a2e495c8363606861e4f034504ec5c153dab |
|
21-Oct-2011 |
Logan Chien <loganchien@google.com> |
Apply changes to migrate to LLVM upstream Oct 20th 2011. - StructType::isAnonymous is renamed to StructType::isLiteral. - PassManagerBuilder has been moved from llvm/Support/PassManagerBuilder.h to llvm/Transforms/IPO/PassManagerBuilder.h - Include llvm/Transforms/IPO.h for llvm::createInternalizePass. - clang::DiagClient has be renamed to clang::DiagnosticConsumer. Besides, we have to implement one additional pure virtual method 'clone' for create a clone of slang::DiagnosticBuffer. - llvm::Linker::LinkModules comes with one additional parameter. Passing llvm::Linker::DestroySource should be equivalent to the old code we were using. - slang::Slang is now derived from clang::ModuleLoader and implemented loadModule pure virtual method (though we will always return NULL.) - clang::Preprocessor is taking one additional parameter for clang::ModuleLoader. - clang::Diagnostic has been changed. A lot of the method has been moved to clang::DiagnosticsEngine, and we can no longer 'Report' a diagnostic from clang::Diagnostic. We have to use clang::DiagnosticEngine instead. - llvm::setCodeModel has been removed. Change-Id: I1f2a4cbeaf61a8ed1d0d635a5a0e1baa90d99d07
/frameworks/compile/slang/slang_rs_export_type.h
|
ecddee364d731c09c77b4c3fa647fa4f50e26756 |
|
21-Jul-2011 |
Stephen Hines <srhines@google.com> |
Fix style issues. Change-Id: I646b5232cfac772c5a310b62f435a2cc79b2c831
/frameworks/compile/slang/slang_rs_export_type.h
|
7c67e578c760408dba0c2f64da6e074dd8b56fd9 |
|
19-Jul-2011 |
Shih-wei Liao <sliao@google.com> |
Apply changes to migrate to upstream API. Change-Id: Ibe6060a0d1c42b9725524de7f4cb95551b711717
/frameworks/compile/slang/slang_rs_export_type.h
|
78e69cb06b9b0683b2ac9dcafde87b867690ef2f |
|
23-Apr-2011 |
Stephen Hines <srhines@google.com> |
Forbid RS objects from being contained in unions. This change also refactors variable validation in general for RS. BUG=4283858 Change-Id: I4527986a07c9cf2babdc5b855cdb1f00e3535d5b
/frameworks/compile/slang/slang_rs_export_type.h
|
f2174cfd6a556b51aadf2b8765e50df080e8f18e |
|
10-Feb-2011 |
Stephen Hines <srhines@google.com> |
Handle struct reference counting. Bug: 3092382 Change-Id: I215bd8245324ec2b7752a7c40817e3e5cd1c0e00
/frameworks/compile/slang/slang_rs_export_type.h
|
feaca06fcb0772e9e972a0d61b17259fc5124d50 |
|
04-Feb-2011 |
Stephen Hines <srhines@google.com> |
Zero-initialize structs containing RS objects. Bug: 3092382 Change-Id: I2fd80777db7ed52d8c0a1a598567399e08ce06a2
/frameworks/compile/slang/slang_rs_export_type.h
|
b3a12fe7c18a06f99201dc491a932a90ab7d975c |
|
27-Jan-2011 |
Stephen Hines <srhines@google.com> |
Add Slang support for rs_object_slots metadata. This is added to support proper cleanup of RS resources. We were leaking some global resources because there was no way to tell which slots to clear. Change-Id: Ib452facb1b83d1f2aecd9686f46ef726e427161d b: 3381615
/frameworks/compile/slang/slang_rs_export_type.h
|
2ef9bc0cfbca2152d972c0975005f8c897c2a42c |
|
14-Dec-2010 |
Stephen Hines <srhines@google.com> |
Convert fprintf -> diagnostic messages. Proper support/test for multi-level pointer types. Proper diagnostics for bit fields, which are currently not supported. Bug: 2954471 Change-Id: I347f14f02fcf7fbef9f6e5dde5b4e948391a0691
/frameworks/compile/slang/slang_rs_export_type.h
|
dd6206bb61bf8df2ed6b643abe8a29c48a315685 |
|
10-Dec-2010 |
Stephen Hines <srhines@google.com> |
Arrays of width 3 vector types cannot be exported. Bug: 3171195 Change-Id: I7deab4ab9c7f8650bce7c597fae2a0dc013f6f71
/frameworks/compile/slang/slang_rs_export_type.h
|
e5e64432476a44b59c61ded233b1149109c7a7c3 |
|
03-Dec-2010 |
Stephen Hines <srhines@google.com> |
Improved error messages for structs. This change also adds two new tests for anonymous structures (both with and without an associated typedef). I have also updated test.py to support a more verbose output for dumping the actual test commands that are executed. Change-Id: Ic1edc8d4e98c2017611430eb581c335146ccc927
/frameworks/compile/slang/slang_rs_export_type.h
|
c808a99831115928b4648f4c8b86dc682594217a |
|
30-Nov-2010 |
Stephen Hines <srhines@google.com> |
Add prelim error check for pointers in structs. Bug: 2954471 Change-Id: Icacf67dd3eeb3dda67e1eae3d54e11f7efa6c680
/frameworks/compile/slang/slang_rs_export_type.h
|
e639eb5caa2c386b4a60659a4929e8a6141a2cbe |
|
09-Nov-2010 |
Stephen Hines <srhines@google.com> |
Improve code style. Change-Id: I26e043849bce2a4b41ae132fbe0c882f4a6f112f
/frameworks/compile/slang/slang_rs_export_type.h
|
b1771ef128b10c4d4575634828006bfba20b1d9c |
|
22-Oct-2010 |
Zonr Chang <zonr@google.com> |
Exclude rs_matrixNxN from being RS object type. rs_matrix{2x2, 3x3, 4x4} (RS matrix type) is very different than RS object type like rs_allocation. This commit teaches llvm-rs-cc to learn it. NOTE: Currenrly RS matrix type + RS object type = RS specific type.
/frameworks/compile/slang/slang_rs_export_type.h
|
a7a828d1ff95c5a8f2327f56a137a2bcb3a9a8fa |
|
21-Oct-2010 |
Zonr Chang <zonr@google.com> |
Add convertToSpecType() for every RSExportType derivative. convertToSpecType() can convert a RSExportType (used by llvm-rs-cc internally for reflection engine) into union RSType (used by external source such as libbcc) defined in the slang_rs_type_spec.h.
/frameworks/compile/slang/slang_rs_export_type.h
|
3cd3dd327445fcfa49f0e96cb2de2055bce541e9 |
|
21-Oct-2010 |
Zonr Chang <zonr@google.com> |
Bug fix: support self-referential struct type.
/frameworks/compile/slang/slang_rs_export_type.h
|
7363d8430db732c42d392fcab47cf0e3f8eb4515 |
|
21-Oct-2010 |
Zonr Chang <zonr@google.com> |
Revert "Bug fix: support self-referential struct type." This reverts commit af5cef07b48a678a416d554b037e0d6dbe958eb4.
/frameworks/compile/slang/slang_rs_export_type.h
|
d6f9fedf1b32c27c0bcaddd13d7b741ab5ad74b8 |
|
21-Oct-2010 |
Zonr Chang <zonr@google.com> |
Bug fix: support self-referential struct type.
/frameworks/compile/slang/slang_rs_export_type.h
|
a65ec168e41e3ee9c6e8ac04cde694bbbfc2590a |
|
16-Oct-2010 |
Zonr Chang <zonr@google.com> |
Unify type spec by creating rs-spec-gen. rs-spec-gen (slang_rs_spec_table.cpp) will help llvm-rs-cc to share the RS spec it used across the other projects. This will makes code cleaner and therefore easier to add new spec/synchronize the spec between other project (e.g., libbcc and libRS). This CL is the first part. It eliminated the needs of slang_rs_export_element_support.inc and slang_rs_export_type_support.inc.
/frameworks/compile/slang/slang_rs_export_type.h
|
641558f02fe6ce0ee3ae5076eb366c25e2ad5903 |
|
12-Oct-2010 |
Zonr Chang <zonr@google.com> |
Implement one-definition-rule (ODR) feature. When compiling multiple RS files, we say two RS files A and B break ODR iff: 1. They have at least one common struct named [S] and [S] will be reflected to ScriptField_[S].java, and 2. [S] defined in A is not *exactly the same* (number of fields, field type and field name) as the one defined in B. This CL detects such error.
/frameworks/compile/slang/slang_rs_export_type.h
|
c383a500aa59423264811be3874461bf8adbfea0 |
|
11-Oct-2010 |
Zonr Chang <zonr@google.com> |
Prepend legal announcement in all files. Release libslang/llvm-rs-cc/llvm-rs-link under Apache 2.0 license.
/frameworks/compile/slang/slang_rs_export_type.h
|
a5d2c232d56b04292cb51c8fb343aef990f7970f |
|
12-Oct-2010 |
Stephen Hines <srhines@google.com> |
Support for unsigned long and unsigned long long. Change-Id: I8e3b6a90fa9119f3d98c5f276df2590b7690d22b
/frameworks/compile/slang/slang_rs_export_type.h
|
a41ce1d98094da84643995d40d71c529905123fc |
|
05-Oct-2010 |
Zonr Chang <zonr@google.com> |
Fix memory leak of RSExport* object create in processExport(). Now, they will properly be freed after their associated RSContext was destroyed.
/frameworks/compile/slang/slang_rs_export_type.h
|
6b6320ad5faee29e0f75fe937e40156746ef9e80 |
|
05-Oct-2010 |
Zonr Chang <zonr@google.com> |
De-virtualize the RSExportType::getClass().
/frameworks/compile/slang/slang_rs_export_type.h
|
2e1dba6c779a0ae55c76d36a3c03553e16725ab7 |
|
05-Oct-2010 |
Zonr Chang <zonr@google.com> |
Rewrite the RSExportConstantArrayType to better support reflecting constant-sized array variable.
/frameworks/compile/slang/slang_rs_export_type.h
|
0da0a7dc51c25943fe31d0bfccbdfee326a3199c |
|
05-Oct-2010 |
Zonr Chang <zonr@google.com> |
1. Rewrite reflection of parameter packet in RSExportFunc. In order to generate the correct call (i.e., all parameters in the call instruction must match the target function signature) regardless of ABI, we construct type of parameter packet directly from target function prototype (which may not be the same as the one declared in the source since Clang may modified it to the type which is better supported by the target ABI.) 2. Rewrite reflection of RSExportRecordType to use clang::ASTRecordLayout. This corrects the reflection of struct type when tail padding and field alignment involve. This improves stability of RSExportRecordType reflection.
/frameworks/compile/slang/slang_rs_export_type.h
|
92b344a51c6c4934e96882bd401e4b13d6d03db8 |
|
05-Oct-2010 |
Zonr Chang <zonr@google.com> |
Create RSExportMatrixType which is a subclass of RSExportType to support rs_matrix{2x2,3x3,4x4} explicitly.
/frameworks/compile/slang/slang_rs_export_type.h
|
6315f76e3cc6ff2d012d1183a0b030d4ff0dc808 |
|
05-Oct-2010 |
zonr <zonr@google.com> |
More coding style fixing to improve the readability. No actual semantics changed. This also makes cpplint happy.
/frameworks/compile/slang/slang_rs_export_type.h
|