Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Unified Diff: packages/smoke/README.md

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/smoke/PATENTS ('k') | packages/smoke/codereview.settings » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/smoke/README.md
diff --git a/packages/smoke/README.md b/packages/smoke/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..685e1c5dbfb65f59d334103212015957236efbb7
--- /dev/null
+++ b/packages/smoke/README.md
@@ -0,0 +1,40 @@
+Smoke (and mirrors)
+===================
+
+Smoke is a package that exposes a reduced reflective system API. This API
+includes accessing objects in a dynamic fashion (read properties, write
+properties, and call methods), inspecting types (for example, whether a
+method exists), and symbol/string convertion.
+
+The package provides a default implementation of this API that uses the system's
+mirrors, but additionally provides mechanisms for statically generating code
+that can replace the mirror-based implementation.
+
+The intention of this package is to allow frameworks to use mirrors in a way
+that will not impose on their users. The idea is that users will not worry about
+how to preserve symbols when compiling with dart2js (for instance, using the
+[MirrorsUsed][] annotation). Instead, this package provides the building
+blocks to autogenerate whatever is needed for dart2js to be happy and to
+generate reasonable code.
+
+Note this package alone doesn't know how to generate everything, but it provides
+a simple API that different frameworks can use to define what needs to be
+generated.
+
+
+Smoke reflective API
+====================
+
+Use `package:smoke/smoke.dart` in your framework to read and write objects and
+to inspect type information. Read the Dart-docs for more details.
+
+Code Generation
+===============
+
+Use `package:smoke/codegen/generator.dart` and
+`package:smoke/codegen/recorder.dart` in your transformer to create a static
+initialization that can be used by smoke. The test under
+`test/codegen/end_to_end_test.dart` is a good illustrating example to learn how
+to use these APIs.
+
+[MirrorsUsed]: https://api.dartlang.org/apidocs/channels/stable/#dart-mirrors.MirrorsUsed
« no previous file with comments | « packages/smoke/PATENTS ('k') | packages/smoke/codereview.settings » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698