e23d82b457517d0302ebabefad32118ac7b78023 |
|
12-Jun-2015 |
Stephen Hines <srhines@google.com> |
Move the error for pointers in structures earlier in the compile. Bug: 21597073 This fixes an issue where a function argument is not checked for compatibility until the reflected code generation (at which point the message is far more cryptic). We do this by checking parameters for externally-visible functions and externally-visible globals in our ValidateType() routine. Change-Id: I5ab9db1a11ed0e395c7623f1c9997632da057269 (cherry picked from commit ab94bccca64c9b126cbd1b732aa5e681d8639b99)
/frameworks/compile/slang/slang_rs_export_type.h
|
fe41c8da501e5a742f1aa6fade2592b4b80bca3b |
|
06-Sep-2014 |
Stephen Hines <srhines@google.com> |
am 340b5550: Fix dangling reference to a local std::string. * commit '340b5550cf63b6beae3b12c2e91377bce7704c34': Fix dangling reference to a local std::string.
|
340b5550cf63b6beae3b12c2e91377bce7704c34 |
|
05-Sep-2014 |
Stephen Hines <srhines@google.com> |
Fix dangling reference to a local std::string. Bug: 16031597 llvm::StringRefs are just lightweight wrappers around strings, and don't retain/own any of the storage for the actual underlying string. This causes lifetime issues if any local std::string objects that are then wrapped by llvm::StringRef ever escape. When the local object goes out of scope, we are left with a dangling reference. Valgrind helped us to catch this happening for constant array exports, which only ever use a statically named "<ConstantArray>" reference, so we can simply replace it with static C string (wrapped by llvm::StringRef). Change-Id: I0a9fae2687bc9f53d091d56cf15f99bb75ca46e4
/frameworks/compile/slang/slang_rs_export_type.h
|
5abbe0e9ca2508260b627ffef2bf01e2554e8357 |
|
13-Aug-2014 |
Chris Wailes <chriswailes@google.com> |
Replace the NULL macro with nullptr literal. Change-Id: I33609969cd0d7aa55eaa83fb2c65f5faa6d55fa0
/frameworks/compile/slang/slang_rs_export_type.h
|
a6bce2db689b1ad086860ed3f5845a00489e3a49 |
|
05-Aug-2014 |
Tim Murray <timmurray@google.com> |
Fix two bugs for 64-bit slang. The first is to handle structs in invoke parameter lists by assuming struct and not struct*. The second is to not cache LLVM types for RS object types because it breaks on 64-bit compilation. Cherry-pick of d56a92fc2b1d417ce53d9550548fe1661fa37d40 Change-Id: I26d7dd7395ef0146eb84d43cbec5cf8d49d09697
/frameworks/compile/slang/slang_rs_export_type.h
|
d56a92fc2b1d417ce53d9550548fe1661fa37d40 |
|
05-Aug-2014 |
Tim Murray <timmurray@google.com> |
Fix two bugs for 64-bit slang. The first is to handle structs in invoke parameter lists by assuming struct and not struct*. The second is to not cache LLVM types for RS object types because it breaks on 64-bit compilation. Change-Id: I26d7dd7395ef0146eb84d43cbec5cf8d49d09697
/frameworks/compile/slang/slang_rs_export_type.h
|
796e7b1400d3f3f7c07496d88bb48129ea925bb9 |
|
27-May-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Remove useless "return;" statements. More cleanups to follow... Change-Id: Ib8348255273771c1e9ff07e79bd7fbc8f2795a5b
/frameworks/compile/slang/slang_rs_export_type.h
|
b095e05fef8f0230ab42eaed7a06c3b2d698189a |
|
17-May-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Replace macros with equivalent inline functions. Change-Id: Ibb9db8ffe20513ca1ec56403c632e10e82a4fe86
/frameworks/compile/slang/slang_rs_export_type.h
|
01321838204e213b314f7d6fa5bfc1f94dbf347e |
|
23-May-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Remove obsolete comments Change-Id: I30ca59ef860fbc976b8fe6bc21cbd50146b19a6a
/frameworks/compile/slang/slang_rs_export_type.h
|
eca0534a31b6185d6ab758f5e97acd7a4cb21e8e |
|
15-May-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Add details to the TODO, simplify dummy names Change-Id: I37451d8217c3d61ea76db377785045edb2d5c4b0
/frameworks/compile/slang/slang_rs_export_type.h
|
c95381a2c3b6e9117901eef0687e861e4d533bfe |
|
15-May-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Make virtual getTypeStoreSize and getTypeAllocSize Change-Id: I898d7b21d7856559e75d80c6147fc4b4229c75dd
/frameworks/compile/slang/slang_rs_export_type.h
|
cec9b65aa890dea58e39951900ae13efb8d11703 |
|
15-May-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Move DataType enum out of RSExportPrimitiveDataType. It applies to more than just Primitives and should not have been in there. Change-Id: If2b6a9d2a87a05176a74bcf7212f65cf1cdf67fe
/frameworks/compile/slang/slang_rs_export_type.h
|
2354442e34a47e27dad019df96062c7f620e853a |
|
15-May-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Remove obsolete unused code Change-Id: Iead651dc9e0321d36bb653bc178ac1a9af6d34f9
/frameworks/compile/slang/slang_rs_export_type.h
|
474655a402e70cb329e1bcd4ebbe00bdc5be4206 |
|
29-Apr-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Remove rs_spec_gen and associated macros. Also, enable new data types to be defined, out of order. More CLs are coming to continue refactoring the code and removing duplication. modified: Android.mk deleted: RSSpec.mk modified: slang_rs_export_element.cpp modified: slang_rs_export_type.cpp modified: slang_rs_export_type.h modified: slang_rs_metadata_spec_encoder.cpp modified: slang_rs_object_ref_count.cpp modified: slang_rs_object_ref_count.h deleted: slang_rs_spec_table.cpp modified: slang_rs_type_spec.h Change-Id: I3eb3e4357bbe9af26011df714795de8e495fec68
/frameworks/compile/slang/slang_rs_export_type.h
|
ee4016d1247d3fbe50822de279d3da273d8aef4c |
|
11-Apr-2014 |
Tim Murray <timmurray@google.com> |
Update Slang for Clang/LLVM 3.5a. Change-Id: Icd59efa1197098076555c505c31939866e504a83
/frameworks/compile/slang/slang_rs_export_type.h
|
d3f7527b105d21f1c69d3473eb88a762f2c3ab5a |
|
17-Jan-2014 |
Jean-Luc Brouillet <jeanluc@google.com> |
Add ReportErrror/Warning to RSContext. Remove a lot of boilerplate code by adding error reporting methods to RSContext. There are still a few additional files that could be cleaned. That will be for another CL someday. Change-Id: I6a261735720227ac87d94dbdea5ce4a7b8ef6cca
/frameworks/compile/slang/slang_rs_export_type.h
|
48d893dc7794b3cfb74f35955ca763ee4170f9ad |
|
07-Dec-2013 |
Stephen Hines <srhines@google.com> |
Support reflection of enums. Prior versions would just crash when attempting to reflect an enum type. This patch maps enums to integers for reflection in Java. Change-Id: I5b278d670564ceb606a6b96804f76a798bedc89c
/frameworks/compile/slang/slang_rs_export_type.h
|
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
|