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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart

Issue 19599007: Implement reflection on native classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 7 years, 5 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 | « dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart ('k') | dart/tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
index 6538cf2dfdaa25d8f440173321c8a5055a0d530c..4440c067f7590c5171e4dd5c8c3e0ebbb7c3c14e 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
@@ -232,14 +232,11 @@ class NativeEmitter {
// Emit the native class interceptors that were actually used.
for (ClassElement classElement in classes) {
if (neededClasses.contains(classElement)) {
- ClassBuilder builder = builders[classElement];
// Define interceptor class for [classElement].
- String className = backend.namer.getName(classElement);
- jsAst.Expression init =
- js(emitter.classesCollector)[className].assign(
- builder.toObjectInitializer());
- mainBuffer.write(jsAst.prettyPrint(init, compiler));
- mainBuffer.write('$N$n');
+ emitter.emitClassBuilderWithReflectionData(
+ backend.namer.getName(classElement),
+ classElement, builders[classElement],
+ emitter.bufferForElement(classElement, mainBuffer));
emitter.needsDefineClass = true;
}
}
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart ('k') | dart/tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698