Comments (4)
Implementation is done:
Need TestDevice
from artist.
Tbh the interface is already generic enough and this change would make it more specific imo. Instead of two, there could be any number of filters. However, this can easily be implemented by creating a new filter that instantiates multiple sub-filters, applies them in any order desired by the developer and combines their results.
The implementations of the functionality you wanted to have, i.e. combinations of whitelisting and blacklisting, are straightforward in this approach.
Example: Whitelist with a blacklist of exceptions (pseudo-code):
WhitelistFilter whitelist([sig1, sig2, ...]);
BlacklistFilter exceptions([sig1, sig4, ...]);
return whitelist.accept(method_sig) && !exceptions.accept(method_sig);
I would argue that this solution is more generic since you could implement any combination of two or more filters, so the new changes are not extending the expressiveness of the API but might introduce problems if there are less than two filters and may confuse people b/c it is not immediately clear why two filters seem to be expected.
Of course we can discuss this, but my current stance is that the API should be as generic as possible to cover a wide range of use cases, and the proposed changes feel a bit like tailoring the API towards a specific module.
I would like to hear your opinion on this @sweisgerber-dev .
from artist.
My change doesn't make the creation of two filters necessary (set one or both null), but creating a new FilterType is indeed much more elegant.
I'll apply your proposal.
from artist.
Implemented in:
- Project-ARTist/art/pull/8 (no changes)
- /pull/18
from artist.
Related Issues (19)
- Android O support HOT 5
- Broken: Injecting calls to 2 different method within the same module
- Stable ARTist API
- Remove Module-specific code
- Add factory method type to module.h to dynamically load modules
- Fix method signature format HOT 1
- Filesystem helpers for ARTist and modules
- Fix Modularization
- Log Module name and filter specs for each loaded module once HOT 3
- Allocation of additional virtual registers HOT 2
- API: Multiple instrumentation passes per module
- Refactor Codelib and Environment
- API for controlling modules from outside the compiler HOT 1
- Module SDK and dynamic loading HOT 1
- Use C++ smart pointers
- Proper README HOT 1
- False positive for CodeLib-Signature HOT 1
- Support for injecting calls to non-Codelib methods
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from artist.